3 ms·
> Go processes do not typically have 1M or 10M active goroutines at once. It depends on domain, but in my domain of high-RPS network servers, they absolutely d
by sagichmal 7y ago
> Go processes do not typically have 1M or 10M active goroutines at once.
It depends on domain, but in my domain of high-RPS network servers, they absolutely do.
> 10M goroutines would mean 20GB just for stacks.
When I deploy to metal, the average host has ~512GB of RAM, and not much cotenancy.
> The 2kB minimum stack size is on the same order of magnitude as the 10kB POSIX thread stack size.
There's also a question of cost to create and destroy; it's very common for goroutines to live for O(µs). I don't know how POSIX threads compare here.