Slow TTFB

I’m trying to solve the very slow Time-To-First-Byte for the site rona.hr (between 9 and 11 sec) - it’s a Joomla 2.5 site with Jomres, using a very big database (mainly for Jomres) on a managed VPS with 3GB RAM, 8 vCPU and 100 GB SSD (using about 12 GB for this particular site). I’m also using CloudFlare (free).
A week ago my results were all A grade, just TTFB was F.
Half an hour ago, after some changes, I got all A grades, except for TTFB and Progressive JPG.
I’m aware that I have some more issues to improve, but this long TTFB is for the moment the worst one, and I don’t know what else to try to resolve this.
I’ve already optimized my photos, and I’m using AdminTools to optimize tables, but Jomres doesn’t easily support combining scripts and CSS, and is using it’s own cache (not Joomla’s integrated cache). Since Jomres is a complex component I try to avoid too much tampering with it’s code. My hoster already checked the configuration, tried using FastCGI. They also checked MySQL settings, and just sent me the latest MySQLTuner report (I’ve appended the results at the end of this post).
All this has made no difference to TTF time.
Can somebody point me what else should I check to resolve this?
Would using third party DNS make any difference? (My users are mainly from Europe, and the site is hosted in US.)

Thank’s for any help.

MySQLTuner report:
-------- General Statistics --------------------------
[–] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.30-cll
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------
[–] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[–] Data in MyISAM tables: 40M (Tables: 263)
[–] Data in InnoDB tables: 5M (Tables: 276)
[–] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[–] Data in MEMORY tables: 0B (Tables: 6)
[!!] Total fragmented tables: 11
-------- Security Recommendations ------------------
[OK] All database users have passwords assigned
-------- Performance Metrics ------------------------------
[–] Up for: 8s (290 q [36.250 qps], 6 conn, TX: 2M, RX: 53K)
[–] Reads / Writes: 100% / 0%
[–] Total buffers: 786.0M global + 14.4M per thread (100 max threads)
[OK] Maximum possible memory usage: 2.2G (72% of installed RAM)
[OK] Slow queries: 0% (0/290)
[OK] Highest usage of available connections: 2% (2/100)
[OK] Key buffer size / total MyISAM indexes: 64.0M/6.9M
[OK] Key buffer hit rate: 96.2% (2K cached / 94 reads)
[OK] Query cache efficiency: 44.0% (122 cached / 277 selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 14 sorts)
[OK] Temporary tables created on disk: 25% (2 on disk / 8 total)
[OK] Thread cache hit rate: 66% (2 created / 6 connections)
[OK] Table cache hit rate: 91% (72 open / 79 opened)
[OK] Open file limit used: 0% (106/65K)
[OK] Table locks acquired immediately: 100% (197 immediate / 197 locks)
[OK] InnoDB data size / buffer pool: 5.1M/64.0M
-------- Recommendations ----------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries

Sharing a link to your test so others can see it directly: http://www.webpagetest.org/result/130605_3X_YK1/

That first byte time is not a DNS problem. Since it’s a Managed VPS, can you get them to install NewRelic? That will tell you quite quickly where the server is spending it’s time. It’s possible that a plugin or something else is making external calls which could slow it down and not be a function of your server performance or it could be something with the server itself.

The static files all respond quite fast but since you’re using cloudflare it’s possible that those are being served directly from cloudflare’s servers so it’s hard to say if it’s a general serving problem or something specific to the php code path for Joomla.

Thank you for the suggestion - I’ll ask my hoster if they can install NewRelic - perhaps this will clear something up.

I got my hoster to take a look at what is causing the slow load, and very long time-to-first-byte.
Their response:
“This looks to be related to the joomla configuration or its modules. The process stays open for the entirety of the load, and it looks to be loading many modules and language files after running an strace on the process.”
I’m not sure what to do next - since I have 4 languages and different links that Jomres uses for each language, I have 4 language versions of almost every module I load.
I’m aware that my site is “heavy”, and having every content in 4 language version is surely not helping, but, surely there should be some way to cut this time down? The problem is that I don’t know where to look next. I already ditched the “KMFast Trans”, and now I’m using just Joomla’s native multilanguage feature.
One solution to cut down the number of modules would perhaps be to use some extension like “Easy Language”? Or perhaps FaLang? Any sugesstion on that?
I’m using a relatively simple, fixed template, not bootstraped (although I’m already working on a new one to be used with Joomla3).
I would be gratefull for any help!

Do you have an opcode cache running (something like APC)? That would significantly reduce the overhead of loading modules for every request.

Depending on your Joomla version, it also supports several layers of caching which could help substantially: http://www.theartofjoomla.com/joomla-caching-explained.html