Conversation

I’ve never understood the “async I/O is too complicated, why can’t we just use goroutines?” criticism of Rust. You can! They’re called threads, and they work great.
14
150
This Tweet was deleted by the Tweet author. Learn more
The point is that green threads aren’t that much more scalable than regular OS threads, and most people would be fine with just OS threads.
2
10
Replying to and
You can spawn far more than thousands of OS threads. The practical limit on Linux for threads with guard pages is based on the arbitrary max_map_count configuration option, and that's due to the approach to detecting stack overflow rather than the choice of 1:1 vs M:N scheduling.
1
9
There's enough address space on x86_64 and arm64 to spawn literally millions of threads with an 8MiB stack mapping anyway. It doesn't depend on overcommit either, since you can implement stacks per the main thread stack by reserving the space and mapping it in as it's touched.
1
4
Replying to and
Well, yeah, but you still allocate in place granularity, right?. RAM is the most expensive real estate you have in your server. The less you use it, the cheaper your are. This is especially true fur long lived connections, where a busy server is expected to keep a few millions..
1
Show replies
Replying to and
Also, your staff grows with page granularity, so if your threads are really tiny, e.g., static resource http server, m:n can reduce your mem usage per connection N:M can make concurrent design easier, since you can use per CPU structures and not worry about locks a la
1
3