Current time: 12-14-2017, 12:55 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slow website; what's your take on this?
04-01-2014, 02:55 AM
Post: #1
Slow website; what's your take on this?
Hi,

I'm dissatisfied with my website performance, especially the first view time:

Pingdom:
7.21s: http://tools.pingdom.com/fpt/#!/dixuX9/w...ngcode.net
2.25s: http://tools.pingdom.com/fpt/#!/dFt5bX/w...ngcode.net

Webpagetest:
From Amsterdam (as baseline, since the webserver is located in the same county), first views 4.1, 1.5, and 1.6 seconds: http://www.webpagetest.org/result/140329_KC_78M/

From Moscow: first views 6.4, 2.8, and 3.1 seconds: http://www.webpagetest.org/result/140329_YY_707/

From Tokyo: first views 4.7, 1.2, and 1.3 seconds: http://www.webpagetest.org/result/140329_CJ_709/

Pingdom RUM:
These are the average page load times for the last two days according to Pingdom's RUM:

[Image: pingdomRUMdata.png]


* * * *


Because CloudFlare caches content at data centres after being request by a visitor (if it is not already cached), a somewhat higher first view time is expected I guess. But since I've set CloudFlare to cache everything for 1 week (Edge cache expire TTL), I'd would expect that the subsequent load times were much lower, especially since my website is only 290kb big.

After all, in case of the Moscow test, it will probably not take 3 seconds to serve a cached HTML file of that size from CloudFlare's Warsaw data centre to Moscow. So something along the way is probably going wrong.

From my side, I've done already the things that I'm aware of to increase the speed. The WordPress website uses the WP-Super Cache plugin which preloads all webpages into static HTML content. Furthermore, I've removed all redundant plugins, and replaced slow plugins by quicker, more lightweight versions. According to the WordPress P3 performance profiler plugin, the site load time is 0.641 seconds.

If I look at Webpagetest's waterfalls, my novice mind gets the impression that something is wrong with the communication between CloudFlare and the original webserver, since most of the worse performance seems to be due to these two waiting on each other.

I've already asked my hosting provider and CloudFlare themselves why the first view times, and especially the TTFBs, are so high, but so far I've not gotten a clear answer -- though I may have asked the wrong questions.



My question:
Do you guys might have an idea how I can improve the website speed?


Thanks in advance for any insights.

Note: The browser cache is set deliberately to 1 day for now, since I'm working on the layout, so that gives a lower performance grade in the test reports.
Find all posts by this user
Quote this message in a reply
04-01-2014, 03:56 PM
Post: #2
RE: Slow website; what's your take on this?
JMTC, that sounds weird, when you ask why it is slow http://screencast.com/t/dYoLTY6Lgp


you show a waterfall for Russia and Tokyo, of course, it must take lots of time for the bytes to fly almost half the world from USA server to RUSSIA or TOKYO servers )))

As for generic performance there is much room for improvements :


1) I would add DNS prefetch for these guys ajax.cloudflare.com, http://themes.googleusercontent.com, http://www.google-analytics.com/, http://rum-collector.pingdom.net to avoid dns looksups or I harder way put your fonts and scripts in your main root site

2 - I would inline couple of your images in CSS - base 64

3 - I would think one more time if you need custom fonts, if need, then remove glyphs and use this service http://www.fontsquirrel.com/tools/webfont-generator

some dirty thing)
4 - I would remove Accept encoding line, cookie and referral from your Header request
Find all posts by this user
Quote this message in a reply
04-01-2014, 05:58 PM (This post was last modified: 04-01-2014 06:12 PM by JMTC.)
Post: #3
RE: Slow website; what's your take on this?
(04-01-2014 03:56 PM)Funkerman88 Wrote:  JMTC, that sounds weird, when you ask why it is slow http://screencast.com/t/dYoLTY6Lgp

you show a waterfall for Russia and Tokyo, of course, it must take lots of time for the bytes to fly almost half the world from USA server to RUSSIA or TOKYO servers )))
That also surprised me when I looked into the waterfalls, but discarded it since, according to IPLocationfinder, that IP is based in San Francisco, California. Since Cloudflare has no data centre in that city*, while its offices are in San Francisco, I thought that was an "administrative IP" from CloudFlare (if such a thing exists).

