jonhoo / volley

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

Multiplexing rust server #22

Closed jonhoo closed 9 years ago

jonhoo commented 9 years ago

This branch introduces a single multiplexing Rust server based on #19 and #20 that operates as follows: With n cores, 2n threads are spawned:

Benchmark results will be posted shortly.

jonhoo commented 9 years ago

As the number of clients goes up, this outperforms the one-thread-per-client approach. I expect this trend to be even more visible with a larger number of clients.. Benchmarking that next.

rust-multiplex vs rust

jonhoo commented 9 years ago

Plot above updated to reflect changes in 6bc0a1a783c50fd1d13a463282784caa53b316c4

jonhoo commented 9 years ago

Interestingly, rust-multiplexperforms better than rust for a smaller number of cores, but on a larger number of cores, rust outperforms (and scales past) rust-multiplex...

rust-multiplex vs rust across no. of clients

xekoukou commented 9 years ago

Could you also give data on the worker pool? (channeled-based thread worker pool)

I believe it will be twice as fast.

jonhoo commented 9 years ago

@xekoukou no, rust-multiplex is always faster, and has significantly lower variance in latency.

rust-channels vs rust vs rust-multiplex

xekoukou commented 9 years ago

Probably, it was due to my 2-core laptop that i saw the difference.

By the way, a variance in latency is not a variance in the mean ops per second. The mean ops per second is quite stable.

jonhoo commented 9 years ago

Variance should translate exactly to variance in ops per second (though admittedly not to mean ops per second), as ops/s = 1/(s/op).