I've moved the basic single threaded implementation into its own module, and added several simple threaded implementations: mioco, scoped-pool, and threadpool.
The actual executable must now be run with an argument to choose which implementation to use. Options are "ws", "scopedpool-ws", "threadpool-ws", "mioco-ws". For example, bin/rust-ws-server mioco-ws. Threads can be tuned with a --thread/-t parameter.
All the variations run on my computer and use more than one CPU. I didn't really see much better performance but I suspect that's due to running everything including the bencher locally. Maybe if they don't actually perform well someone else will take up the mantle of fixing them :).
Very interested to see how these compare when run in a more appropriate testing environment.
Thanks! I ran some preliminary tests and threadpool-ws seemed to perform best beating the single threaded by about 30%. mioco_ws just hung. Not sure what was going on there.
I've moved the basic single threaded implementation into its own module, and added several simple threaded implementations: mioco, scoped-pool, and threadpool.
The actual executable must now be run with an argument to choose which implementation to use. Options are "ws", "scopedpool-ws", "threadpool-ws", "mioco-ws". For example,
bin/rust-ws-server mioco-ws
. Threads can be tuned with a--thread/-t
parameter.All the variations run on my computer and use more than one CPU. I didn't really see much better performance but I suspect that's due to running everything including the bencher locally. Maybe if they don't actually perform well someone else will take up the mantle of fixing them :).
Very interested to see how these compare when run in a more appropriate testing environment.