{"action":"created","issue":{"url":"https://api.github.com/repos/uber/tchannel-node/issues/238","labels_url":"https://api.github.com/repos/uber/tchannel-node/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/uber/tchannel-node/issues/238/comments","events_url":"https://api.github.com/repos/uber/tchannel-node/issues/238/events","html_url":"https://github.com/uber/tchannel-node/pull/238","id":120622649,"number":238,"title":"WIP WIP: From scratch tchannelv2 @ 40k QPS","user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-06T10:02:54Z","updated_at":"2015-12-06T10:17:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uber/tchannel-node/pulls/238","html_url":"https://github.com/uber/tchannel-node/pull/238","diff_url":"https://github.com/uber/tchannel-node/pull/238.diff","patch_url":"https://github.com/uber/tchannel-node/pull/238.patch"},"body":"This branch is purely an exploration that I want to share.\n\nThe hypothesis is to see just **how** fast can you make a valid\ntchannel v2 client & server if your allowed to break back compat\non the public interface.\n\nThere are a bunch of tricks used in this branch that can be\nbackported to master for performance wins.\n\nI want to continue exploring performance on this branch to see\njust how blazingly fast an RPC library can be.\n\nTODO:\n\n - [ ] object pooling\n - [ ] header caching\n - [ ] be smarter about buffers & writing.\n\nThis branch right now is back at redis-like level of performance.\n\n```\njakev@hyperbahn-staging02-sjc1:~/tchannel-node/benchmarks$ git checkout cheat-client-server \nBranch cheat-client-server set up to track remote branch cheat-client-server from origin.\nSwitched to a new branch 'cheat-client-server'\njakev@hyperbahn-staging02-sjc1:~/tchannel-node/benchmarks$ make take\nnode index.js --cheatServer --noEndpointOverhead -o $(git rev-parse --short HEAD).json -- \\\n\t\t-m 3 -s 128,4096 -r 50000 -p 5000,10000,20000 --cheatClient\nrunning /home/jakev/tchannel-node/benchmarks/cheat-channel/bench_server[120395]\nrunning /home/jakev/tchannel-node/benchmarks/multi_bench[120451]\n1:          PING,  5000/0 min/max/avg/p95:    5/ 253/ 120.24/ 218.00   1283ms total, 38971.16 ops/sec\n1:          PING,  5000/0 min/max/avg/p95:    5/ 259/ 120.26/ 222.55   1271ms total, 39339.10 ops/sec\n1:          PING,  5000/0 min/max/avg/p95:    5/ 248/ 117.36/ 219.55   1242ms total, 40257.65 ops/sec\n1:          PING, 10000/0 min/max/avg/p95:    5/ 505/ 221.31/ 453.55   1199ms total, 41701.42 ops/sec\n1:          PING, 10000/0 min/max/avg/p95:    7/ 498/ 220.57/ 452.55   1193ms total, 41911.15 ops/sec\n1:          PING, 10000/0 min/max/avg/p95:    5/ 506/ 223.24/ 455.10   1210ms total, 41322.31 ops/sec\n1:          PING, 20000/0 min/max/avg/p95:    6/1119/ 417.16/ 964.55   1231ms total, 40617.38 ops/sec\n1:          PING, 20000/0 min/max/avg/p95:    6/1113/ 414.31/ 983.00   1262ms total, 39619.65 ops/sec\n1:          PING, 20000/0 min/max/avg/p95:   14/1114/ 413.89/ 949.55   1227ms total, 40749.80 ops/sec\n1:      SET 128B,  5000/0 min/max/avg/p95:    1/ 291/ 127.76/ 246.00   1360ms total, 36764.71 ops/sec\n1:      SET 128B,  5000/0 min/max/avg/p95:    1/ 271/ 121.81/ 239.00   1286ms total, 38880.25 ops/sec\n1:      SET 128B,  5000/0 min/max/avg/p95:    1/ 271/ 115.66/ 226.00   1227ms total, 40749.80 ops/sec\n1:      GET 128B,  5000/0 min/max/avg/p95:    1/ 264/ 117.71/ 233.00   1239ms total, 40355.13 ops/sec\n1:      GET 128B,  5000/0 min/max/avg/p95:    2/ 283/ 122.74/ 241.00   1291ms total, 38729.67 ops/sec\n1:      GET 128B,  5000/0 min/max/avg/p95:    2/ 284/ 121.63/ 240.55   1275ms total, 39215.69 ops/sec\n1:      SET 128B, 10000/0 min/max/avg/p95:    4/ 527/ 233.00/ 478.55   1254ms total, 39872.41 ops/sec\n1:      SET 128B, 10000/0 min/max/avg/p95:    4/ 527/ 229.03/ 469.00   1232ms total, 40584.42 ops/sec\n1:      SET 128B, 10000/0 min/max/avg/p95:    4/ 566/ 242.59/ 489.10   1300ms total, 38461.54 ops/sec\n1:      GET 128B, 10000/0 min/max/avg/p95:    2/ 558/ 235.74/ 494.55   1267ms total, 39463.30 ops/sec\n1:      GET 128B, 10000/0 min/max/avg/p95:    2/ 537/ 223.89/ 454.55   1204ms total, 41528.24 ops/sec\n1:      GET 128B, 10000/0 min/max/avg/p95:    2/ 531/ 229.19/ 473.55   1246ms total, 40128.41 ops/sec\n1:      SET 128B, 20000/0 min/max/avg/p95:    6/1103/ 414.43/ 964.55   1217ms total, 41084.63 ops/sec\n1:      SET 128B, 20000/0 min/max/avg/p95:    5/1110/ 421.82/ 996.55   1253ms total, 39904.23 ops/sec\n1:      SET 128B, 20000/0 min/max/avg/p95:    5/1097/ 412.11/ 971.00   1208ms total, 41390.73 ops/sec\n1:      GET 128B, 20000/0 min/max/avg/p95:    2/ 998/ 374.36/ 830.30   1129ms total, 44286.98 ops/sec\n1:      GET 128B, 20000/0 min/max/avg/p95:    2/1008/ 374.67/ 863.00   1108ms total, 45126.35 ops/sec\n1:      GET 128B, 20000/0 min/max/avg/p95:    2/1006/ 374.37/ 830.95   1143ms total, 43744.53 ops/sec\n1:      SET 4KiB,  5000/0 min/max/avg/p95:    1/ 399/ 170.04/ 330.55   1795ms total, 27855.15 ops/sec\n1:      SET 4KiB,  5000/0 min/max/avg/p95:    1/ 350/ 157.29/ 301.00   1661ms total, 30102.35 ops/sec\n1:      SET 4KiB,  5000/0 min/max/avg/p95:    1/ 365/ 157.35/ 299.00   1669ms total, 29958.06 ops/sec\n1:      GET 4KiB,  5000/0 min/max/avg/p95:   20/ 204/ 103.80/ 168.55   1144ms total, 43706.29 ops/sec\n1:      GET 4KiB,  5000/0 min/max/avg/p95:   13/ 159/  96.23/ 131.00   1065ms total, 46948.36 ops/sec\n1:      GET 4KiB,  5000/0 min/max/avg/p95:   18/ 216/  98.49/ 142.55   1074ms total, 46554.93 ops/sec\n1:      SET 4KiB, 10000/0 min/max/avg/p95:    4/ 661/ 287.65/ 579.10   1562ms total, 32010.24 ops/sec\n1:      SET 4KiB, 10000/0 min/max/avg/p95:    4/ 655/ 288.41/ 560.10   1557ms total, 32113.04 ops/sec\n1:      SET 4KiB, 10000/0 min/max/avg/p95:    5/ 674/ 296.27/ 606.55   1605ms total, 31152.65 ops/sec\n1:      GET 4KiB, 10000/0 min/max/avg/p95:   14/ 593/ 192.52/ 355.00   1111ms total, 45004.50 ops/sec\n1:      GET 4KiB, 10000/0 min/max/avg/p95:   22/ 452/ 203.97/ 356.55   1170ms total, 42735.04 ops/sec\n1:      GET 4KiB, 10000/0 min/max/avg/p95:   51/ 576/ 187.89/ 467.00   1052ms total, 47528.52 ops/sec\n1:      SET 4KiB, 20000/0 min/max/avg/p95:    5/1401/ 535.80/1270.85   1579ms total, 31665.61 ops/sec\n1:      SET 4KiB, 20000/0 min/max/avg/p95:    6/1505/ 543.83/1271.10   1687ms total, 29638.41 ops/sec\n1:      SET 4KiB, 20000/0 min/max/avg/p95:    6/1478/ 559.80/1295.00   1674ms total, 29868.58 ops/sec\n1:      GET 4KiB, 20000/0 min/max/avg/p95:   99/ 547/ 368.54/ 504.55   1104ms total, 45289.86 ops/sec\n1:      GET 4KiB, 20000/0 min/max/avg/p95:   93/ 581/ 377.03/ 537.00   1169ms total, 42771.60 ops/sec\n1:      GET 4KiB, 20000/0 min/max/avg/p95:   66/ 580/ 368.64/ 518.00   1110ms total, 45045.05 ops/sec\nchild exited /home/jakev/tchannel-node/benchmarks/multi_bench[120451] code 0 signal null\nbenchmark finished\nchild exited /home/jakev/tchannel-node/benchmarks/cheat-channel/bench_server[120395] code 143 signal null\nln -sf $(git rev-parse --short HEAD).json $(basename $(git symbolic-ref HEAD)).json\n```"},"comment":{"url":"https://api.github.com/repos/uber/tchannel-node/issues/comments/162298148","html_url":"https://github.com/uber/tchannel-node/pull/238#issuecomment-162298148","issue_url":"https://api.github.com/repos/uber/tchannel-node/issues/238","id":162298148,"user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"created_at":"2015-12-06T10:17:37Z","updated_at":"2015-12-06T10:17:37Z","body":"I can't help myself:\r\n\r\n```\r\njakev@hyperbahn-staging02-sjc1:~/tchannel-node/benchmarks$ make take\r\nnode index.js --cheatServer --noEndpointOverhead -o $(git rev-parse --short HEAD).json -- \\\r\n\t\t-m 3 -s 128,4096 -r 50000 -p 5000,10000,20000 --cheatClient\r\nrunning /home/jakev/tchannel-node/benchmarks/cheat-channel/bench_server[75813]\r\nrunning /home/jakev/tchannel-node/benchmarks/multi_bench[75816]\r\n1:          PING,  5000/0 min/max/avg/p95:    5/ 249/ 116.06/ 212.00   1240ms total, 40322.58 ops/sec\r\n1:          PING,  5000/0 min/max/avg/p95:    3/ 255/ 110.40/ 203.00   1174ms total, 42589.44 ops/sec\r\n1:          PING,  5000/0 min/max/avg/p95:    4/ 273/ 124.18/ 224.55   1321ms total, 37850.11 ops/sec\r\n1:          PING, 10000/0 min/max/avg/p95:    6/ 508/ 221.18/ 443.10   1191ms total, 41981.53 ops/sec\r\n1:          PING, 10000/0 min/max/avg/p95:    5/ 482/ 213.65/ 431.00   1154ms total, 43327.56 ops/sec\r\n1:          PING, 10000/0 min/max/avg/p95:    5/ 497/ 219.95/ 453.65   1186ms total, 42158.52 ops/sec\r\n1:          PING, 20000/0 min/max/avg/p95:    6/1021/ 388.38/ 889.55   1154ms total, 43327.56 ops/sec\r\n1:          PING, 20000/0 min/max/avg/p95:    7/1063/ 395.52/ 903.65   1177ms total, 42480.88 ops/sec\r\n1:          PING, 20000/0 min/max/avg/p95:    6/1072/ 402.07/ 947.10   1189ms total, 42052.14 ops/sec\r\n1:      SET 128B,  5000/0 min/max/avg/p95:    1/ 272/ 119.98/ 232.55   1272ms total, 39308.18 ops/sec\r\n1:      SET 128B,  5000/0 min/max/avg/p95:    1/ 271/ 118.69/ 230.55   1258ms total, 39745.63 ops/sec\r\n1:      SET 128B,  5000/0 min/max/avg/p95:    3/ 265/ 122.13/ 229.00   1282ms total, 39001.56 ops/sec\r\n1:      GET 128B,  5000/0 min/max/avg/p95:    2/ 278/ 120.32/ 232.00   1254ms total, 39872.41 ops/sec\r\n1:      GET 128B,  5000/0 min/max/avg/p95:    2/ 277/ 122.25/ 238.00   1285ms total, 38910.51 ops/sec\r\n1:      GET 128B,  5000/0 min/max/avg/p95:    3/ 288/ 129.59/ 248.55   1358ms total, 36818.85 ops/sec\r\n1:      SET 128B, 10000/0 min/max/avg/p95:    4/ 519/ 225.93/ 467.55   1215ms total, 41152.26 ops/sec\r\n1:      SET 128B, 10000/0 min/max/avg/p95:    6/ 531/ 227.60/ 459.55   1221ms total, 40950.04 ops/sec\r\n1:      SET 128B, 10000/0 min/max/avg/p95:    5/ 553/ 234.67/ 476.00   1262ms total, 39619.65 ops/sec\r\n1:      GET 128B, 10000/0 min/max/avg/p95:    2/ 545/ 228.16/ 476.00   1239ms total, 40355.13 ops/sec\r\n1:      GET 128B, 10000/0 min/max/avg/p95:    2/ 533/ 229.90/ 474.55   1240ms total, 40322.58 ops/sec\r\n1:      GET 128B, 10000/0 min/max/avg/p95:    3/ 513/ 220.09/ 456.00   1184ms total, 42229.73 ops/sec\r\n1:      SET 128B, 20000/0 min/max/avg/p95:   10/1069/ 408.93/ 970.20   1191ms total, 41981.53 ops/sec\r\n1:      SET 128B, 20000/0 min/max/avg/p95:    5/1110/ 423.27/ 964.65   1250ms total, 40000.00 ops/sec\r\n1:      SET 128B, 20000/0 min/max/avg/p95:    5/1109/ 417.53/ 992.00   1223ms total, 40883.07 ops/sec\r\n1:      GET 128B, 20000/0 min/max/avg/p95:    2/ 963/ 361.31/ 839.20   1085ms total, 46082.95 ops/sec\r\n1:      GET 128B, 20000/0 min/max/avg/p95:    2/ 973/ 360.96/ 831.00   1073ms total, 46598.32 ops/sec\r\n1:      GET 128B, 20000/0 min/max/avg/p95:    2/ 949/ 353.74/ 782.10   1055ms total, 47393.36 ops/sec\r\n1:      SET 4KiB,  5000/0 min/max/avg/p95:    6/ 313/ 130.60/ 253.55   1387ms total, 36049.03 ops/sec\r\n1:      SET 4KiB,  5000/0 min/max/avg/p95:    5/ 281/ 118.30/ 224.00   1254ms total, 39872.41 ops/sec\r\n1:      SET 4KiB,  5000/0 min/max/avg/p95:    3/ 327/ 128.27/ 246.55   1365ms total, 36630.04 ops/sec\r\n1:      GET 4KiB,  5000/0 min/max/avg/p95:   13/ 240/ 108.46/ 207.55   1166ms total, 42881.65 ops/sec\r\n1:      GET 4KiB,  5000/0 min/max/avg/p95:   18/ 187/ 114.20/ 159.55   1216ms total, 41118.42 ops/sec\r\n1:      GET 4KiB,  5000/0 min/max/avg/p95:   28/ 185/ 113.42/ 158.00   1188ms total, 42087.54 ops/sec\r\n1:      SET 4KiB, 10000/0 min/max/avg/p95:    6/ 595/ 252.45/ 524.55   1382ms total, 36179.45 ops/sec\r\n1:      SET 4KiB, 10000/0 min/max/avg/p95:    4/ 620/ 269.14/ 547.00   1454ms total, 34387.90 ops/sec\r\n1:      SET 4KiB, 10000/0 min/max/avg/p95:    4/ 624/ 254.84/ 521.00   1389ms total, 35997.12 ops/sec\r\n1:      GET 4KiB, 10000/0 min/max/avg/p95:   11/ 386/ 196.22/ 352.00   1071ms total, 46685.34 ops/sec\r\n1:      GET 4KiB, 10000/0 min/max/avg/p95:   52/ 266/ 186.24/ 235.00   1032ms total, 48449.61 ops/sec\r\n1:      GET 4KiB, 10000/0 min/max/avg/p95:   38/ 272/ 188.96/ 242.00   1032ms total, 48449.61 ops/sec\r\n1:      SET 4KiB, 20000/0 min/max/avg/p95:    5/1223/ 457.12/1085.20   1349ms total, 37064.49 ops/sec\r\n1:      SET 4KiB, 20000/0 min/max/avg/p95:    5/1177/ 445.78/1018.40   1324ms total, 37764.35 ops/sec\r\n1:      SET 4KiB, 20000/0 min/max/avg/p95:    6/1191/ 453.62/1014.65   1344ms total, 37202.38 ops/sec\r\n1:      GET 4KiB, 20000/0 min/max/avg/p95:  113/ 660/ 414.80/ 588.00   1213ms total, 41220.12 ops/sec\r\n1:      GET 4KiB, 20000/0 min/max/avg/p95:   89/ 574/ 350.67/ 500.55   1062ms total, 47080.98 ops/sec\r\n1:      GET 4KiB, 20000/0 min/max/avg/p95:   97/ 492/ 348.08/ 459.00   1062ms total, 47080.98 ops/sec\r\nchild exited /home/jakev/tchannel-node/benchmarks/multi_bench[75816] code 0 signal null\r\nbenchmark finished\r\nchild exited /home/jakev/tchannel-node/benchmarks/cheat-channel/bench_server[75813] code 143 signal null\r\nln -sf $(git rev-parse --short HEAD).json $(basename $(git symbolic-ref HEAD)).json\r\n```\r\n\r\nAlmost 50k QPS @ 4kb "}}