In a previous speed tweak we showed how upgrading our web server to a solid state drive and faster processors improved response times by 35% to 50%. With the Web Page Analyzer on the same server, the average response time was 11.87 seconds with typical response times after ramp-up ranging from 23 to 36 seconds. While this was an improvement over the old server, there were still response time and availability issues caused by hosting the analyzer script on the same server. This article shows how offloading a resource intensive script can dramatically improve your server response times.
Baseline Server Before Offloading Script
Our upgraded server improved performance measurably, but users still experienced some slowdowns from the load on our free Web Page Analyzer script. The free script, which analyzes web pages for size and download speed, typically gets 2.2 to 3 times the traffic than our home page receives and is resource intensive. By offloading the script to a separate server, we thought we could reduce the delays users were experiencing due to memory and CPU usage. The upgraded server had the following specifications:
Upgraded Dedicated Server Specifications (WebsiteOptimization.com)
Processor: Dual Xeon E5310 Quad Core (Clovertown)
Memory: 4GB DDR Registered ECC Hd1 RAM
Drives: Dual 32GB SSD (solid state drives) Hardware Raid 1
Hd2: 120GB 7200RPM SATA / 8MB Cache RemoteBackup
OS: Linux – CentOS 4 (+64 Bit)
This new server setup benchmarked as follows (see Figure 1).
Figure 1 shows the results from Pylot load testing the new server by ramping up responses per second and agents. The response time averaged 11.87 seconds, and once ramped up to 2 or more requests per second the response time averaged about 30 seconds (from 23 to 36 seconds), which is about 36% faster than the old server. The 95% decile response time was 36.16 seconds (25.6% faster than the old server) with a maximum response time of 47.86 seconds (the old ATA-based server had 95% decile response time of 48.6 seconds and the maximum response time was 53.4 seconds), Figure 2 shows the corresponding throughput for the benchmark test of the new server.
After Offloading Resource Intensive Script
To reduce response times even further and make them more consistent (and more “attunable”) we offloaded the Web Page Analyzer script to a separate dedicated server. The gateway form for the analyzer still resides on the WSO server, but the heavy lifting is done on a separate server referenced at a subdomain. Now the WebsiteOptimization.com server proper hosts mainly content, contact scripts, and some blogs based on Movable Type. After moving the script, the WSO server benchmarked as follows (see Figure 3):
Figure 3 shows that the average response time dropped 98.8% from 11.87 seconds to 0.14 seconds. After ramp-up, typical response times ranged from 0.2 to 0.9 seconds with a maximum of 1.53 seconds. The 95% decile dropped from 36.16 seconds to 0.27 seconds, or 99.2% faster.
Improvement in Throughput (Requests per Second)
Figure 4 shows the corresponding throughput for the benchmark test of the new server after offloading the script.
Throughput improved from an average of 0.97 requests per second (95% decile of 4 requests per second) to an average of 141 requests per second (95% decile of 160 requests per second after ramp-up). The new average throughput of 141 requests per second is 145 times the old throughput of 0.97, and after ramp-up the typical throughput jumped by a factor of 40 (160/4).
This article shows how offloading resource intensive scripts can significantly improve web server performance. By offloading the web page analyzer script to a separate server, we were able to improve response times by over 98%, and throughput by a factor of 40. Attunability was improved by reducing the standard deviation of response times from 14.7 seconds to .08 seconds.
- Get a Dedicated Server Hosting Your Web Site
- Upgrading to your own server improves performance, reliability, and control over your website. Andy King talks about his experience moving to a dedicated server for WebSiteOptimization.com.
Speed Tweak, Oct. 4, 2004.
- HTTP Load Tester used to analyze WebsiteOptimization.com server.
- Server Optimization Article Archive
- Some Speed Tweaks for web servers from WebsiteOptimization.com.
- Solid-State Drive Web Server Test
- This article tests the upgraded WSO server before offloading the analyzer script. Upgrading our dedicated server to solid-state drives and faster processors improved performance by 35% to 50%.
- Web Performance Optimization Section Summary
- Summary of introduction to web performance section of Website Optimization Secrets book from O’Reilly.