I recently merged dalescott.net and swiftconstructioncompany.net onto a $5/month DigitalOcean droplet. After everything was up and running, I wanted to check server performance and investigated some free online load testing tools.
Here are the tools I tested with. There are more, but these will be enough for now.
- Load Impact . Load Impact claims to be “The leading on-demand load and performance testing software-as-a-service.”
- Neustar . Neustar claims “We started it all. And we continue to shape the industry.”
- WebPageTest . The focus of WebPagetest is how fast an individual page is served. It was reportedly created by AOL for internal use before being released as open source, and is now primarily developed and supported by Google as an open analysis tool for the industry.
I had wanted to include Blitz.io , referenced in a blog post by Ryan Frankel on using Apache on a small DigitalOcean droplet. However, Blitz’s free demo is hard-coded to use only a Blitz demo site which removed it from consideration.
The free Load Impact test loads 25 Virtual Users in 5 minutes, and displays results in a nice time-based graph. The test results appear to be stored indefinitely, and you can see the full results of my test (additional metrics appear to be available, but require a free Load Impact sign-up which then allows five free tests).
Neustar queued three servers for testing, but the Washington server never ran. Here are the results when I gave up waiting.
Web Page Test
Web Page Test concentrates on measuring how fast it takes a page to load, and gives lots of information for digging into the load times for each aspect of the page. I was looking for more of a general load or stress test, to see if the server will fail, but valuable information none the less.
Tuning the Server
It may just be me, but I seem to get a large number of daily hits looking for a backdoor or trying to post advertising using my blog’s contact form. This sets off a firestorm of activity, with Apache using all available RAM, then all available swap, and eventually the server stalls due to page thrashing. From web research, it seems 512MB of RAM is now considered low and Apache must be tuned for optimum behavior.
KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5
The FreeBSD apache24 port already sets these as defaults in /usr/local/etc/apache24/extra/httpd-default.conf (the default MaxKeepAliveRequests is even lower than the recommended 200).
Although Event is reportedly the default MPM in Apache 2.4, the FreeBSD port uses Prefork if not specified otherwise for compatibility with non-thread safe modules.
<IfModule mpm_prefork_module> StartServers 3 MinSpareServers 3 MaxSpareServers 5 ServerLimit 50 MaxClients 50 MaxRequestsPerChild 700 # MaxRequestWorkers cannot be greater than ServerLimit MaxRequestWorkers 50 MaxConnectionsPerChild 700 </IfModule>
Here are the result of top, running while performing a test with Load Impact. Although the server can by no means be considered fast , and responded very slowly to a browser hit during the Load Impact test, it also is not exhausting swap so I’m pleased for now. I will be back later when time permits.