Does that reasoning make sense or should the IP address from CloudFlare's data centre show up in the test results?

*: There is a data centre in San Jose, which is practically a neighbour of San Francisco. Don't know if that counts?

(04-01-2014 03:56 PM)Funkerman88 Wrote:  As for generic performance there is much room for improvements :

1) I would add DNS prefetch for these guys ajax.cloudflare.com, http://themes.googleusercontent.com, http://www.google-analytics.com/, http://rum-collector.pingdom.net to avoid dns looksups or I harder way put your fonts and scripts in your main root site

2 - I would inline couple of your images in CSS - base 64

3 - I would think one more time if you need custom fonts, if need, then remove glyphs and use this service http://www.fontsquirrel.com/tools/webfont-generator

some dirty thing)
4 - I would remove Accept encoding line, cookie and referral from your Header request
Thank you for these suggestions! Smile I'll work on implementing these later this week.
Find all posts by this user
Quote this message in a reply
04-02-2014, 09:59 PM (This post was last modified: 04-02-2014 10:01 PM by JMTC.)
Post: #4
RE: Slow website; what's your take on this?
(04-01-2014 05:58 PM)JMTC Wrote:  
(04-01-2014 03:56 PM)Funkerman88 Wrote:  JMTC, that sounds weird, when you ask why it is slow http://screencast.com/t/dYoLTY6Lgp

you show a waterfall for Russia and Tokyo, of course, it must take lots of time for the bytes to fly almost half the world from USA server to RUSSIA or TOKYO servers )))
That also surprised me when I looked into the waterfalls, but discarded it since, according to IPLocationfinder, that IP is based in San Francisco, California. Since Cloudflare has no data centre in that city*, while its offices are in San Francisco, I thought that was an "administrative IP" from CloudFlare (if such a thing exists).

Does that reasoning make sense or should the IP address from CloudFlare's data centre show up in the test results?
I contacted CloudFlare support regarding this, and they directed me to the following help page: What do the CloudFlare location codes mean?

If I do a traceroute to the website from my location, the IP at which the traceroute ends is an California IP address. But if I follow the approach outlined in that help article, it shows that I'm redirected to the most nearby European data centre. So that seems to work correctly.

The displayed IP address in Webpagetest's results, when one is using CloudFlare, therefore do not seem to reflect the CDN data centre that was used.
Find all posts by this user
Quote this message in a reply
04-03-2014, 12:30 PM
Post: #5
RE: Slow website; what's your take on this?
Have you set super cache to preload the site in the preload tab?
Visit this user's website Find all posts by this user
Quote this message in a reply
04-05-2014, 03:45 PM (This post was last modified: 04-05-2014 03:59 PM by JMTC.)
Post: #6
RE: Slow website; what's your take on this?
(04-03-2014 12:30 PM)clubberz Wrote:  Have you set super cache to preload the site in the preload tab?
Thanks for responding. Yes, I have, automatically pre-loading every 24 hours.

* * *

I've made the following changes to the website this week:
  • Removed Google font;
  • Replaced Google Analytics script with the asynchronous one;
  • Added DNS prefetch;
  • Displayed often requested images inline.

Repeat views are now around half a second, but the first view can still be above 3 seconds:
Moscow: http://www.webpagetest.org/result/140405_9X_49R/
Chicago: http://www.webpagetest.org/result/140405_9R_49T/
Amsterdam: http://www.webpagetest.org/result/140405_SM_49J/
Amsterdam: http://tools.pingdom.com/fpt/#!/eDVFA6/h...ngcode.net

Since a lot of time is wasted with DNS lookup and TTFB, I asked Cloudflare what I could do about that. They referred me to their blog message which said TTFB is meaningless and also pointed to my hosting.

However, when I asked my hosting provider if there were any issues or performance bottlenecks on the shared server, they brushed that off as causing these slow first view times.

