[[PageOutline(2-5, Table of Contents, floated)]] = Site Load Times = This page is to document the time the site takes to load. == 2011-07-07 == === 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/ Time taken for tests: 4.302 seconds Percentage of the requests served within a certain time (ms) 50% 7 66% 8 75% 9 80% 55 90% 753 95% 2988 98% 2991 99% 2991 100% 2993 (longest request) }}} This is for subsequent requests which don't hit apache: {{{ Time taken for tests: 0.183 seconds Percentage of the requests served within a certain time (ms) 50% 7 66% 7 75% 8 80% 8 90% 9 95% 19 98% 40 99% 41 100% 41 (longest request) }}} ==== pingdom ==== * http://tools.pingdom.com/?url=http://dev.transitionnetwork.org/ * Total loading time: 2 seconds Wow, compare this with the last test! * http://tools.pingdom.com/?url=https://dev.transitionnetwork.org/ * Total loading time: 3.2 seconds ==== Load Impact ==== HTTP: http://loadimpact.com/result/dev.transitionnetwork.org/-d25171ed06575a89080ba08b0ab371bc {{{ Clients 10 20 30 40 50 Delay (ms) 449 495 443 433 465 }}} It won't run the HTTPS test today without paying them. ==== 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 30856 100 30856 0 0 2327k 0 --:--:-- --:--:-- --:--:-- 28.4M }}} On 3 different machines this ism't working, I don't understand why: {{{ curl -o /dev/null https://dev.transitionnetwork.org/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 }}} == 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: * http://www.transitionnetwork.org/sites/default/files/css/css_9bf5bdd80b33ef2e38c9b89845c474c9.css * CSS expressions (supported in IE beginning with Version 5) are a powerful, and dangerous, way to dynamically set CSS properties. These expressions are evaluated frequently: when the page is rendered and resized, when the page is scrolled, and even when the user moves the mouse over the page. These frequent evaluations degrade the user experience. * There are 27 components with misconfigured ETags (all css js and images) ==== pingdom ==== * http://tools.pingdom.com/?url=http://www.transitionnetwork.org/ 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 ==== * Make fewer HTTP requests * This page has 3 external stylesheets. Try combining them into one. * This page has 14 external background images. Try combining them with CSS sprites. * There are 2 plain text components that should be sent compressed * https://piwik.transitionnetwork.org/piwik.js * http://dev.transitionnetwork.org/sites/default/files/js/js_cb10d5814b295fb1648af27eb7a3f74b.js * There is 1 component with misconfigured ETags * https://piwik.transitionnetwork.org/piwik.js ==== pingdom ==== * http://tools.pingdom.com/?url=http://dev.transitionnetwork.org/ 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: * http://tools.pingdom.com/?url=https://dev.transitionnetwork.org/ ==== 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 }}}