WordPress Caching: Day 1
A little late to the game (gsoc officially started on Monday), but I’m up and running now. The guiding aim of this project is to “raise the amount of traffic a vanilla WP install can take”, by improving the built-in cache support of WP. That’s the idea anyway; who knows where it’ll take me. Andy’s mentoring the project.
Spent most of today fiddling around the idea, and Andy and I decided to set up a benchmarking environment; a systematic, easily-repeatable way to stress a WP install. After crashing the neodude.net server a couple of times (at one point, linux was allocating ~6MB of swap space per second), I found and resurrected my old laptop. Installing ubuntu on a computer without USB nor CD booting turned out to be remarkably easy: with Windows on the computer, installing took 5 minutes of clicking with unetbootin, and an hour of waiting. Scuffles with the Dartmouth network made things take longer than it should.
As for load-testing: spent a lot of time messing around with ab, the benchmark program that comes with Apache httpd. ab isn’t very full-featured though; we want to simulate the internet’s load on the testing server (both normal and digg loads), and you can’t even have ab hit more than one URL at a time.
Then found Siege, which looks to be the perfect tool. It’s literally designed exactly for the stress benchmarking we’re trying to do here. Planning to set up some php scripts to easily invoke Siege in different scenarios, will see how things go. Maybe suck data into mysql tables for optimal fun-to-data ratio. Here’s some fun siege stats that gave a load average of 22.69 in the last minute:
$ siege --file=urls.txt -i -c40 -t 1M
...
Transactions: 314 hits
Availability: 100.00 %
Elapsed time: 59.46 secs
Data transferred: 2.13 MB
Response time: 6.59 secs
Transaction rate: 5.28 trans/sec
Throughput: 0.04 MB/sec
Concurrency: 34.81
Successful transactions: 314
Failed transactions: 0
Longest transaction: 13.17
Shortest transaction: 1.79
Also found linklint after hours of searching for a way to extract out a comprehensive list of links from a site. My unix kung-fu is lacking.