Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> OS threads are not significantly different from goroutines in terms of efficiency

This is not true for a use case with a lot of connections, additionally context switch cost a lot more now with all side channel attack mitigations on.



People are happily running Rust servers in production using thousands of concurrent threads per second.


At the same time, many others do need more power; that’s why async/await is asked for so often.


I don't doubt that but apparently we have different definitions of a lot. Additionally latency and hardware also matters, I can say that C is doing n things a second while PHP is doing the same but C is running on EC2 micro instance and PHP is running on 2x Intel Xeon Platinum 9282 dedicated machine. C10K problem was not solved by 1:1 model and this is an old problem. C100K+ is what I see in some of production systems I work on.


OK, but, I mean, we've done this experiment, and we found that M:N in Rust was slower than 1:1.


Thousands isn't much.


You can scale up to tens of thousands of threads. But if that isn't enough for your application, then you can use async!

M:N threading was slower than 1:1 in Rust.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: