Hello,
After spending some time reading documentation and speed optimization tips I managed to improve the site loading time. Unfortunately, it seems like Im 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_H1_CZS/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
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_QD_954909a4fb52de082c7f0ede7ba888de/
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.
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 youve 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?
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_8H_7NS/1/details/
As you can see, the TTFB seems to be the only issue here. Any ideas what is wrong? Anyone?
Thank you!
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.
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:
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"
Header set Connection keep-alive
Header append Vary: Accept-Encoding
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
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.
Hi,
So theres 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…
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).
Hi Patrick,
I appreciate your suggestions. At least now I know what should be the real expectations from a shared host account
Thanks again for your help, and have a nice day!