3 ms·
Like all virtual memory the stack isn't actually allocated until it's used. So, no, that doesn't grow memory quickly. And while it's great Netty will get you t
by kllrnohj 12y ago
Like all virtual memory the stack isn't actually allocated until it's used.
So, no, that doesn't grow memory quickly. And while it's great Netty will get you to 100k connections, you can totally have 100k real threads on Linux. In fact, as far back as 2.5 in 2003 starting & stopping 100,000 concurrent threads took just 2 seconds with the introduction of NPTL. CPUs & memory have gotten a smidge faster since the Pentium 4 days so that time has almost certainly dropped significantly.
- sehugg 12y agoBut the stack will be used for each request, especially in Java app servers where stacks are often dozens of frames deep. The lowest stack size I could get away with for Tomcat 6/JDK 1.6 was 128 KB. Sure, you could do better with a lightweight C/C++ solution.