Performance Questions and Poller Implementation in Project Loom

Ilya Starchenko st.ilya.101 at gmail.com
Tue Oct 31 17:59:17 UTC 2023


Hello loom-dev team,


I would like to express my gratitude for the work being done on Project
Loom. It's an exciting project with a lot of potential. I have some
questions related to its performance that I would appreciate some
clarification on.


I recently came across a benchmark presentation by Alan Bateman at Devoxx<
https://youtu.be/XF4XZlPZc_c?si=-Qp2PampTbNGj3a5>, where the Helidon Nima
framework demonstrated better performance results compared to a reactive
framework. However, when I examined the Plaintext benchmark (specifically
focusing on Netty and Undertow, which benchmark only plaintext), I noticed
that Nima, which operates entirely on virtual threads, failed to outperform
even the blocking Undertow. Additionally, I conducted tests with Tomcat and
Jetty using Loom's executor, and they also did not exhibit significant
improvements compared to a reactive stack. Perhaps I should ask the Helidon
team, but my question is, is this the expected performance level for
Project Loom, or can we anticipate better performance in the future?


Furthermore, I took a closer look at the Poller implementation<
https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/nio/ch/Poller.java#L436>,
and I noticed that it utilizes only one thread (by default) for both read
and write polling. I'm curious why there's only one thread, and wouldn't it
be more efficient to have pollers matching the number of CPU cores for
optimal performance?


I look forward to your insights and guidance regarding these performance
concerns. Your expertise and feedback would be greatly appreciated.


- Ilya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20231031/4efcba62/attachment.htm>


More information about the loom-dev mailing list