Skip to content

Instantly share code, notes, and snippets.

@goffrie
Created August 9, 2013 17:30
Show Gist options
  • Save goffrie/6195465 to your computer and use it in GitHub Desktop.
Save goffrie/6195465 to your computer and use it in GitHub Desktop.
Benchmarks with/without libuv patch.
uv_shutdown_t: 48 bytes
uv_write_t: 160 bytes
uv_connect_t: 64 bytes
uv_udp_send_t: 184 bytes
uv_tcp_t: 216 bytes
uv_pipe_t: 232 bytes
uv_tty_t: 280 bytes
uv_prepare_t: 88 bytes
uv_check_t: 88 bytes
uv_idle_t: 88 bytes
uv_async_t: 96 bytes
uv_timer_t: 128 bytes
uv_fs_poll_t: 72 bytes
uv_fs_event_t: 104 bytes
uv_process_t: 104 bytes
uv_poll_t: 128 bytes
uv_loop_t: 720 bytes
loop_count: 2000000 ticks in 0.43s (4701473/s)
loop_count: 22580936 ticks (4516187 ticks/s)
ping_pongs: 38854 roundtrips/s
1000000 write requests in 0.83s.
tcp_pump100_server: 28.4 gbit/s
tcp_pump100_client: 29.2 gbit/s
tcp_pump1_server: 27.8 gbit/s
tcp_pump1_client: 27.8 gbit/s
tcp-conn-pound-100: 20259 accepts/s (0 failed)
tcp-conn-pound-1000: 19377 accepts/s (0 failed)
pipe_pump100_server: 38.6 gbit/s
pipe_pump100_client: 38.6 gbit/s
pipe_pump1_server: 38.8 gbit/s
pipe_pump1_client: 38.8 gbit/s
pipe-conn-pound-100: 103012 accepts/s (0 failed)
pipe-conn-pound-1000: 120026 accepts/s (218738 failed)
`tcp_multi_accept2` failed: exit code 134
Output from process `tcp_multi_accept2`:
Assertion failed in ../test/benchmark-multi-accept.c on line 338: 0 == uv_tcp_connect(&ctx->connect_req, (uv_tcp_t*) &ctx->client_handle, listen_addr, cl_connect_cb)
=============================================================
`tcp_multi_accept4` failed: exit code 134
Output from process `tcp_multi_accept4`:
Assertion failed in ../test/benchmark-multi-accept.c on line 379: 0 == uv_tcp_connect(&ctx->connect_req, handle, listen_addr, cl_connect_cb)
=============================================================
`tcp_multi_accept8` failed: exit code 134
Output from process `tcp_multi_accept8`:
Assertion failed in ../test/benchmark-multi-accept.c on line 379: 0 == uv_tcp_connect(&ctx->connect_req, handle, listen_addr, cl_connect_cb)
=============================================================
udp_pummel_1v1: 187091/s received, 187091/s sent. 1000000 received, 1000000 sent in 5.3 seconds.
udp_pummel_10v1: 186637/s received, 186637/s sent. 1000000 received, 1000000 sent in 5.4 seconds.
udp_pummel_100v1: 177999/s received, 177999/s sent. 1000000 received, 1000000 sent in 5.6 seconds.
udp_pummel_1000v1: 181094/s received, 181094/s sent. 1000000 received, 1000000 sent in 5.5 seconds.
udp_pummel_10v10: 232450/s received, 232450/s sent. 1000000 received, 1000000 sent in 4.3 seconds.
udp_pummel_100v10: 234302/s received, 234302/s sent. 1000000 received, 1000000 sent in 4.3 seconds.
udp_pummel_1000v10: 229253/s received, 229253/s sent. 1000000 received, 1000000 sent in 4.4 seconds.
udp_pummel_100v100: 227531/s received, 227531/s sent. 1000000 received, 1000000 sent in 4.4 seconds.
udp_pummel_1000v100: 225073/s received, 225073/s sent. 1000000 received, 1000000 sent in 4.4 seconds.
udp_pummel_1000v1000: 216623/s received, 216450/s sent. 1000800 received, 1000000 sent in 4.6 seconds.
udp_pummel_1v1: 179072/s received, 179072/s sent. 895182 received, 895183 sent in 5.0 seconds.
udp_pummel_10v1: 178278/s received, 178278/s sent. 891210 received, 891211 sent in 5.0 seconds.
udp_pummel_100v1: 178015/s received, 178015/s sent. 889898 received, 889898 sent in 5.0 seconds.
udp_pummel_1000v1: 179255/s received, 179255/s sent. 896094 received, 896094 sent in 5.0 seconds.
udp_pummel_10v10: 232126/s received, 232126/s sent. 1160400 received, 1160400 sent in 5.0 seconds.
udp_pummel_100v10: 231282/s received, 231282/s sent. 1156180 received, 1156180 sent in 5.0 seconds.
udp_pummel_1000v10: 237495/s received, 237495/s sent. 1187240 received, 1187240 sent in 5.0 seconds.
udp_pummel_100v100: 227085/s received, 227085/s sent. 1135200 received, 1135200 sent in 5.0 seconds.
udp_pummel_1000v100: 225445/s received, 225445/s sent. 1127000 received, 1127000 sent in 5.0 seconds.
udp_pummel_1000v1000: 216398/s received, 216475/s sent. 1082640 received, 1083024 sent in 5.0 seconds.
getaddrinfo: 33333 req/s
1,000,000 stats (sync): 0.42s (2,363,824/s)
100,000 stats (1 concurrent): 1.32s (75,807/s)
100,000 stats (2 concurrent): 0.63s (158,308/s)
100,000 stats (3 concurrent): 0.46s (218,153/s)
100,000 stats (4 concurrent): 0.41s (244,700/s)
100,000 stats (5 concurrent): 0.32s (314,649/s)
100,000 stats (6 concurrent): 0.29s (339,572/s)
100,000 stats (7 concurrent): 0.29s (350,541/s)
100,000 stats (8 concurrent): 0.27s (375,645/s)
100,000 stats (9 concurrent): 0.21s (471,961/s)
100,000 stats (10 concurrent): 0.17s (605,316/s)
100,000 stats (11 concurrent): 0.19s (528,110/s)
100,000 stats (12 concurrent): 0.22s (463,854/s)
100,000 stats (13 concurrent): 0.20s (490,225/s)
100,000 stats (14 concurrent): 0.16s (610,105/s)
100,000 stats (15 concurrent): 0.16s (626,125/s)
100,000 stats (16 concurrent): 0.17s (598,904/s)
100,000 stats (17 concurrent): 0.20s (493,220/s)
100,000 stats (18 concurrent): 0.15s (650,854/s)
100,000 stats (19 concurrent): 0.15s (667,178/s)
100,000 stats (20 concurrent): 0.20s (511,008/s)
<buffer too small> stats (21 concurrent): 0.18s (<buffer too small>/s)
<buffer too small> stats (22 concurrent): 0.16s (<buffer too small>/s)
<buffer too small> stats (23 concurrent): 0.21s (<buffer too small>/s)
<buffer too small> stats (24 concurrent): 0.19s (<buffer too small>/s)
<buffer too small> stats (25 concurrent): 0.17s (<buffer too small>/s)
<buffer too small> stats (26 concurrent): 0.15s (<buffer too small>/s)
<buffer too small> stats (27 concurrent): 0.19s (<buffer too small>/s)
<buffer too small> stats (28 concurrent): 0.16s (<buffer too small>/s)
<buffer too small> stats (29 concurrent): 0.15s (<buffer too small>/s)
<buffer too small> stats (30 concurrent): 0.16s (<buffer too small>/s)
<buffer too small> stats (31 concurrent): 0.19s (<buffer too small>/s)
<buffer too small> stats (32 concurrent): 0.16s (<buffer too small>/s)
async1: 15.24 sec (65,629/sec)
async2: 10.21 sec (97,940/sec)
async4: 9.68 sec (103,294/sec)
async8: 16.14 sec (61,961/sec)
async_pummel_1: 1,000,000 callbacks in 1.02 seconds (976,879/sec)
async_pummel_2: 1,000,000 callbacks in 0.97 seconds (1,029,345/sec)
async_pummel_4: 1,000,000 callbacks in 1.33 seconds (754,468/sec)
async_pummel_8: 1,000,000 callbacks in 2.30 seconds (434,728/sec)
spawn: 867 spawns/s
20000 threads created in 0.25 seconds (78899/s)
12,104,098 async events in 5.0 seconds (2,420,819/s, 1,048,576 unique handles seen)
0.25 seconds
uv_shutdown_t: 48 bytes
uv_write_t: 160 bytes
uv_connect_t: 64 bytes
uv_udp_send_t: 184 bytes
uv_tcp_t: 216 bytes
uv_pipe_t: 232 bytes
uv_tty_t: 280 bytes
uv_prepare_t: 88 bytes
uv_check_t: 88 bytes
uv_idle_t: 88 bytes
uv_async_t: 96 bytes
uv_timer_t: 128 bytes
uv_fs_poll_t: 72 bytes
uv_fs_event_t: 104 bytes
uv_process_t: 104 bytes
uv_poll_t: 128 bytes
uv_loop_t: 720 bytes
loop_count: 2000000 ticks in 0.43s (4700755/s)
loop_count: 22530858 ticks (4506172 ticks/s)
ping_pongs: 34861 roundtrips/s
1000000 write requests in 0.91s.
tcp_pump100_server: 28.4 gbit/s
tcp_pump100_client: 28.6 gbit/s
tcp_pump1_server: 27.3 gbit/s
tcp_pump1_client: 27.3 gbit/s
tcp-conn-pound-100: 20752 accepts/s (0 failed)
tcp-conn-pound-1000: 18481 accepts/s (0 failed)
pipe_pump100_server: 38.6 gbit/s
pipe_pump100_client: 38.6 gbit/s
pipe_pump1_server: 38.5 gbit/s
pipe_pump1_client: 38.5 gbit/s
pipe-conn-pound-100: 103595 accepts/s (0 failed)
pipe-conn-pound-1000: 115543 accepts/s (176804 failed)
`tcp_multi_accept2` failed: exit code 134
Output from process `tcp_multi_accept2`:
Assertion failed in ../test/benchmark-multi-accept.c on line 338: 0 == uv_tcp_connect(&ctx->connect_req, (uv_tcp_t*) &ctx->client_handle, listen_addr, cl_connect_cb)
=============================================================
`tcp_multi_accept4` failed: exit code 134
Output from process `tcp_multi_accept4`:
Assertion failed in ../test/benchmark-multi-accept.c on line 379: 0 == uv_tcp_connect(&ctx->connect_req, handle, listen_addr, cl_connect_cb)
=============================================================
`tcp_multi_accept8` failed: exit code 134
Output from process `tcp_multi_accept8`:
Assertion failed in ../test/benchmark-multi-accept.c on line 379: 0 == uv_tcp_connect(&ctx->connect_req, handle, listen_addr, cl_connect_cb)
=============================================================
udp_pummel_1v1: 185736/s received, 185736/s sent. 1000000 received, 1000000 sent in 5.4 seconds.
udp_pummel_10v1: 188466/s received, 188466/s sent. 1000000 received, 1000000 sent in 5.3 seconds.
udp_pummel_100v1: 184128/s received, 184128/s sent. 1000000 received, 1000000 sent in 5.4 seconds.
udp_pummel_1000v1: 185667/s received, 185667/s sent. 1000000 received, 1000000 sent in 5.4 seconds.
udp_pummel_10v10: 238720/s received, 238720/s sent. 1000000 received, 1000000 sent in 4.2 seconds.
udp_pummel_100v10: 231911/s received, 231911/s sent. 1000000 received, 1000000 sent in 4.3 seconds.
udp_pummel_1000v10: 235349/s received, 235349/s sent. 1000000 received, 1000000 sent in 4.2 seconds.
udp_pummel_100v100: 229885/s received, 229885/s sent. 1000000 received, 1000000 sent in 4.3 seconds.
udp_pummel_1000v100: 227118/s received, 227118/s sent. 1000000 received, 1000000 sent in 4.4 seconds.
udp_pummel_1000v1000: 202019/s received, 201857/s sent. 1000800 received, 1000000 sent in 5.0 seconds.
udp_pummel_1v1: 179883/s received, 179883/s sent. 899234 received, 899235 sent in 5.0 seconds.
udp_pummel_10v1: 182131/s received, 182131/s sent. 910472 received, 910473 sent in 5.0 seconds.
udp_pummel_100v1: 180176/s received, 180176/s sent. 900518 received, 900519 sent in 5.0 seconds.
udp_pummel_1000v1: 180010/s received, 180011/s sent. 899872 received, 899873 sent in 5.0 seconds.
udp_pummel_10v10: 238120/s received, 238120/s sent. 1190360 received, 1190360 sent in 5.0 seconds.
udp_pummel_100v10: 237912/s received, 237912/s sent. 1189320 received, 1189320 sent in 5.0 seconds.
udp_pummel_1000v10: 234575/s received, 234577/s sent. 1172640 received, 1172650 sent in 5.0 seconds.
udp_pummel_100v100: 229046/s received, 229046/s sent. 1145000 received, 1145000 sent in 5.0 seconds.
udp_pummel_1000v100: 225840/s received, 225840/s sent. 1129200 received, 1129200 sent in 5.0 seconds.
udp_pummel_1000v1000: 202615/s received, 202750/s sent. 1033336 received, 1034024 sent in 5.1 seconds.
getaddrinfo: 30030 req/s
1,000,000 stats (sync): 0.42s (2,364,242/s)
100,000 stats (1 concurrent): 1.26s (79,302/s)
100,000 stats (2 concurrent): 0.62s (161,605/s)
100,000 stats (3 concurrent): 0.50s (201,997/s)
100,000 stats (4 concurrent): 0.41s (246,367/s)
100,000 stats (5 concurrent): 0.34s (295,153/s)
100,000 stats (6 concurrent): 0.29s (340,154/s)
100,000 stats (7 concurrent): 0.27s (363,698/s)
100,000 stats (8 concurrent): 0.27s (373,578/s)
100,000 stats (9 concurrent): 0.24s (412,483/s)
100,000 stats (10 concurrent): 0.24s (424,445/s)
100,000 stats (11 concurrent): 0.22s (453,975/s)
100,000 stats (12 concurrent): 0.22s (461,460/s)
100,000 stats (13 concurrent): 0.20s (489,161/s)
100,000 stats (14 concurrent): 0.19s (522,787/s)
100,000 stats (15 concurrent): 0.21s (471,462/s)
100,000 stats (16 concurrent): 0.16s (611,625/s)
100,000 stats (17 concurrent): 0.20s (508,303/s)
100,000 stats (18 concurrent): 0.19s (529,646/s)
100,000 stats (19 concurrent): 0.17s (571,975/s)
100,000 stats (20 concurrent): 0.18s (547,551/s)
<buffer too small> stats (21 concurrent): 0.19s (<buffer too small>/s)
<buffer too small> stats (22 concurrent): 0.20s (<buffer too small>/s)
<buffer too small> stats (23 concurrent): 0.14s (<buffer too small>/s)
<buffer too small> stats (24 concurrent): 0.16s (<buffer too small>/s)
<buffer too small> stats (25 concurrent): 0.20s (<buffer too small>/s)
<buffer too small> stats (26 concurrent): 0.14s (<buffer too small>/s)
<buffer too small> stats (27 concurrent): 0.18s (<buffer too small>/s)
<buffer too small> stats (28 concurrent): 0.13s (<buffer too small>/s)
<buffer too small> stats (29 concurrent): 0.12s (<buffer too small>/s)
<buffer too small> stats (30 concurrent): 0.18s (<buffer too small>/s)
<buffer too small> stats (31 concurrent): 0.17s (<buffer too small>/s)
<buffer too small> stats (32 concurrent): 0.19s (<buffer too small>/s)
async1: 10.92 sec (91,535/sec)
async2: 11.17 sec (89,528/sec)
async4: 10.07 sec (99,263/sec)
async8: 16.16 sec (61,887/sec)
async_pummel_1: 1,000,000 callbacks in 0.98 seconds (1,023,131/sec)
async_pummel_2: 1,000,000 callbacks in 0.99 seconds (1,014,737/sec)
async_pummel_4: 1,000,000 callbacks in 1.50 seconds (666,241/sec)
async_pummel_8: 1,000,000 callbacks in 2.28 seconds (437,983/sec)
spawn: 861 spawns/s
20000 threads created in 0.25 seconds (79513/s)
12,277,155 async events in 5.0 seconds (2,455,431/s, 1,048,576 unique handles seen)
0.30 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment