3 ms·
A million threads is a lot, but the reasonable limit is more like 100k idle threads than a few thousand, on 64-bit Linux.
by fulafel 5y ago
A million threads is a lot, but the reasonable limit is more like 100k idle threads than a few thousand, on 64-bit Linux.
- MichaelMoser123 5y agoif you get to a very high number of cooperative threads, then each such thread will have a very small stack (otherwise the OOM killer will get you). i am not sure that you can impose such limitations on the stack size in java.
- fulafel 5y agoIf you are short on memory, sure. 100k times 10 mb for example is just 1 TB, an order of magnitude or two less than what bigger x86 servers take.