-
-
Notifications
You must be signed in to change notification settings - Fork 1
Remove double threadpool #1
Comments
You're totally right! I've known about this for quite a while, but have never really had the time to change it to a single-pooled design (although that should be fairly simple). Thanks for the issue report though, issues, ideas and feedback are always welcome! It seems like you've already transferred the logic to use a single thread pool, feel free to submit a pull request for this change. You've currently posted this issue on the I would like to note that this isn't a finished product, by far. So far I've only really been able to work on it in a prototyping phase. I really want to release a proper polished version some day, although I can't tell when that will be. The current state of the project is quite messy, to be honest. |
Oh woops! I completely missed that this was the renderer 😅 I'll repost this on the proper repo. But I understand that this is prototype software. I'm a huge Rust fan and maybe for GPN next year we can have a server that can handle several 10G NICs in a proper server 😉 |
@spacekookie that sounds awesome! |
Right now you're spawning a thread for each cpu core (with
thread::spawn(...)
and executing a worker on it. Then for each worker you create a tokio cpu_pool with 8 (hardcoded) threads. This means that you will, on an 8 "core" system, spawn 64 threads, meaning a lot of context switching.The tokio
cpu_pool
is actually designed to scale Async I/O futures across available CPU cores. Removing the second layer of thread pooling decreases memory consumption by about half and increases throughput (on my laptop, binding to127.0.0.1
by about 30%The text was updated successfully, but these errors were encountered: