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
Raise that arbitrary limit (there's no memory or performance cost) and the limit on the number of threads with guard pages goes up with it. The next practical limit is address space size due to stack size, but again that's a different design decision and not tied to 1:1 vs. M:N.
2
3
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
Replying to and
Go stacks currently start at 2048 bytes but there's substantial memory overhead elsewhere to implement the model, so that's a bit misleading. The difference is not what people make it out to be. I recommend trying it out and measuring actual memory usage for a simple TCP server.
1
3
Show replies