WebPagetest Forums
Huge first time to bytes - 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: Huge first time to bytes (/showthread.php?tid=1648)

Pages: 1 2


Huge first time to bytes - slsdoug - 08-12-2011 12:32 AM

I ran a test and the time to first bytes is about 3.5 seconds.

<a href="http://www.webpagetest.org/result/110811_EV_19W91/1/details/">test results</a>

Any reason why?


RE: Huge first time to bytes - pmeenan - 08-12-2011 10:17 AM

Looks like you're on WordPress. it's not uncommon to see really long first byte times, particularly if you are on shared hosting. It's largely a database performance issue but the most common way to fix it is to install the W3 Total Cache plugin and turn on page caching. That will cache the assembled html on the server so it doesn't have to query the database to assemble the page for every visitor.


RE: Huge first time to bytes - slsdoug - 08-13-2011 12:40 AM

(08-12-2011 10:17 AM)pmeenan Wrote:  Looks like you're on WordPress. it's not uncommon to see really long first byte times, particularly if you are on shared hosting. It's largely a database performance issue but the most common way to fix it is to install the W3 Total Cache plugin and turn on page caching. That will cache the assembled html on the server so it doesn't have to query the database to assemble the page for every visitor.
I ran the 5 test and FTTB went up as far as 8 seconds.
Thanks, Pat. It is a ded. server and is heavily modified WordPress. I'll try W3TC. I'm trying to find extensive documentation on it that explains it as IT is peculiar on adding plug-ins.

BTW, I used WePageTest on another site and found by changing some code to JavaScript (an ad) I brought down FTTB by 3 seconds. This site is fantastic!


RE: Huge first time to bytes - pmeenan - 08-13-2011 01:15 AM

If it's dedicated, make sure you have APC installed and when you try W3TC use it in APC mode (and enable page, database and object caching). I got my server response times down to 10ms on my test Wordpress site with that config.

Thanks,

-Pat


RE: Huge first time to bytes - Rick - 10-11-2011 07:51 AM

Hi Pat,

Digging up an old thread, but as I have a similar time to first byte and a Wiredtree hosting account I thought it best to keep the query's together.

I have read many threads here on the forum regarding CDM's and W3TC etc. but as many of my websites are affiliate sites that pull the content dynamically (real time), caching isn't an option.

Have you any advice in how best to reduce the time to first byte on WordPress websites that have dynamic content at all?

Thank you,

Rick.


RE: Huge first time to bytes - pmeenan - 10-12-2011 01:32 AM

The best option is some good old-fashioned profiling to see where the time is going. There is a Debug Queries plugin or W3TC in non-caching mode can also dump a whole lot of information about each query and how long it took. You might be able to improve things by adding indexes and tuning the database (or eliminating some of the really expensive queries).

Do they pull the content "real time" from your database or from another source? That would be another place where time could be going.


RE: Huge first time to bytes - Rick - 10-12-2011 02:28 AM

(10-12-2011 01:32 AM)pmeenan Wrote:  The best option is some good old-fashioned profiling to see where the time is going. There is a Debug Queries plugin or W3TC in non-caching mode can also dump a whole lot of information about each query and how long it took. You might be able to improve things by adding indexes and tuning the database (or eliminating some of the really expensive queries).

Do they pull the content "real time" from your database or from another source? That would be another place where time could be going.
Thanks for the information.

The affiliate sites in question pull content from another source rather than a local database, however this doesn't appear to be the problem (of course occasionally there are problems) - it's the time to first byte that's the main issue.

I've attached a typical waterfall view so you can hopefully see the problem.

Will the advice given above (Debug Queries plugin or W3TC in non-caching mode) still help me with the TTFB problem as it's not a database issue, or are there other things I can try to reduce the load time?

Thanks again for your help with this. As you can see I'm at a loss how to reduce this initial load time (in fact I don't know where to start!) so any pointers would be appreciated,

Rick.


RE: Huge first time to bytes - pmeenan - 10-12-2011 02:50 AM

But do the affiliate sites pull content on the back-end (directly from your server) to build the page? If so then you server is making calls out to different services and that is included in the first byte time.


RE: Huge first time to bytes - Rick - 10-12-2011 04:15 AM

Ah, I see. Is there a way to know/monitor these calls to see whether they are part of the first byte time? I have various affiliate sites but I presume the Wordpress sites running affiliate plugins (such as the PhpBay plugin) would be easiest to monitor initially..

Thanks again Pat.


RE: Huge first time to bytes - pmeenan - 10-12-2011 04:57 AM

The only way I know of would be to instrument the page code (or plugin code) to log the times for the calls. The other thing you could do would be to try turning them on and off and see what the impact is but that's quite a bit more intrusive.