I would like to know more detail about this claim.
The scenario you are describing is one were 64-128 OS threads are fully blocked waiting for IO. If that's the case, is it likely that you will have additional unused IO resources that could be being utilized?
Also, what overhead do you see as the main limit on spawning a lot of threads? Is that the CPU time of context switching? If so, in this scenario CPU is not the bottleneck, and switching between processes will be nothing, especially with a 32-64 core CPU.
This is a genuine question as I have never worked on an application that got close to maxing out either approach.
One likely scenario is that you've issued 128 RPCs to some other services and are waiting to hear back. Even if each RPC is, say, on a separate TCP connection, your network stack can handle plenty more.
> Also, what overhead do you see as the main limit on spawning a lot of threads? Is that the CPU time of context switching? If so, in this scenario CPU is not the bottleneck, and switching between processes will be nothing, especially with a 32-64 core CPU.
I don't remember what specific feature of OS threads contributes the most to overhead, and maybe someone else can answer this better. But context-switching burdens both the CPU and RAM (due to saved stacks).
> This is a genuine question
I always assume this anyway. Maybe not on Reddit ;)
I think I'm going to do some research and see what benchmarks/measurements I can find.
Also can say at least that paging to/from disk or using memory compression would dominate all other overheads, and it's not something to rely on here.
NodeJS did it right, and it's hard to call a 14-year-old technology a fad.