3 ms·
Thank you for the detailed write up! Why are their many processors? If it’s all one thread, why not just use one processor?
by erikpukinskis 7y ago
Thank you for the detailed write up!
Why are their many processors? If it’s all one thread, why not just use one processor?
- carllerche 7y agoThere is one processor per thread. Sorry, the article must not have been clear. If you can point out where in the article you got the impression there were multiple processors per thread, I can try to update the article to fix.
- erikpukinskis 7y agoI just got a bit into the “One queue, many processors” section and that’s where I got confused. Knowing it’s one processor per CPU is the information I needed. Thanks!
- carllerche 7y agoFrom that section. > There are multiple processors, each running on a separate thread. It's probably easy to miss, do you have thoughts on where else this can be clarified?
- mopierotti 7y agoNot OP, but I had to go back and double check that this was true when I saw that the Hyper benchmark at the bottom only used 1 thread. Wouldn't you want to test on multiple?
- carllerche 7y agoThe Hyper benchmark uses multiple threads. When I ran the benchmark, I modified the version found in Hyper's github to use both the old multi-threaded scheduler and the new multi-threaded scheduler. I probably should make that clear in the article.
- bluejekyll 7y agoFrom the article: "While it is possible to design a system where resources, tasks, and the processor all exist on a single thread, Tokio chooses to use multiple threads. We live in a world where computers come with many CPUs. Designing a single-threaded scheduler would result in hardware underutilization. We want to use all of our CPUs."
- deleted 7y ago[deleted]