Luckily, the first view times have become better so it's not very troubling any more. PingDom RUM data is still somewhat troubling (for example, average page load from Canada above 6 seconds), so if anyone has a suggestion. Smile
Find all posts by this user
Quote this message in a reply
04-06-2014, 01:35 AM (This post was last modified: 04-06-2014 09:13 AM by Anton Chigurh.)
Post: #7
RE: Slow website; what's your take on this?
(04-05-2014 03:45 PM)JMTC Wrote:  Since a lot of time is wasted with DNS lookup and TTFB, I asked Cloudflare what I could do about that. They referred me to their blog message which said TTFB is meaningless and also pointed to my hosting.
That's their canned response to this and it is a lie. CF nor any other CDN can do anything at all to improve TTFB. I used CF for over two years and it did not improve speed, security or anything at all really. I did not get TTFB improvement until I ditched CF and went to work seriously this time, on optimization. And then?

Quote:However, when I asked my hosting provider if there were any issues or performance bottlenecks on the shared server, they brushed that off as causing these slow first view times.
What finally solved this for me was being able to convince the host it was them and their oversold, overcrowded shared machine, not me. When they finally seriously investigated they found i was on a really old, tired machine and they moved me to what they said was a "newer machine" and BAM, TTFB is a A grade every time for me now. Your site loads only just over 230kb on a browser, with only 17 requests. There is no way your site is the TTFB problem.

Slow first byte time is going to be shared hosting every time, and is going to be a oversold overcrowded machine at the host, every time. AND IT IS SIMPLE TO PROVE to your host - simply create a simple HTML page with nothing but the words "Hello There" and watch the TTFB STILL be bad for testing just that page!

All that said, try this for getting rid of that F grade for leverage browser caching:

In .htaccess add:
PHP Code:
<IfModule mod_expires.c>
    
ExpiresActive On
    ExpiresByType text
/css A2628000
    ExpiresByType text
/richtext A3600
    ExpiresByType image
/svg+xml A3600
    ExpiresByType text
/plain A3600
    ExpiresByType text
/xsd A3600
    ExpiresByType text
/xsl A3600
    ExpiresByType video
/asf A2628000
    ExpiresByType video
/avi A2628000
    ExpiresByType image
/bmp A2628000
    ExpiresByType application
/java A2628000
    ExpiresByType video
/divx A2628000
    ExpiresByType application
/msword A2628000
    ExpiresByType application
/x-msdownload A2628000
    ExpiresByType image
/gif A2628000
    ExpiresByType application
/x-gzip A2628000
    ExpiresByType image
/x-icon A2628000
    ExpiresByType image
/jpeg A2628000
    ExpiresByType application
/vnd.ms-access A2628000
    ExpiresByType audio
/midi A2628000
    ExpiresByType video
/quicktime A2628000
    ExpiresByType audio
/mpeg A2628000
    ExpiresByType video
/mp4 A2628000
    ExpiresByType video
/mpeg A2628000
    ExpiresByType application
/javascript A2628000
    ExpiresByType application
/x-javascript A2628000
    ExpiresByType application
/vnd.ms-project A2628000
    ExpiresByType application
/vnd.oasis.opendocument.database A2628000
    ExpiresByType application
/vnd.oasis.opendocument.chart A2628000
    ExpiresByType application
/vnd.oasis.opendocument.formula A2628000
    ExpiresByType application
/vnd.oasis.opendocument.graphics A2628000
    ExpiresByType application
/vnd.oasis.opendocument.presentation A2628000
    ExpiresByType application
/vnd.oasis.opendocument.spreadsheet A2628000
    ExpiresByType application
/vnd.oasis.opendocument.text A2628000
    ExpiresByType audio
/ogg A2628000
    ExpiresByType application
/pdf A2628000
    ExpiresByType image
/png A2628000
    ExpiresByType application
/vnd.ms-powerpoint A2628000
    ExpiresByType audio
/x-realaudio A2628000
    ExpiresByType application
/x-shockwave-flash A2628000
    ExpiresByType application
/x-tar A2628000
    ExpiresByType image
/tiff A2628000
    ExpiresByType audio
/wav A2628000
    ExpiresByType audio
/wma A2628000
    ExpiresByType application
/vnd.ms-write A2628000
    ExpiresByType application
/vnd.ms-excel A2628000
    ExpiresByType application
/zip A2628000
</IfModule

You're actually looking pretty darn good right here, in this test using IE 10. Only a couple of F grades, easy fixes.

http://www.webpagetest.org/result/140405_ZH_E8R/

