Açıklaması şöyle
You might have heard about io_uring: a new addition to the kernel which specifically targets providing a uniform asynchronous API for all kinds of I/O operations, including, first and foremost, operations on local files.
Project Loom ve io_uring
Açıklaması şöyle. Yani JDK 21 kullanıyorsak worker thread sayısını hem JVM'de hem de işletim sisteminde ayarlamak gerekir
It can, and it probably will (probably only for local files, as io_uring's performance gains over epoll aren't consistent, and the implementation itself frequently has security vulnerabilities). However, this only shifts the problem instead of fully solving it.From the application’s perspective, we get a non-blocking, asynchronous API for file access. But if we look at what happens under the covers in io_uring, we'll discover that it manages a thread pool for blocking operations, such as these on local files. Hence instead of running compensating threads in the JVM, we'll get threads run and managed by io_uring.This has some configuration implications. If you’d like to set an upper bound on the number of kernel threads used by your application, you’ll now have to configure both the JVM with its carrier thread pool, as well as io_uring, to cap the maximum number of threads it starts. Luckily, there's a great article describing how to do precisely that.
Hiç yorum yok:
Yorum Gönder