Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.