jonhoo / volley

Volley is a benchmarking tool for measuring the performance of server networking stacks.
MIT License
123 stars 12 forks source link

Make servers call accept from multiple threads to lower setup time #18

Open jonhoo opened 9 years ago

jonhoo commented 9 years ago

All current servers call accept from only a single thread, meaning benchmarks with a larger number of clients (#14) see a very high setup cost. While this does not affect the benchmark results, it does significantly increase benchmarking time. We should have the server accept connections using more threads (up to the number of available CPUs) to speed this up.

Unfortunately, benchmarks where the server is given only a single CPU will naturally still be slow, but it's better for this to be the case for a few tests than for all of them.

jonhoo commented 9 years ago

This seems to be a particularly bad problem for c-threaded which starts refusing client connections. I'm not sure why this doesn't also happen for the Rust server which (afaict) doesn't do anything funky with the socket beyond calling accept in a loop...