Plotting server performance

21:29, Friday November 17th, 2006 • feeling relaxed

After reading Zed Shaw's uncompromising Programmers Need To Learn Statistics Or I Will Kill Them All I felt suitably chided and decided to serve my pennance by kicking some stuff around with ab and R. This is probably the kind of thing that Shaw was decrying, my statistical skills are terrible, but here's what I did.

Gather some data

First I wanted to gather some data about my server, so I used ab to benchmark the server several times, making 1,000 requests each time using either 5, 10 or 20 threads. I know this falling straight into the power of ten pitfall. I haven't read the working out the power of my test chapter of the R tutorial (although I have read Joseph Tal's Reading Between The Numbers so I shouldn't be able to hide for too long).

This command sets ab going and writes raw data about the requests to a tab-separated file. See man ab for more info.

ab -n 1000 -c 10 -g journal-n1000-c10.tsv http://aftnn.org/journal/

To remove confounding elements, I guess I should do some or all of the following:

Plot the data with R

This couldn't be simpler. The following R commands create a histogram of my request data.

perfdata <- read.delim("~/journal-n1000-c10.tsv")
hist(perfdata$ttime)

And bingo, R displays this:

An abberation no doubt, Zed, but there you go.

Permanent link

If you would like to link to this entry, it will always be available at http://aftnn.org/journal/623.

aftnn.orgafternoon's journal → entry 623