Fix that F grade for "compress images" by uploading this image I am providing, to overwrite the one that's in your files here:
PHP Code:
http://www.tradingcode.net/wp-content/uploads/tnMouseAndKeyboardKeys.jpg 

[Image: ?di=VTQX]

Rename it to match, upload to overwrite. I compressed it for you, shaving off 14kb.
Find all posts by this user
Quote this message in a reply
04-06-2014, 12:25 PM (This post was last modified: 04-06-2014 12:26 PM by GreenGecko.)
Post: #8
RE: Slow website; what's your take on this?
Given that the page is only 200kb in size - great! - I'd dump cloudflare. If you want to use a CDN, the use something like maxcdn... at least if the ttfb is still slow, *you* can do something about it!

@Anton said it all, really. IMO CF is all marketing hype.

Steve
Find all posts by this user
Quote this message in a reply
04-06-2014, 07:09 PM
Post: #9
RE: Slow website; what's your take on this?
(04-06-2014 01:35 AM)Anton Chigurh Wrote:  That's their canned response to this and it is a lie. CF nor any other CDN can do anything at all to improve TTFB. I used CF for over two years and it did not improve speed, security or anything at all really. I did not get TTFB improvement until I ditched CF and went to work seriously this time, on optimization. And then?

(...)

You're actually looking pretty darn good right here, in this test using IE 10. Only a couple of F grades, easy fixes.

http://www.webpagetest.org/result/140405_ZH_E8R/
Thanks for your reply. I thought a CDN would make the website quicker since, after all, the geographic distance should be less for non-European visitors in my case.

I'm not sure if dropping CloudFlare in my situation is also the best idea, since the original webserver might not be quick enough. For example, if I disable CloudFlare the performance is much worse:

From Dulles: http://www.webpagetest.org/result/140406_45_5G8/
From Chicago: http://www.webpagetest.org/result/140406_TK_5KR/
From Moscow: http://www.webpagetest.org/result/140406_BE_5M0/

(04-06-2014 01:35 AM)Anton Chigurh Wrote:  (...) Your site loads only just over 230kb on a browser, with only 17 requests. There is no way your site is the TTFB problem.
Slow first byte time is going to be shared hosting every time, and is going to be a oversold overcrowded machine at the host, every time. AND IT IS SIMPLE TO PROVE to your host - simply create a simple HTML page with nothing but the words "Hello There" and watch the TTFB STILL be bad for testing just that page!

(...)

You're actually looking pretty darn good right here, in this test using IE 10.
Thanks for the TTFB measurement suggestion. With CloudFlare disabled:

From Dulles: http://www.webpagetest.org/result/140406_KG_5VP/
From Moscow: http://www.webpagetest.org/result/140406_PV_5V1/

(04-06-2014 01:35 AM)Anton Chigurh Wrote:  All that said, try this for getting rid of that F grade for leverage browser caching:

In .htaccess add:
Thank you; added to the file.

(04-06-2014 01:35 AM)Anton Chigurh Wrote:  Fix that F grade for "compress images" by uploading this image I am providing, to overwrite the one that's in your files here.
(...)
Rename it to match, upload to overwrite. I compressed it for you, shaving off 14kb.
Thanks; replaced.


(04-06-2014 12:25 PM)GreenGecko Wrote:  Given that the page is only 200kb in size - great! - I'd dump cloudflare. If you want to use a CDN, the use something like maxcdn... at least if the ttfb is still slow, *you* can do something about it!
Thanks for your reply. I looked into MaxCDN, but they do not, in comparison to CloudFlare and Incapsula, offer entire page caching (unless you're an enterprise).

Wouldn't that negatively impact the website speed for non-European visitors, since I have only a few small images and one css file that can be served by MaxCDN. The page itself would still need to be served from the webserver in Europe, giving slow DNS and TTFB times for non-European visitors?
Find all posts by this user
Quote this message in a reply
04-08-2014, 04:49 AM
Post: #10
RE: Slow website; what's your take on this?
Maybe you should dump Wordpress. I never used it, but your page is all text and there's no reason for 7.21s load time. Quick comparison: your site 19 request, size 281.3kB; our site 56 requests, size 632.3kB, yet our load time is 1.57s. I believe CDN for a page of just 281.3kB is really not needed. Just my two cents.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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