We have a fairly decent dedicated server but we are having issues with the time to first byte being a bit slow (400-700ms) for our magento site. response time for a test php script and a wordpress site on the same domain is alot faster (200ms or less). The host company are saying that the server load is low and its poor coding by the developer ( the developer blames the hosting). I had someone with expertise look at the server setup and the site and bar few tweets to some server settings they agreed with the hosting company that the issue is with poor codeing. He pointed to this guide on how to find bottle necks in the code:
So following that guide I got this result( sorted in order of time and I cut off any under 0.01)
Note it took index.php 559ms to be received for this result
At this point I not sure is these times are normal or not, is there any thing I can compare this too?
TTFB needs to be in the 300-500ms range (sub 400ms) without full page cache and 1-2s page loads, you would be surprised even the certified partners don't have this. You lose 40% of visitors above 3s. Every business is different, so you can fix some coding with better hosting and you can fix some hosting with better coding, but to be in the ideal range you need both working in harmony. Very few sites ~5% achieve the ideal ttfb and page loads speeds without a full page cache.
Are you using a Full Page Cache? php-fpm with OpCode Caching? Is the Magento Cache and FPC in something like Redis? Are you using Varnish?
Just a few questions about things that can help with TTFB. You can use the Magento Profiler, or try using the AO Profiler as another approach. You can also use something like Xdebug.
Another thing to try is in a dev instance try disabling some modules and see if any of them cause the TTFB to improve drastically. Or change the theme and see if that makes a big difference. Hopefully you can narrow down the culprit.
You mentioned Zend Cache, but are you using a Magento Full Page Cache Plugin like Lesti, or a Varnsh based cache such as Turpentine? Once a page is cached by one of these type of extensions, its TTFB should drop considerably.
Also try loading the Magento cache and sessions in something like Redis for faster rendering.
Yeah its just the standard Full Page Cache that comes with magento. Is there a particular one you would recommend? I was looking at Turpentine but one of the reviews for it says it does not work past magento 1.7 ( we are on 1.9)
"Also try loading the Magento cache and sessions in something like Redis for faster rendering" I don't know anything about this, can you link to some documentation about it?
That is the Magento cache, which is not the Full Page Cache. If you are loading the cache from the filesystem instead of memory like Redis, this can happen, yes, as the cache fills up and has more files/data in it. Especially if the hosting account you're on is not truly optimized for I/O and overloads the server a bit (or a lot).