> For many types of common webserver workloads (i.e. lots of IO, relatively minor CPU usage), NodeJS can actually scale much better than Java with its thread-per-request model
Linux can handle a ginormous amount of threads quite well, would be interesting to see a deeper investigation to this theory.
The problem with doing it all native is that stack sizes are quite variable, especially in managed languages where modularity and code reuse works better, so it's common to have tons of libraries in a single project. The kernel won't object to lots of threads, but once those threads have been running for a while a lot of stack space will be paged in and used.
Loom solves this by moving stacks to and from the heap, where there's a compacting concurrent GC to clean up the unused space.
Linux can handle a ginormous amount of threads quite well, would be interesting to see a deeper investigation to this theory.