httperf – Research/Usage

httperf in comparison to JMeter, is much more difficult to set-up (for inexperienced users).

While running the application can be installed using:

apt-get install httperf

and then run using

httperf – –rate=10 –num-conns=50

the options required to run httperf aren’t obvious without guidance, and require reading through the httperf man pages for meaningful testing

Output of the above command is:

smoke@Smokki-JLT:/usr/local/bin$ httperf – –rate=10 –num-conns=50
httperf –client=0/1 – –port=80 –uri=/ –rate=10 –send-buffer=4096 –recv-buffer=16384 –num-conns=50 –num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
Maximum connect burst length: 1

Total: connections 50 requests 50 replies 50 test-duration 5.005 s

Connection rate: 10.0 conn/s (100.1 ms/conn, <=4 concurrent connections)
Connection time [ms]: min 88.3 avg 121.9 max 624.1 median 106.5 stddev 76.7
Connection time [ms]: connect 56.2
Connection length [replies/conn]: 1.000

Request rate: 10.0 req/s (100.1 ms/req)
Request size [B]: 67.0

Reply rate [replies/s]: min 9.8 avg 9.8 max 9.8 stddev 0.0 (1 samples)
Reply time [ms]: response 65.7 transfer 0.0
Reply size [B]: header 266.0 content 261.0 footer 0.0 (total 527.0)
Reply status: 1xx=0 2xx=0 3xx=50 4xx=0 5xx=0

CPU time [s]: user 1.53 system 3.47 (user 30.5% system 69.3% total 99.7%)
Net I/O: 5.8 KB/s (0.0*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

Ignoring the errors, the application provides rather useful output:

Connection time [ms]: min 88.3 avg 121.9 max 624.1 median 106.5 stddev 76.7
Reply rate [replies/s]: min 9.8 avg 9.8 max 9.8 stddev 0.0 (1 samples)

In contrast to JMeter, no options are provided for creating graphs, which is to be expected from a basic command-line application.
httperf could be expanded by wrapping a Java/C# application around it to allow for iterative testing, test plan setup and graphing output options using CSV output.

HTTPS/SSL is supported, however requires quite a bit of tinkering:

The code first needs to be compiled with ssl support enabled, with ssl of some variety being installed on the system building httperf.
Ssl is then enabled using the -ssl flag. There is no guarantee that ssl will then work, however one can verify if httperf is using ssl using the following command in bash:

netstat -an | grep 443 | wc -l

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s