Brothers Gonna wrk It Out

I’ve been working with the wrk benchmarking tool to… well, do exactly as the label says: to produce specific workloads against cloud systems to affect performance improvements.  While there are a number of different options available to run such tests, a colleague’s familiarity with this product and his hearty recommendation were the reasons to go with wrk.

A DDoS Tool Gone Good

Wrk is described as being “capable of generating significant load” against a target server/load balancer/environment, which can also be read as “throw enough requests at something to bog it down and cause it to crash.” The aforementioned colleague did describe it as “essentially a DDoS tool,” and he’s not kidding.

“Gone Good,” Really

But the point here really is to be able to generate application requests of specified volume and duration (and other parameters, too) and view a report of the responses from these requests that give you a data point of system performance.

In our case, we have a web application being migrated to Amazon Web Services from a multi-VPS setup in Rackspace, and we used wrk to determine a comparative baseline between these two systems to naturally demonstrate superior performance on AWS. Turns out our initial tests favored the Rackspace environment by a couple of orders of magnitude.

Long story less long, it turns out that a number of sub-components in the AWS environment weren’t configured properly, and after addressing these loose bits, the throughput numbers did come up significantly. Using wrk during this “system tuning” process was beyond helpful as we were able to associate performance data with specific changes, even to the point of reverting settings when test results showed that we’d passed a point of diminishing returns!

It’s Like Tabasco…

…you’ll want to try it on everything, although every application and its environment is different enough performance results do not necessarily tell an “apples to apples” comparison of which is “faster” or “better.” And one also needs to keep in mind that it is possible to overload and crash a target with this tool (remember the “essentially a DDoS tool” bit from earlier?), so be wise in its use.