3 ms·
NIO solved the problems with threads on the network in Java 1.5 (seminal cornerstone API that also had the concurrency package and rewrote the entire JVM memory
by bullen 4y ago
NIO solved the problems with threads on the network in Java 1.5 (seminal cornerstone API that also had the concurrency package and rewrote the entire JVM memory model), but only in 1.7 the epoll solution became stable.
2004 -> 2011, 7 years!
Now they hopefully can work around the kernel for file descriptors (network and disk) saving 30% CPU globally on all Java servers.
Many nuclear power plants wasted on the kernel.
- nicktelford 4y ago> Now they hopefully can work around the kernel for file descriptors (network and disk) saving 30% CPU globally on all Java servers. Can you expand on this a little? Are you referring to the necessity to copy between kernel memory and user-space memory, or something else?
- wolf550e 4y ago> Now they hopefully can work around the kernel for file descriptors (network and disk) saving 30% CPU globally on all Java servers. How does this work around the kernel? This lets you write java code that uses async IO but make it look nice, like golang code. But this isn't DPDK.
- bullen 4y agoThe JDK would have access to network card and SSD directly. Bypassing the kernel. Java is already sandboxed we don't need the kernel unless the net/ssd drivers crash completely. It's a huge task/risk, but 30% is alot.
- kaba0 4y agoCan’t it be done with MirageOS (OCaml lib that can create a bare-bones OS)
- exabrial 4y agoAwhile back I saw an implementation of a network stack in user space... unfortunately the author has a beef with Java and the Java version was written quite poorly; but despite that all versions were significantly faster than kernel (go figure). Really what you are proposing is that server Operating Systems and hardware should have a "general NIC" for mundane shared tasks, and a dedicated NIC for handing over to a process and saying GLHF.
- wolf550e 4y agoHow does virtual threads get you DPDK? How do other apps get access to the network card and the SSD if you bypass the kernel?
- giancarlostoro 4y ago> Many nuclear power plants wasted on the kernel. iTunes could have reached greater heights had they allowed nuclear plants.
- thesuperbigfrog 4y ago>> iTunes could have reached greater heights had they allowed nuclear plants. The old iTunes "Burn Disc" icon with its yellow and black colors and sharp angles always reminded me of the "Radiation Warning" symbol: https://cdn.osxdaily.com/wp-content/uploads/2009/09/burn-iso-mac.png https://cdn.osxdaily.com/wp-content/uploads/2009/09/burn-iso... https://en.wikipedia.org/wiki/File:Radiation_warning_symbol.svg https://en.wikipedia.org/wiki/File:Radiation_warning_symbol.... When you were burning your own custom mix CD, things got hot . . .