Skip to content

Instantly share code, notes, and snippets.

@ToJans
Created January 9, 2014 10:40
Show Gist options
  • Save ToJans/8332299 to your computer and use it in GitHub Desktop.
Save ToJans/8332299 to your computer and use it in GitHub Desktop.
Haskell wai performance comparision on different haskell compiler versions Source code for benching: http://www.techempower.com/benchmarks/#section=data-r4
[root@ghcwebcurrent bench]# ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.2
[root@ghcwebcurrent bench]# bench 5 aaa &
[1] 537
[root@ghcwebcurrent bench]# weighttp -t 2 -n 100000 -c 100 127.0.0.1:8000/
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 50 concurrent requests, 50000 total requests
spawning thread #2: 50 concurrent requests, 50000 total requests
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 3 sec, 577 millisec and 266 microsec, 27954 req/s, 3876 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 14200000 bytes total, 10200000 bytes http, 4000000 bytes data
[root@ghcwebcurrent bench]# weighttp -t 2 -n 100000 -c 100 127.0.0.1:8000/
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 50 concurrent requests, 50000 total requests
spawning thread #2: 50 concurrent requests, 50000 total requests
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 4 sec, 291 millisec and 203 microsec, 23303 req/s, 3231 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 14200000 bytes total, 10200000 bytes http, 4000000 bytes data
[root@ghcwebcurrent bench]# weighttp -t 2 -n 100000 -c 100 127.0.0.1:8000/
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 50 concurrent requests, 50000 total requests
spawning thread #2: 50 concurrent requests, 50000 total requests
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 3 sec, 707 millisec and 880 microsec, 26969 req/s, 3739 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 14200000 bytes total, 10200000 bytes http, 4000000 bytes data
[root@ghcwebcurrent bench]#
[root@ghcwebvnext bench]# ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.7.20140109
[root@ghcwebvnext bench]#bench 5 aaa &
[1] 1273
[root@ghcwebvnext bench]# weighttp -t 2 -n 100000 -c 100 127.0.0.1:8000/
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 50 concurrent requests, 50000 total requests
spawning thread #2: 50 concurrent requests, 50000 total requests
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 12 sec, 459 millisec and 865 microsec, 8025 req/s, 1112 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 14200000 bytes total, 10200000 bytes http, 4000000 bytes data
[root@ghcwebvnext bench]# weighttp -t 2 -n 100000 -c 100 127.0.0.1:8000/
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 50 concurrent requests, 50000 total requests
spawning thread #2: 50 concurrent requests, 50000 total requests
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 19 sec, 768 millisec and 250 microsec, 5058 req/s, 701 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 14200000 bytes total, 10200000 bytes http, 4000000 bytes data
[root@ghcwebvnext bench]# ps -ef|grep bench
root 3254 484 8 10:21 pts/0 00:00:29 bench 5 aaa
root 3256 3254 8 10:21 pts/0 00:00:29 bench 5 aaa
root 3257 3254 8 10:21 pts/0 00:00:29 bench 5 aaa
root 3260 3254 8 10:21 pts/0 00:00:29 bench 5 aaa
root 3262 3254 8 10:21 pts/0 00:00:29 bench 5 aaa
root 3334 484 0 10:27 pts/0 00:00:00 grep --color=auto bench
[root@ghcwebvnext bench]# weighttp -t 2 -n 100000 -c 100 127.0.0.1:8000/
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 50 concurrent requests, 50000 total requests
spawning thread #2: 50 concurrent requests, 50000 total requests
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 15 sec, 55 millisec and 104 microsec, 6642 req/s, 921 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 14200000 bytes total, 10200000 bytes http, 4000000 bytes data
@ToJans
Copy link
Author

ToJans commented Jan 9, 2014

tested on 8-core digital-ocean instance

@ToJans
Copy link
Author

ToJans commented Jan 9, 2014

ok, results are skewed; as cabal install failed on the vnext, I should have ran ./bench as opposed to ./bench.
Compilation fails because dependencies somehow mess up with older Haskell libs... No idea how to fix this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment