4 second TTFB. Any ideas?

Hi guys, I run a community site based on Wordpress and Buddypress.

I’m on a semi-dedicated server and have never really ran speed tests before.

I have done as one page in particular was running slowly, but I have noticed that TTFB on nearly every page is very slow.

Always in the region of 2.5 to 2 seconds.

This page on this test has a TTFB of 3 seconds +.


Database queries on the homepage run at about 252 queries which can take 1.3 - 1.5 seconds, where on the page in the test above only has 180 queries yet runs at 4 seconds to complete.

Could someone take a look at the results and tell me if it’s an issue with the way my site is setup, or is this more server side that my host could deal with?

Any advice would be great!

Ross :slight_smile:

The WebPagetest tests are pretty useless for debugging first-byte time problems (other than letting you know how long it takes).

If you install a debug queries plugin you should be able to see how long each individual query is taking and see if there is a particularly bad offender.

I haven’t had a chance to try it out yet, but this could help as well: http://wordpress.org/extend/plugins/p3-profiler/

If you’re willing to dive further in, you could install New Relic which would give you all sorts of useful and actionable information about the back-end performance.

In addition to what Patrick mentioned, there are a couple more things that affect the TTFB numbers. The connection type you choose matters. DSL typically results in TTFB numbers a couple tenths of a second slower than FIOS, for example. Then the location of the test server vs your web server matters a lot.

Beyond that, a bulk of the slowness is surely due to poor server response times. This is going to take some measurements and testing on your end to figure out.

By the way, once you start following the general advice – setting expires headers, creating css sprites, combining js files when possible, etc then not only will your site speed up but it should reduce server load as well. And if you have a busy site, then that in turn may actually improve your TTFB.