WebPagetest Forums
ttfb very high . 5 seconds on average! - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: ttfb very high . 5 seconds on average! (/showthread.php?tid=11216)



ttfb very high . 5 seconds on average! - thefed17 - 06-12-2012 01:52 PM

http://www.webpagetest.org/result/120612_7F_4G5/

Bluehost shared, using cloudfare and w3tc

any ideas?


RE: ttfb very high . 5 seconds on average! - pmeenan - 06-13-2012 12:10 AM

For starters, test the page with www in front so you don't have to pay the penalty twice (including the redirect). If your redirect is currently being done by wordpress I recommend making it part of your .htaccess so Apache can do the redirect without having to run all of the wordpress code (should reduce the redirect time to a few hundred ms at most).

To figure out what is causing the slow TTFB for the actual page you can turn on debugging in W3TC and look at the page source. At the end of the HTML there will be comments that tell you how long the database queries took, if the page was able to be served from cache, etc.


RE: ttfb very high . 5 seconds on average! - thefed17 - 06-13-2012 05:07 PM

So , here it is:

<!-- W3 Total Cache: Page cache debug info:
Engine: disk: enhanced
Cache key: _index.html
Caching: disabled
Reject reason: User is logged in
Status: not cached
Creation Time: 1.279s
Header info:
X-CF-Powered-By: WP 1.3.5
X-Pingback: http://www.ohiofamilyguide.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Wed, 13 Jun 2012 07:02:44 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
X-Powered-By: W3 Total Cache/0.9.2.4
Link: <http://wp.me/P2vAle-I>; rel=shortlink

<!-- W3 Total Cache: Db cache debug info:
Engine: disk: basic
Total queries: 85
Cached queries: 0
Total query time: 0.0315


<!-- W3 Total Cache: Object Cache debug info:
Engine: disk: basic
Caching: enabled
Total calls: 2412
Cache hits: 2404
Cache misses: 8
Total time: 0.0837


Whats that tell me?

I also just added the redirect to htaccess.... not much better...
btw i switched page caching from enhanced to basic just to see f something was off in w3tc
...no difference


RE: ttfb very high . 5 seconds on average! - pmeenan - 06-13-2012 10:57 PM

Try logging out or using a browser in incogneto mode and grabbing the debug information again. W3TC bypasses the caching for logged-in users so the debug information isn't useful in this case:

Code:
Caching: disabled
Reject reason: User is logged in
Status: not cached

Interestingly, W3TC sees that it took 1.3 seconds to generate the page but only 31ms was spent on database queries and 83ms on object access. That means there's something else really expensive going on (which is pretty unusual).

Can you try disabling all of the plugins you have installed and see how that changes things? If it improves substantially then it's a matter of turning them on one at a time to see where the pain is. If not then it's either in the template code itself or in the server configuration for PHP (less likely).

It kind of looks like there may be a plugin that is making calls to an external service and that is adding to the time (possibly for Spam checking or something like that).


RE: ttfb very high . 5 seconds on average! - thefed17 - 06-14-2012 12:08 PM

<!-- W3 Total Cache: Page cache debug info:
Engine: disk: enhanced
Cache key: _index.html_gzip
Caching: enabled
Status: not cached
Creation Time: 1.350s
Header info:
X-CF-Powered-By: WP 1.3.5
X-Pingback: http://www.ohiofamilyguide.com/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Link: <http://wp.me/P2vAle-I>; rel=shortlink
Last-Modified: Thu, 14 Jun 2012 02:04:12 GMT
Vary: Accept-Encoding, Cookie
Expires: Thu, 14 Jun 2012 03:04:12 GMT
Pragma: public
Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
Etag: cb9a6ffc94080b6b3233da0073acadb7
X-Powered-By: W3 Total Cache/0.9.2.4
Content-Encoding: gzip
-->

<!-- W3 Total Cache: Object Cache debug info:
Engine: disk: basic
Caching: enabled
Total calls: 2258
Cache hits: 2251
Cache misses: 7
Total time: 0.0760




<!-- W3 Total Cache: Minify debug info:
Engine: disk: basic
Theme: f575e
Template: page


RE: ttfb very high . 5 seconds on average! - thefed17 - 06-14-2012 02:57 PM

SO I deactivated a bunch of plugins...logged out...logged in...tried 20 ways...and nothing.

Now though, randomly, the numbers are much better. With an overall load time of 3.7/1.6 1st/2nd, and ttfb of .32/.33

If I test again during the day and have a similar result - perhaps it is just my host (bluehost)?

Also, if I have a setting on w3tc wrong, could it be re-building the cache too often, affecting load times? which setting should I look at to be surE??


RE: ttfb very high . 5 seconds on average! - pmeenan - 06-15-2012 01:16 AM

It's probably not a frequency of rebuild problem. It's very likely a function of being on slow shared hosting and variable performance for some aspects of the server (either filesystem or database access). From the looks of things in the debug logs, the database looked to be doing just fine.

It's unfortunate but a lot of the shared hosting providers are very oversubscribed and these are actually faster than a lot that I have seen (I have seen TTFB's of > 20 seconds on some of them).