brettwooldridge / NuProcess

Low-overhead, non-blocking I/O, external Process implementation for Java
Apache License 2.0
710 stars 84 forks source link

Remove static EpollEvent queue. (fixes #126) #138

Closed bturner closed 2 years ago

bturner commented 2 years ago

When creating many processes concurrently under load, it's possible to exhaust the 64 EpollEvents in the queue and end up with threads blocked waiting for one to free up. If such a thread gets interrupted, it ends up leaking the process as a zombie.

I ran the jmh microbenchmark before and after this change to check the allocation rate and found no measurable difference. There was also no measurable difference in performance.