Magento – 400ms time to first byte ( ttfb ) on a fully cached magento 0.01mb page on 4g vps server, how can I reduce it

magento-1.8

I am trying to reduce my time to first byte on a magento 1.8.1 site.

  1. Magento is running on an openVZ 4g vps server all on its own
  2. I have LESTI::FPC http://gordonlesti.com/lestifpc extension which works great, I have even tried removing the dynamic and lazy blocks but see no performance difference
  3. Redis is setup and working for fpc cache and session caching
  4. I have just one colour swatch extension installed
  5. The time to first byte is the same for any page on the website once the page has been cached give or take 50ms from a blank homepage to product category page with layered navigation
  6. I have 4 websites setup and just 10 products, 3 users
  7. mysqltuner.pl has been used to optimise the mysql server
  8. I have allocated a good amount of ram to php and using 'top' I can see the resource usage is never over 50% when performing the heaviest backed functions in magento like re-indexing.

All the standard client side stuff has been done such as reducing request and file life limits and such, here I am asking about server side performance.

ttfb

above is chrome showing the 400ms wait for the first byte

So, I can't understand why a this server, which is purely hosting 1 magento website takes 400ms to return full cached homepage which is a tiny 10025 bytes html file ? btw, with the standard magento cache the ttfb is 750ms on the homepage as of now.

As mentioned I am using redis for the cache so I believe the cache is stored in the memory in that case and would be the fastest option, it seems like overkill at this time but should be the fastest option but then using the standard file/disk based magento cache gives the same results.

(I ran a mysql query log when viewing the cached homepage and saw just 1 mysql query so to me that rules our mysql being the issue) but maybe not?

I have read a number of similar posts about similar issued with people using varnish and often people reply about the performance of magento, but once the page is cached, magento and mysql doesn't come into it does it? apart any dynamic blocks which are not cached? (as mentioned I tried disabling dynamic and lazy blocks in the fpc extension i am using and saw I tiny improvement, maybe 20ms)

All I can think is it is server hardware limitation? but surely 4g is enough to run this? some people slate openvz because you don't have truly allocated resources, but like i said, using top command the resources are not being strained.

The blank home page is actually 50ms slower to return the first byte than a category with 10 products…

So can anyone please give me some advice? to me it seems to boil down to an issue of the server returning the cached files slowly rather than magento seeing as the pages are fully cached.

Thanks very much for any help.

Best Answer

i guess you need to RTFM first.
http://gordonlesti.com/how-does-lesti-fpc-work/


a quote from its author:

Lesti::Fpc has an other workflow. I wanted a full page cache with the same flexibility of Magento. That means a little bit more loading time than other caches.

btw you have 3 errors on your page, and this is a browser who slows you down anyway, not magento cache.

but if you need to see some real speed - use Turpentine Varnish Cache...

Related Topic