Web server "Wait" time - troubleshooting thoughts

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Patrick

Administrator
Staff member
Dec 21, 2010
12,514
5,807
113
Hey all - I need some help making STH faster -

I periodically used Pingdom's website speed test tool as a sanity check to performance I am seeing.

This is Jan 16, 2013: Website speed test
This is Today: Website speed test

Bottom line the initial request has a 682ms wait today vs what used to be 10ms

As a sanity check looking at data from when it was using Proxmox/ KVM as the platform it was 400ms to 700ms stuck in "wait"

The configuration for those wondering is nginx as the web server with a locally hosted DB all sitting on a SSD.

If anyone has thoughts regarding how to troubleshoot this one, I would greatly appreciate it.
 

MiniKnight

Well-Known Member
Mar 30, 2012
3,073
974
113
NYC
Here's what I find strange - that's a 60x bump in wait time. Usually that is caused by php processing. In theory you have moved to faster processors and more RAM so you would think that, with caching, things would be much faster.
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,514
5,807
113
Both are with nginx and same behavior when the VM was running with linux virtualization and Hyper-V virtualization.
 

OBasel

Active Member
Dec 28, 2010
494
62
28
Seems like there is a call to: assets.pinterest.com/js/pinit_main.js that is slow.

Also--- you are back to slower load times
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,514
5,807
113
Main page front page is now down to a TTFB of 100-150ms! Total loads went from 3.4-3.6s down to about 1.2-1.4s!

Pretty darn good!
 

OBasel

Active Member
Dec 28, 2010
494
62
28
Patrick: Have you tried turning on APC opcode? Helped a lot on a small VPS i'm using.
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,514
5,807
113
STH has been suing APC for some time now, enough that it has been tuned. For example, after some testing the 64MB limit was getting reached and the cache was dumping. Turns out the site needs slightly more cache room. I cleared the cache when I woke up this morning just to get an idea of hits v. misses today - results are about as good as I could want:
 

parawizard

New Member
Jan 28, 2014
21
0
1
This is what I am seeing with firebug.



The forums are loading much quicker.



Looks like something is slowing down the page generation on the server side. With PHP you can simply copy one of the pages that is loading slow. Insert the microtime function at the top then call it again and echo off the difference all throughout the page. If you see a large interval between two echos the problem lies in there.
 
Last edited:

Patrick

Administrator
Staff member
Dec 21, 2010
12,514
5,807
113
Thanks all. The WP install seems to just need page caching at this point. Turning that on in W3TC on wordpress is yielding that 0.5s+ improvement on the TTFB figures. Of course, to make things interesting, if it is turned on it starts randomly generating white pages on the production site. The http://servethehome.com to http://www.servethehome.com seems to break.
 

Patrick

Administrator
Staff member
Dec 21, 2010
12,514
5,807
113
Are you sure its a caching problem? Caching is still saving me 75-100ms on the load if I turn it off and on.

Have you tried adding microtime to a Wordpress page to see where the bulk of the 700ms is?

Timing WordPress Requests | Roots
Yes. Need to download a fresh VM copy this weekend so I can test locally on a more current snapshot.

When I enable page cache and front page cache the front page wait time goes instantly from 600+ ms to ~50ms so I know that is effective. I am half considering trying to install varnish instead and just stop dealing with W3TC.
 

parawizard

New Member
Jan 28, 2014
21
0
1
Yes. Need to download a fresh VM copy this weekend so I can test locally on a more current snapshot.

When I enable page cache and front page cache the front page wait time goes instantly from 600+ ms to ~50ms so I know that is effective. I am half considering trying to install varnish instead and just stop dealing with W3TC.
I get it now. The W3TC problem is very widespread on google hadn't seen it before. Looks like some people have fixed by extending the php memory limit and execution time. YMMV. Still poking around see if I can find something newer but switching cache plugins looks like it would do the job