Current time: 08-24-2019, 01:43 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help needed regarding Time to First Byte!
06-03-2014, 08:57 PM
Post: #1
Help needed regarding Time to First Byte!
Hello,

After spending some time reading documentation and speed optimization tips I managed to improve the site loading time. Unfortunately, it seems like I`m stuck at this point, where I don`t know what else I could do in order to reduce the Time to First Byte time. Here are my last test results:
http://www.webpagetest.org/result/140603...1/details/
The website is custom php with a small MySql database associated. I even generated static index.html page for testing in order to eliminate the concerns related to MySql queries, but I didn`t notice any improvements regarding TTFB. The website is hosted on a reseller package at Hostgator.
I kindly ask for an expert opinion regarding this matter. Basically, I would like to know what is the root cause of this problem: the hosting package or the website code? Any help / advice is highly appreciated!

Thank you in advance,
Bogdan
Find all posts by this user
Quote this message in a reply
06-04-2014, 04:09 AM
Post: #2
RE: Help needed regarding Time to First Byte!
The report clearly shows there was a long delay in DNS resolution, which took about 2.2 seconds when you ran this. Today I checked DNS resolution using a number of tools and there are is no evidence of slowness.

I generated a new report today and to looks much better: http://www.webpagetest.org/result/140603...e7ba888de/

All you need to do now is work on better image optimization and perhaps use a CDN to deliver the static assets and you'll be green all over. Smile
Find all posts by this user
Quote this message in a reply
06-05-2014, 03:18 PM
Post: #3
RE: Help needed regarding Time to First Byte!
Hi butifarra,

Thanks for sharing your thoughts regarding my problem. Regarding the DNS resolution I also got different values when testing several times, but what is really my concern is the TTFB - in the test you`ve made it has the following value Time to First Byte: 289 ms. No matter how many times I repeat the test, the TTFB is always greater than 200 ms - my purpose is to decrease it under 200 ms. I also tried the CloudFare CDN (the free version in my cpanel) but didn`t notice any major improvements. On the other hand, I saw websites without CDN which have really good TTFB values (beyond 200ms). Regarding the image optimization, all the images on my home page have been already reduced progressively, and I couldn`t see what else I could do here. Is there any way to find out if the problem is related to the hosting services?
Find all posts by this user
Quote this message in a reply
06-06-2014, 05:47 PM
Post: #4
RE: Help needed regarding Time to First Byte!
Hi again,

Just for the simplicity sake I`ve setup a similar static generated html test page on other domain hosted on the same reseller account, which has also activated the cloudfare. Here are the results:
http://www.webpagetest.org/result/140606...1/details/
As you can see, the TTFB seems to be the only issue here. Any ideas what is wrong? Anyone?

Thank you!
Find all posts by this user
Quote this message in a reply
06-07-2014, 12:23 AM
Post: #5
RE: Help needed regarding Time to First Byte!
Is it on a dedicated host or a shared host? Solving TTFB issues is going to be server configuration and code and if it's on a shared host both are largely going to be out of your control.

You should try testing direct to the origin server without cloudflare enabled first as that will eliminate an additional variable and then test with cloudflare once the server-direct performance is good (unless you make the HTML cacheable, cloudflare will only add to the TTFB and can't make it faster than the server itself).

Since the TTFB is slow for even a static HTML file it points to more of a web server config issue.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-07-2014, 06:44 AM
Post: #6
RE: Help needed regarding Time to First Byte!
Hi Patrick,

Thanks for your time to share some thoughts! The page is located on a reseller account on hostgator, so it's on a shared host. Whether I enable or not the cloudfare, I can`t see any improvement regarding TTFB. For example, now the cloudfare is disabled, and here are the test results:
http://www.webpagetest.org/result/140606_6P_W28/

Also, here are the settings in .htaccess file:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType application/x-shockwave-flash "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz|html|jpeg|jpg|png|ico|php|swf)$">
Header set Connection keep-alive
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>

Is there anything else I could do in order to improve TTFB? If this is because of some hosting related issues, is there any chance to find another shared hosting provider where TTFB value is smaller than 200 ms?

Regards,
Bogdan
Find all posts by this user
Quote this message in a reply
06-10-2014, 12:29 AM
Post: #7
RE: Help needed regarding Time to First Byte!
I'm actually amazed that you are getting TTFB times as fast as that on a shared host. Certainly on the cheaper shared hosts I wouldn't expect that you'd be able to do better. There are some SSD-based shared hosting services that may be able to but to get faster you're usually talking about at least a VPS (preferably SSD) where you have more control and where some level of resources for your site are actually guaranteed.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-10-2014, 05:13 PM
Post: #8
RE: Help needed regarding Time to First Byte!
Hi,

So there`s nothing I can do more regarding optimization as long as i`ll still use shared hosting services.. I thought this is where the CDN's should help, but it seems that I was wrong. So my only option is to switch to at least a VPS hosting service. Thanks for your reply..
Find all posts by this user
Quote this message in a reply
06-10-2014, 11:39 PM
Post: #9
RE: Help needed regarding Time to First Byte!
CDNs help in distributing static content (javascript, css, images) and some can do fancier things with rewriting the html itself to automatically optimize it but they all still depend on the origin server for the dynamic content (the base page HTML) which is basically the TTFB for the page load.

200ms is actually really good for a shared host and even better than I see on some VPS's. Assuming it's relatively consistent I'd spend more time focused on teh front end to see what else could be done to get the user experience delivered faster (which is where CDNs can help as well).
Visit this user's website Find all posts by this user
Quote this message in a reply
06-11-2014, 03:30 PM
Post: #10
RE: Help needed regarding Time to First Byte!
Hi Patrick,

I appreciate your suggestions. At least now I know what should be the real expectations from a shared host account Smile

Thanks again for your help, and have a nice day!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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