Multiple Poller Threads
Nathan Reynolds
numeralnathan at gmail.com
Mon May 10 17:33:25 UTC 2021
I was reading this article about Networking I/O with Virtual Threads.
https://inside.java/2021/05/10/networking-io-with-virtual-threads/ I enjoy
reading about the updates. Virtual threads is something I look forward to
with great anticipation.
The article says there is a read poller and a write poller. Can the number
of pollers be configured? If not, please make this configurable.
One application server used to have a single poller and switched to
multiple pollers because a single poller did not perform well. I was not
involved with the application server's work but became aware of it when we
faced a similar problem with another application server.
The other application server used to have a single poller for its sockets.
That poller became a bottleneck in that it would have 100s of sockets to
dispatch and this increased latency and hence response times. The solution
was to allow for configuring the number of poller threads. This meant
fewer sockets to dispatch on a poller thread and hence better response
times.
Again, please make the number of pollers for virtual threads to be
configurable. There are already use cases where this will be needed.
The number of pollers needs to be configurable (including allowing a value
of 1). Each environment and software will perform differently with a
different number of pollers. There is no one size fits all. For example,
NUMA can make multiple pollers perform worse than a single poller.
More information about the loom-dev
mailing list