3 ms·
That doesn't sound right to me. There are 10k clients, each sending (and the server echoing) one small timestamp record per second. An AWS medium instance has
by ajross 14y ago
That doesn't sound right to me. There are 10k clients, each sending (and the server echoing) one small timestamp record per second. An AWS medium instance has access to half a DRAM pipe (frankly this test should fit entirely in L3 cache, but let's be conservative). The back of my envelope says that the RAM bandwidth can handle about 100kb of data copying per send or receive event. That's a staggeringly large amount of copying, literally thousands of times larger than the size of the record.
Honestly I think CPU or syscall overhead is a more likely culprit.
- halayli 14y agoYou'd think. Write a web server in C and a web server in python/erlang/go/node.js. You'll notice that the one written in C (or C++) runs twice as fast. If it was a syscall bottleneck then they'd achieve the same performance. zero-copy request handling is not possible in high level languages without hacking. For a quick test, run httperf against the dumbest node.js web server that returns 204. Then run the same test against an nginx server that does nothing but return a 204 location / { return 204; } Compare the difference.