Current time: 12-19-2017, 02:31 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very long time to first byte
03-22-2010, 05:47 AM
Post: #1
Very long time to first byte
One of the things I've been noticing about my web site (a wordpress blog) is that there's a very long lag between the initial DNS lookup and the start of the content download.

Results here: http://www.webpagetest.org/result/100321...1/details/

4772ms in this case! I notice similar results when tracking through pingdom. Yet when I run a tracert on my domain, everything seems pretty speedy.

Does anyone have any idea what's causing this initial lag? Is this a domain issue? Or are there other technical reasons at play? Thanks!
Find all posts by this user
Quote this message in a reply
03-22-2010, 06:16 AM
Post: #2
RE: Very long time to first byte
That's back-end server processing time (database queries, etc). It shows up a lot with wordpress-based sites. There are some plugins that eliminate it by caching the server-side HTML (in a smart way so it is flushed if the content changes). This is a fairly common one that also automates a bunch of other optimizations: http://wordpress.org/extend/plugins/w3-total-cache/

-Pat
Visit this user's website Find all posts by this user
Quote this message in a reply
03-22-2010, 07:07 AM
Post: #3
RE: Very long time to first byte
(03-22-2010 06:16 AM)pmeenan Wrote:  That's back-end server processing time (database queries, etc). It shows up a lot with wordpress-based sites. There are some plugins that eliminate it by caching the server-side HTML (in a smart way so it is flushed if the content changes). This is a fairly common one that also automates a bunch of other optimizations: http://wordpress.org/extend/plugins/w3-total-cache/

-Pat

Wow, thank you! At first glance, that seems to have done the trick:

http://www.webpagetest.org/result/100321...1/details/

I've been going nuts trying to figure out what was wrong for the past couple months, and thought my host was to blame, but it's great to know what the problem actually was. Thanks again for your help!
Find all posts by this user
Quote this message in a reply
03-22-2010, 10:10 AM
Post: #4
RE: Very long time to first byte
Very nice. If you want to get even faster the plugin should have settings that will enable the combining of some of those css and js files which would shave a few more seconds off but even without it that's a phenomenal win (one that should be easily visible when browsing the page).
Visit this user's website Find all posts by this user
Quote this message in a reply
04-02-2010, 02:59 PM
Post: #5
RE: Very long time to first byte
(03-22-2010 10:10 AM)pmeenan Wrote:  Very nice. If you want to get even faster the plugin should have settings that will enable the combining of some of those css and js files which would shave a few more seconds off but even without it that's a phenomenal win (one that should be easily visible when browsing the page).

Hmm, I'm not sure if you'd have any insight to this, but any thoughts would be much appreciated.

The cache plugin seems to be working well from an end user standpoint. Site loads quick when I visit with cache/cookies cleared. Test results are quick on webpagetest. Reponse times have dropped significantly when testing via site24x7.com.

But strangely response times when testing on pingdom have actually increased significantly from ~2500ms to ~6000ms (averages around 740ms over the past week when checking on site24x7.com). And the time spent downloading a page in Google webmaster tools has also increased significantly, from what was around 1,000ms to somewhere in the 2,500-5,000 range over the past week or so.

Do you have any idea why this might be occurring? Thanks a bunch.
Find all posts by this user
Quote this message in a reply
04-02-2010, 09:17 PM
Post: #6
RE: Very long time to first byte
Pingdom should be with a "clear cache" as well AFAIK. Have you tried with different browsers to see if there is something that is specific to different user agent strings?

Otherwise it gets more complicated and you have to actually optimize the wordpress site manually (or try a different accelerator plugin).

Start by figuring out what the slower plugins are that you have installed (on a dev siite, disable all of them and check performance - even though the page will probably not be functional and re-enable them in batches). It also means walking through the template php code and figuring out what it is doing. You might also need to instrument and time the database calls in case that is where the slowness is coming from (usually it is the sheer number of them but if each is running slowly you may need to ping your hosting provider).
Visit this user's website Find all posts by this user
Quote this message in a reply
04-03-2010, 01:44 PM
Post: #7
RE: Very long time to first byte
Yeah, I've tried it on different browsers and they all seem to load the cache pages quickly. I was surprised about Pingdom, because I figured it'd be in the same vein as site24x7. Less so about Google, since I knew the W3TC plugin excludes the spider agents. But I think I'll let it serve cache pages to the spiders for now until I figure out what's going on.

(04-02-2010 09:17 PM)pmeenan Wrote:  Start by figuring out what the slower plugins are that you have installed (on a dev siite, disable all of them and check performance - even though the page will probably not be functional and re-enable them in batches). It also means walking through the template php code and figuring out what it is doing. You might also need to instrument and time the database calls in case that is where the slowness is coming from (usually it is the sheer number of them but if each is running slowly you may need to ping your hosting provider).

Heh, I was afraid you'd say that. Do you have any recommendations on tools to use to time the database calls? The only thing I've been able to find is a php code that shows the total number of queries and total response time, but I haven't been able to find something that shows the load time for each individual query.

Thanks again.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)