Kristian Lyngstøl's Blog

No Stress

Posted on 2012-04-23

After my last post about testing Varnish (, and a few years of frustration, I decided to take a look at what is actually possible.

So this is an example:

What you are seeing is Varnish doing 183k req/s on my home machine. The important thing, however, is that the tool generating this load, cleverly called a.out, is running at 22% CPU load, and it's the single-threaded result of one day of dirty hacking. Compare this to httperf which is hard to get over 100k req/s, or siege which kills itself at about 15k req/s on the same machine.

This being a prototype, the code will never see the light of day. Trust me when I say it's horrible - that's what you get from a day of fiddling. However, it has demonstrated to me what's possible, and I might re-start this project now that I have an idea of what I want to do.

As for how a.out works? It's connection-oriented, so it maintains N open connections at any given time and spews M requests over each connection in rather large (configurable) bursts. It also manages to NOT die if you stop the server for a while (httperf doesn't like this and siege doesn't really need any help to murder itself). It collects roughly 0 statistics and it does not really care about response.

So no, it's not very good. But it's fast, and that was what I set out to achieve.

Update: So this tool is a bit more powerful. I've been able to do 280-290k req/s with a single process (and thread). This is the same machine I did the 275k req/s record with using httperf, but that required two extra machines to generate traffic.... Will be interesting to try booting those tomorrow.