Skip to content

Instantly share code, notes, and snippets.

@mingodad
Last active March 29, 2016 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mingodad/e5a46c809ee030befc18 to your computer and use it in GitHub Desktop.
Save mingodad/e5a46c809ee030befc18 to your computer and use it in GitHub Desktop.
h2o and nginx performance on raspberry pi 3
Raspberry PI 3 connected through ethernet, httpress/ab/h2load/wrk runing on another computer.
-----h2o config (relevant part)
listen:
port: 8081
ssl:
certificate-file: examples/h2o/server.crt
key-file: examples/h2o/server.key
listen:
port: 8083
ssl:
certificate-file: examples/h2o/server.crt
key-file: examples/h2o/server.key
minimum-version: TLSv1
cipher-suite: "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS"
cipher-preference: server
listen:
port: 8085
ssl:
certificate-file: examples/h2o/server.crt
key-file: examples/h2o/server.key
minimum-version: TLSv1
cipher-suite: "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS"
cipher-preference: server
------nginx config (relevant part)
server {
listen 8021 ssl http2;
server_name localhost.daplie.com;
ssl_certificate certs/fullchain.pem;
ssl_certificate_key certs/privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
-----h2o default configuration
mingo@mingo-Lenovo-G580:~$ httpress -t 2 -n 10000 -c 4 -k https://192.168.1.10:8081/edr/index-ngx.html
2500 requests launched (0.783921 sec)
5000 requests launched (0.550600 sec)
7500 requests launched (0.540625 sec)
10000 requests launched (0.547913 sec)
thread 2: 2 connect, 5015 requests, 5015 success, 0 fail, 0 fail avg, 3069180 bytes, 1218645 overhead
thread 1: 2 connect, 4985 requests, 4985 success, 0 fail, 0 fail avg, 3050820 bytes, 1211355 overhead
SSL INFO: ECDHE_RSA_AES_128_GCM_SHA256
- Protocol: TLS1.2
- Key Exchange: ECDHE-RSA
- Ephemeral ECDH using curve SECP256R1
- Cipher: AES-128-GCM
- MAC: AEAD
- Compression: NULL
- Certificate Type: X.509
- Certificate Info: subject `OU=GT72238569,OU=See www.rapidssl.com/resources/cps (c)15,OU=Domain Control Validated - RapidSSL(R),CN=localhost.daplie.com', issuer `C=US,O=GeoTrust Inc.,CN=RapidSSL SHA256 CA - G3', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-06-09 09:27:42 UTC', expires `2016-06-11 20:08:07 UTC', SHA-1 fingerprint `a4db09ce78780903a2c3d000f6d3eb6d3852184d'
TOTALS: 4 connect, 10000 requests, 10000 success, 0 fail, 0 fail avg, 4 (4) real concurrency
TRAFFIC: 612 avg bytes, 243 avg overhead, 6120000 bytes, 2430000 overhead
TIMING: 2.425 seconds, 4123 rps, 3443 kbps, 1.0 ms avg req time
-----h2o trong configuration 256 first
httpress -t 2 -n 10000 -c 4 -k https://192.168.1.10:8083/edr/index-ngx.html
2500 requests launched (0.958945 sec)
5000 requests launched (0.541784 sec)
7500 requests launched (0.547125 sec)
10000 requests launched (0.547403 sec)
thread 1: 2 connect, 5009 requests, 5009 success, 0 fail, 0 fail avg, 3065508 bytes, 1217187 overhead
thread 2: 2 connect, 4991 requests, 4991 success, 0 fail, 0 fail avg, 3054492 bytes, 1212813 overhead
SSL INFO: ECDHE_RSA_AES_128_GCM_SHA256
- Protocol: TLS1.2
- Key Exchange: ECDHE-RSA
- Ephemeral ECDH using curve SECP521R1
- Cipher: AES-128-GCM
- MAC: AEAD
- Compression: NULL
- Certificate Type: X.509
- Certificate Info: subject `OU=GT72238569,OU=See www.rapidssl.com/resources/cps (c)15,OU=Domain Control Validated - RapidSSL(R),CN=localhost.daplie.com', issuer `C=US,O=GeoTrust Inc.,CN=RapidSSL SHA256 CA - G3', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-06-09 09:27:42 UTC', expires `2016-06-11 20:08:07 UTC', SHA-1 fingerprint `a4db09ce78780903a2c3d000f6d3eb6d3852184d'
TOTALS: 4 connect, 10000 requests, 10000 success, 0 fail, 0 fail avg, 4 (4) real concurrency
TRAFFIC: 612 avg bytes, 243 avg overhead, 6120000 bytes, 2430000 overhead
TIMING: 2.597 seconds, 3849 rps, 3214 kbps, 1.0 ms avg req time
-----h2o strong configuration 384 first
httpress -t 2 -n 10000 -c 4 -k https://192.168.1.10:8085/edr/index-ngx.html
2500 requests launched (0.725119 sec)
5000 requests launched (0.557523 sec)
7500 requests launched (0.524152 sec)
10000 requests launched (0.553110 sec)
thread 1: 2 connect, 5149 requests, 5149 success, 0 fail, 0 fail avg, 3151188 bytes, 1251207 overhead
thread 2: 2 connect, 4851 requests, 4851 success, 0 fail, 0 fail avg, 2968812 bytes, 1178793 overhead
SSL INFO: ECDHE_RSA_AES_256_GCM_SHA384
- Protocol: TLS1.2
- Key Exchange: ECDHE-RSA
- Ephemeral ECDH using curve SECP521R1
- Cipher: AES-256-GCM
- MAC: AEAD
- Compression: NULL
- Certificate Type: X.509
- Certificate Info: subject `OU=GT72238569,OU=See www.rapidssl.com/resources/cps (c)15,OU=Domain Control Validated - RapidSSL(R),CN=localhost.daplie.com', issuer `C=US,O=GeoTrust Inc.,CN=RapidSSL SHA256 CA - G3', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-06-09 09:27:42 UTC', expires `2016-06-11 20:08:07 UTC', SHA-1 fingerprint `a4db09ce78780903a2c3d000f6d3eb6d3852184d'
TOTALS: 4 connect, 10000 requests, 10000 success, 0 fail, 0 fail avg, 4 (4) real concurrency
TRAFFIC: 612 avg bytes, 243 avg overhead, 6120000 bytes, 2430000 overhead
TIMING: 2.362 seconds, 4233 rps, 3534 kbps, 0.9 ms avg req time
-----nginx default
httpress -t 2 -n 10000 -c 4 -k https://192.168.1.10:8021/
2500 requests launched (1.171089 sec)
5000 requests launched (0.991416 sec)
7500 requests launched (1.192526 sec)
10000 requests launched (0.970607 sec)
thread 2: 51 connect, 4984 requests, 4984 success, 0 fail, 0 fail avg, 3050208 bytes, 1185947 overhead
thread 1: 51 connect, 5016 requests, 5016 success, 0 fail, 0 fail avg, 3069792 bytes, 1193563 overhead
SSL INFO: ECDHE_RSA_AES_256_GCM_SHA384
- Protocol: TLS1.2
- Key Exchange: ECDHE-RSA
- Ephemeral ECDH using curve SECP256R1
- Cipher: AES-256-GCM
- MAC: AEAD
- Compression: NULL
- Certificate Type: X.509
- Certificate Info: subject `OU=GT72238569,OU=See www.rapidssl.com/resources/cps (c)15,OU=Domain Control Validated - RapidSSL(R),CN=localhost.daplie.com', issuer `C=US,O=GeoTrust Inc.,CN=RapidSSL SHA256 CA - G3', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-06-09 09:27:42 UTC', expires `2016-06-11 20:08:07 UTC', SHA-1 fingerprint `a4db09ce78780903a2c3d000f6d3eb6d3852184d'
TOTALS: 102 connect, 10000 requests, 10000 success, 0 fail, 0 fail avg, 4 (4) real concurrency
TRAFFIC: 612 avg bytes, 237 avg overhead, 6120000 bytes, 2379510 overhead
TIMING: 4.330 seconds, 2309 rps, 1916 kbps, 1.7 ms avg req time
----using apache ab
-----nginx default
ab -n 10000 -c 4 -k https://192.168.1.10:8021/This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.1.10 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software: nginx/1.9.12
Server Hostname: 192.168.1.10
Server Port: 8021
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
Document Path: /
Document Length: 612 bytes
Concurrency Level: 4
Time taken for tests: 4.462 seconds
Complete requests: 10000
Failed requests: 0
Keep-Alive requests: 9901
Total transferred: 8499505 bytes
HTML transferred: 6120000 bytes
Requests per second: 2241.31 [#/sec] (mean)
Time per request: 1.785 [ms] (mean)
Time per request: 0.446 [ms] (mean, across all concurrent requests)
Transfer rate: 1860.35 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 5.4 0 165
Processing: 1 1 3.5 1 61
Waiting: 0 1 3.5 1 61
Total: 1 2 6.6 1 166
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 2
98% 31
99% 39
100% 166 (longest request)
-----h2o strong configuration 384 first
ab -n 10000 -c 4 -k https://192.168.1.10:8085/edr/index-ngx.html
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.1.10 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software: h2o-cpp/2.0.0-DEV
Server Hostname: 192.168.1.10
Server Port: 8085
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
Document Path: /edr/index-ngx.html
Document Length: 612 bytes
Concurrency Level: 4
Time taken for tests: 3.242 seconds
Complete requests: 10000
Failed requests: 0
Keep-Alive requests: 10000
Total transferred: 8550000 bytes
HTML transferred: 6120000 bytes
Requests per second: 3084.96 [#/sec] (mean)
Time per request: 1.297 [ms] (mean)
Time per request: 0.324 [ms] (mean, across all concurrent requests)
Transfer rate: 2575.83 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 15.5 0 893
Processing: 1 1 3.1 1 249
Waiting: 0 1 3.1 1 249
Total: 1 1 17.9 1 894
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 1
98% 2
99% 2
100% 894 (longest request)
----using h2load
-----nginx default
h2load -t 2 -n 10000 -c 4 https://192.168.1.10:8021/starting benchmark...
spawning thread #0: 2 total client(s). 5000 total requests
spawning thread #1: 2 total client(s). 5000 total requests
TLS Protocol: TLSv1.2
Cipher: ECDHE-RSA-AES256-GCM-SHA384
Application protocol: h2
progress: 10% done
progress: 20% done
progress: 30% done
progress: 40% done
progress: 50% done
progress: 60% done
progress: 70% done
progress: 80% done
progress: 90% done
progress: 100% done
finished in 2.34s, 4269.29 req/s, 3.00MB/s
requests: 10000 total, 10000 started, 10000 done, 10000 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 10000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 7.04MB (7380196) total, 1.03MB (1080000) headers (space savings 38.98%), 5.84MB (6120000) data
min max mean sd +/- sd
time for request: 489us 38.78ms 845us 544us 97.95%
time for connect: 144.34ms 187.59ms 173.08ms 16.94ms 75.00%
time to 1st byte: 183.18ms 188.83ms 186.97ms 2.22ms 75.00%
req/s : 1067.89 1083.80 1076.45 7.39 75.00%
-----h2o strong configuration 384 first
h2load -t 2 -n 10000 -c 4 https://192.168.1.10:8085/edr/index-ngx.html
starting benchmark...
spawning thread #0: 2 total client(s). 5000 total requests
spawning thread #1: 2 total client(s). 5000 total requests
TLS Protocol: TLSv1.2
Cipher: ECDHE-RSA-AES256-GCM-SHA384
Application protocol: h2
progress: 10% done
progress: 20% done
progress: 30% done
progress: 40% done
progress: 50% done
progress: 60% done
progress: 70% done
progress: 80% done
progress: 90% done
progress: 100% done
finished in 2.48s, 4038.15 req/s, 2.48MB/s
requests: 10000 total, 10000 started, 10000 done, 10000 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 10000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 6.13MB (6430648) total, 127.47KB (130528) headers (space savings 92.83%), 5.84MB (6120000) data
min max mean sd +/- sd
time for request: 455us 82.73ms 765us 1.26ms 99.09%
time for connect: 393.58ms 478.79ms 436.38ms 41.24ms 50.00%
time to 1st byte: 476.37ms 479.77ms 478.38ms 1.35ms 50.00%
req/s : 1009.78 1083.01 1047.37 35.47 50.00%
----using wrk
-----h2o strong configuration 384 first
wrk -t 2 -c 4 https://192.168.1.10:8085/edr/index-ngx.html
Running 10s test @ https://192.168.1.10:8085/edr/index-ngx.html
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.05ms 3.05ms 82.89ms 98.78%
Req/Sec 2.35k 255.74 2.63k 96.88%
45192 requests in 10.04s, 36.85MB read
Requests/sec: 4503.43
Transfer/sec: 3.67MB
-----nginx default
wrk -t 2 -c 4 https://192.168.1.10:8021/
Running 10s test @ https://192.168.1.10:8021/
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.91ms 542.85us 10.70ms 95.46%
Req/Sec 2.22k 203.15 2.48k 89.90%
43936 requests in 10.01s, 35.61MB read
Requests/sec: 4389.45
Transfer/sec: 3.56MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment