brettwooldridge/NuProcess

Virtual threads?

yawaramin opened this issue · 1 comments

This is just a question to satisfy my curiosity. Per the readme:

However, when it comes to memory there is a significant difference. The overhead of 500 threads, for example, is quite large compared to the one or few threads employed by NuProcess.

What does the overhead look like with Java's new virtual threads? It should be significantly reduced, iiuc?

I'm super curious about this comparison, I found this blog post
https://github.com/marcobehler/marcobehler-guides/blob/main/java-project-loom.adoc#filesystem-calls

To cut a long story short, your file access call inside the virtual thread, will actually be delegated to a (…​.drum roll…​.) good-old operating system thread, to give you the illusion of non-blocking file access.

There is also io_uring feature in new Linux kernels
https://github.com/ikorennoy/jasyncfio

How these both compare to NuProcess?