Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
Created September 15, 2011 19:36
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 piscisaureus/1220252 to your computer and use it in GitHub Desktop.
Save piscisaureus/1220252 to your computer and use it in GitHub Desktop.
Prefork experiment benchmark (windows)
- code at https://github.com/joyent/libuv/tree/8afa067ad658ae59f64063d3630f36d65d094707
- uses libuv
- fork N child processes.
- accept as fast as possible
- write "HTTP 1.1 200 OK\r\nContent-Length: 12\r\nConnection: close\r\n\r\nhello world\n",
then close from the write callback
- uv_tcp_t and uv_write_t are malloc'ed every time
- benchmark was run on the Microsoft bench cluster with `bench 200 7` and 4 client machines
+---------+--------+
| # forks | r/s |
+---------+--------+
| 0 | 15639 |
| 1 | 23848 |
| 2 | 32025 |
| 3 | 36627 |
| 4 | 38159 |
| 5 | |
| 6 | |
| 7 | 43948 |
+---------+--------+
0 16514
1 24633
2 29986
3 29767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment