Current time: 07-22-2019, 06:58 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Huge first time to bytes
08-12-2011, 12:32 AM
Post: #1
Huge first time to bytes
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?
Find all posts by this user
Quote this message in a reply
08-12-2011, 10:17 AM
Post: #2
RE: Huge first time to bytes
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-13-2011, 12:40 AM
Post: #3
RE: Huge first time to bytes
(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!
Find all posts by this user
Quote this message in a reply
08-13-2011, 01:15 AM
Post: #4
RE: Huge first time to bytes
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
Visit this user's website Find all posts by this user
Quote this message in a reply
10-11-2011, 07:51 AM
Post: #5
RE: Huge first time to bytes
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.
Find all posts by this user
Quote this message in a reply
10-12-2011, 01:32 AM
Post: #6
RE: Huge first time to bytes
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2011, 02:28 AM
Post: #7
RE: Huge first time to bytes
(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.


Attached File(s) Image(s)
   
Find all posts by this user
Quote this message in a reply
10-12-2011, 02:50 AM
Post: #8
RE: Huge first time to bytes
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-12-2011, 04:15 AM
Post: #9
RE: Huge first time to bytes
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.
Find all posts by this user
Quote this message in a reply
10-12-2011, 04:57 AM
Post: #10
RE: Huge first time to bytes
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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