I am asking here because I cannot find much information on this…
What is the main use of the setting for “Io threads” and “Task max threads” under the IO subsystem workers configuration?
Everywhere I read, people are saying that the “Io threads” specify the number of concurrent requests that the server can handle, and that the “Task max threads” is the maximum number of concurrent requests that the server can handle.
So does this mean that if i set the “Io threads” to be 50, that means the JBoss can be handling 50 browser request concurrently?
I have a site where the requirement is to be able to serve 1500 concurrent user within a 15 second time frame. And each request should not take more then 3 seconds to complete. This includes downloading the html, js, css, and all the jpg files that the browser needs.
Does this mean that I need to set the “Io threads” to a higher number, like 100, and the “Task max threads” to 150?
I have tried setting “Task max threads” to 150, and even 250, and it seems to slow down my site.
Anyone can explain how these 2 settings work?
You don’t need to have a separate IO thread for each user connection usually. You may need task threads as many as concurrent users at any moment though to avoid slowdowns. You can try the defaults and see how they work for your application. See these support articles:
- Tuning the Undertow Thread Pool in JBoss EAP 7
- Differences in worker and I/O thread configuration between EAP 6 and EAP7
- A.29. IO Subsystem Attributes
Note that EAP 7.2 has additional core threads configuration for efficiency.
Update: Given you want more comprehensive instructions, better check the full Red Hat Enterprise Application Platform performance tuning guide.
Update 2: Because EAP 7 is using Undertow, to understand what IO and worker thread do, undertow docs should give some clues:
Management of IO and Worker threads
The XNIO worker manages both the IO threads, and a thread pool that
can be used for blocking tasks. In general non-blocking handlers will
run from within an IO thread, while blocking tasks such as Servlet
invocations will be dispatched to the worker thread pool.
@IWantSimpleLife as @akostadinov referred to the documentation describes the design and how “blocking IO” work is separate to handler work. I think I’m correct in saying to answer your question the “IO threads” and “Task max threads” are not directly related. I say that because they refer to two separate thread groups. The first is “Worker IO threads” which describes the initial group of IO related, “read” and “write” handlers that listen to nio channels and events. Ideally only 1 thread in the IO pool and it must never execute blocking (network or file) processing. The other group is generally called “Worker Task Threads” group. Which is dedicated to executing blocking work. One of the settings of this second group will be “Task max threads” size.