Last active
August 29, 2015 13:56
-
-
Save g13n/9130133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# httperf Web Server Benchmarking | |
## The Network | |
### Server | |
$ iperf -s | |
------------------------------------------------------------ | |
Server listening on TCP port 5001 | |
TCP window size: 85.3 KByte (default) | |
------------------------------------------------------------ | |
[ 4] local 172.31.0.104 port 5001 connected with 172.31.18.243 port 48749 | |
[ ID] Interval Transfer Bandwidth | |
[ 4] 0.0-10.1 sec 172 MBytes 143 Mbits/sec | |
### The Client | |
$ iperf -c ip-172-31-0-104 | |
------------------------------------------------------------ | |
Client connecting to ip-172-31-0-104, TCP port 5001 | |
TCP window size: 23.5 KByte (default) | |
------------------------------------------------------------ | |
[ 3] local 172.31.18.243 port 48749 connected with 172.31.0.104 port 5001 | |
[ ID] Interval Transfer Bandwidth | |
[ 3] 0.0-10.0 sec 172 MBytes 144 Mbits/sec | |
$ $ ulimit -n | |
32768 | |
## PHP+APC (Apache) | |
### The Code | |
hello, world | |
### The Results | |
$ ./src/httperf --client 0/1 --server ip-172-31-0-104 --uri /hello.php --num-conns 10000 --num-calls 10 --rate 100 --timeout 1 | |
httperf --timeout=1 --client=0/1 --server=ip-172-31-0-104 --port=80 --uri=/hello.php --rate=100 --send-buffer=4096 --recv-buffer=16384 --num-conns=10000 --num-calls=10 | |
Maximum connect burst length: 12 | |
Total: connections 10000 requests 91472 replies 89679 test-duration 100.818 s | |
Connection rate: 99.2 conn/s (10.1 ms/conn, <=194 concurrent connections) | |
Connection time [ms]: min 16.0 avg 1116.5 max 3588.5 median 1082.5 stddev 554.9 | |
Connection time [ms]: connect 3.5 | |
Connection length [replies/conn]: 9.369 | |
Request rate: 907.3 req/s (1.1 ms/req) | |
Request size [B]: 77.0 | |
Reply rate [replies/s]: min 512.8 avg 889.8 max 1000.1 stddev 127.0 (20 samples) | |
Reply time [ms]: response 102.4 transfer 0.0 | |
Reply size [B]: header 193.0 content 13.0 footer 0.0 (total 206.0) | |
Reply status: 1xx=0 2xx=89679 3xx=0 4xx=0 5xx=0 | |
CPU time [s]: user 16.25 system 84.55 (user 16.1% system 83.9% total 100.0%) | |
Net I/O: 247.2 KB/s (2.0*10^6 bps) | |
Errors: total 1794 client-timo 1794 socket-timo 0 connrefused 0 connreset 0 | |
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 | |
## HHVM | |
### The Code | |
hello, world | |
### The Results | |
$ ./src/httperf --client 0/1 --server ip-172-31-0-104 --uri /hello.php --num-conns 10000 --num-calls 10 --rate 100 --timeout 1 | |
httperf --timeout=1 --client=0/1 --server=ip-172-31-0-104 --port=80 --uri=/hello.php --rate=100 --send-buffer=4096 --recv-buffer=16384 --num-conns=10000 --num-calls=10 | |
Maximum connect burst length: 13 | |
Total: connections 10000 requests 96727 replies 96327 test-duration 101.139 s | |
Connection rate: 98.9 conn/s (10.1 ms/conn, <=159 concurrent connections) | |
Connection time [ms]: min 16.0 avg 972.2 max 2881.3 median 961.5 stddev 573.8 | |
Connection time [ms]: connect 2.1 | |
Connection length [replies/conn]: 9.976 | |
Request rate: 956.4 req/s (1.0 ms/req) | |
Request size [B]: 77.0 | |
Reply rate [replies/s]: min 859.7 avg 954.6 max 1000.3 stddev 30.8 (20 samples) | |
Reply time [ms]: response 96.6 transfer 0.0 | |
Reply size [B]: header 136.0 content 13.0 footer 0.0 (total 149.0) | |
Reply status: 1xx=0 2xx=96327 3xx=0 4xx=0 5xx=0 | |
CPU time [s]: user 18.47 system 82.39 (user 18.3% system 81.5% total 99.7%) | |
Net I/O: 210.5 KB/s (1.7*10^6 bps) | |
Errors: total 401 client-timo 401 socket-timo 0 connrefused 0 connreset 0 | |
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 | |
## Node.js | |
### The Code | |
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.end('hello, world'); | |
}).listen(80); | |
### The Results | |
$ ./src/httperf --client 0/1 --server ip-172-31-0-104 --uri / --num-conns 10000 --num-calls 10 --rate 100 --timeout 1 | |
httperf --timeout=1 --client=0/1 --server=ip-172-31-0-104 --port=80 --uri=/ --rate=100 --send-buffer=4096 --recv-buffer=16384 --num-conns=10000 --num-calls=10 | |
Maximum connect burst length: 12 | |
Total: connections 10000 requests 98437 replies 98157 test-duration 100.387 s | |
Connection rate: 99.6 conn/s (10.0 ms/conn, <=151 concurrent connections) | |
Connection time [ms]: min 14.8 avg 690.3 max 3121.5 median 720.5 stddev 348.1 | |
Connection time [ms]: connect 12.9 | |
Connection length [replies/conn]: 9.897 | |
Request rate: 980.6 req/s (1.0 ms/req) | |
Request size [B]: 68.0 | |
Reply rate [replies/s]: min 898.9 avg 977.2 max 1051.1 stddev 37.1 (20 samples) | |
Reply time [ms]: response 66.3 transfer 0.0 | |
Reply size [B]: header 71.0 content 12.0 footer 2.0 (total 85.0) | |
Reply status: 1xx=0 2xx=98157 3xx=0 4xx=0 5xx=0 | |
CPU time [s]: user 18.53 system 81.84 (user 18.5% system 81.5% total 100.0%) | |
Net I/O: 144.4 KB/s (1.2*10^6 bps) | |
Errors: total 284 client-timo 284 socket-timo 0 connrefused 0 connreset 0 | |
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not a real benchmark for any web server/library. I wanted to quickly check the raw overhead for a simple "hello, world".
For a true benchmark, read http://www.mnot.net/blog/2011/05/18/http_benchmark_rules.
Hardware Config: