wiki:LoadTimes

Version 9 (modified by chris, 5 years ago) (diff)

--

Site Load Times

This page is to document the time the site takes to load.

2011-07-05

Summary for the live server:

  • The front page, HTML only of the live site, not running varnish takes around 0.1 seconds to load
  • The front page of the live site, plus css / js / images etc takes over 30 seconds via pingdom

Issues for the live server:

  • ETags and one CSS expression

Summary for the dev server:

  • Very fast on port 80 via Varnish, less than two seconds for the page and all objects
  • Very slow for port 443, 7 seconds just for the HTML

Issues for the dev server:

  • Speed up port 443 accesses!
  • Etag and gzipping of js files

Detailed info follows:

Live Server

This is before Varnish has been deployed and also tests have only be done using http as https requests get a 302 redirect back to http.

apache bench

Requests were done from another machine in the same rack, 200 requests for the front page, 10 at a time, using http, this was done several times and the results below are for an average result, some were faster and some were slower, the first request took about 4 seconds and almost all the rest were less that 0.1 second:

ab -v 4 -n 200 -c 10 -H "Accept-Encoding: gzip" http://www.transitionnetwork.org/

LOG: Response code = 200
LOG: header received:
HTTP/1.1 200 OK
Date: Tue, 05 Jul 2011 12:02:58 GMT
Server: Apache
X-Drupal-Cache: HIT
Etag: "1309867375-0"
Cache-Control: public, max-age=0
Last-Modified: Tue, 05 Jul 2011 12:02:55 +0000
Expires: Sun, 11 Mar 1984 12:00:00 GMT
Vary: Cookie,Accept-Encoding
Content-Encoding: gzip
Content-Length: 7727
Connection: close
Content-Type: text/html; charset=utf-8

Time taken for tests:   5.131 seconds
Complete requests:      200

Percentage of the requests served within a certain time (ms)
  50%     57
  66%     66
  75%     74
  80%     77
  90%    100
  95%   4014
  98%   4019
  99%   4039
 100%   4050 (longest request)

YSlow

  • The page has a total of 29 HTTP requests and a total weight of 421.8K bytes with empty cache
  • This page has 3 external stylesheets. Try combining them into one.
  • This page has 17 external background images. Try combining them with CSS sprites.
  • There are a total of 1 CSS expression:
  • There are 27 components with misconfigured ETags (all css js and images)

pingdom

The test here will run for 30 secs max and it generally takes longer than that to load the front page, in part because (as far as I can see) pingdom loads all images referenced in the CSS even if the pages doesn't use them. Some stats:

  • Total objects: 76 (677.5 KB)
  • (X)HTML: 1 (32.8KB)
  • CSS: 3 (92.7KB)
  • Scripts: 1 (150.7KB)
  • Images: 71 (401.2KB)

Dev Server

Running Varnish on port 80 and apache on 443.

apache bench

On port 80, this is with the first hit being passed to apache:

ab -v 4 -n 200 -c 10 -H "Accept-Encoding: gzip" http://dev.transitionnetwork.org/

LOG: Response code = 200
LOG: header received:
HTTP/1.1 200 OK
Server: Apache
Cache-Control: public, max-age=3600
Last-Modified: Tue, 05 Jul 2011 12:51:05 +0000
Expires: Sun, 11 Mar 1984 12:00:00 GMT
Vary: Cookie,Accept-Encoding
ETag: "1309870265"
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Content-Length: 7353
Date: Tue, 05 Jul 2011 12:51:07 GMT
X-Varnish: 1553439536 1553439337
Age: 0
Via: 1.1 varnish
Connection: close
X-Varnish-Cache: HIT

Time taken for tests:   1.616 seconds
Complete requests:      200

Percentage of the requests served within a certain time (ms)
  50%      3
  66%      3
  75%      3
  80%      3
  90%      4
  95%      4
  98%      5
  99%   1412
 100%   1412 (longest request)

This is for subsequent requests which don't hit apache:

Time taken for tests:   0.149 seconds
Complete requests:      200

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      8
  80%      8
  90%      9
  95%      9
  98%     10
  99%     11
 100%     12 (longest request)

YSlow

pingdom

Load time between 1 and 1.5 seconds *total*!

  • Total objects: 72 (809.7 KB)
  • (X)HTML: 1 (31.4KB)
  • CSS: 3 (95.8KB)
  • Scripts: 1 (113.2KB)
  • Images: 61 (364.7KB)
  • Other: 6 (204.7KB)

However for HTTPS it times out before loading many objects:

curl

For port 80 we consistently get around 30 mili seconds via Varnish:

curl -o /dev/null http://dev.transitionnetwork.org/

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32177  100 32177    0     0  2714k      0 --:--:-- --:--:-- --:--:-- 29.7M

Unlike ab we can use curl for port 443, just loading the front page HTML file takes around 7 seconds:

curl -o /dev/null https://dev.transitionnetwork.org/

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32076    0 32076    0     0   4545      0 --:--:--  0:00:07 --:--:--  8172