1

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?

2 Answers 2

1

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:

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.

7
  • So if the site needs to support 1500 concurrent users, does that mean we should set the "task max threads" to 1500? I have tried that, but all it does is slow down all the page requests during high load. Feb 3, 2020 at 6:12
  • For "Io threads", the description is "the number of I/O threads to create for the worker". So by IO, i assume it means file access? So if my apps does not read and write from files, i can just keep that as default? Feb 3, 2020 at 6:14
  • @iWantSimpleLife, performance is not a simple thing. Number of threads is a tuning parameter but it depends on how much work these threads need to do, your server CPU, RAM, your server storage, etc. whether tuning the number of threads makes any difference. If your server is fully loaded with lower number of threads, then increasing them would hardly help. If server has free capacity with lower number of threads, then increasing them will likely help serve more users. Capacity might be CPU, memory amount/speed or IO/network speed. Feb 3, 2020 at 13:54
  • That's is why I'm trying to understand the relationship and difference between "Io threads" and "Task max threads". I have no idea what impact each setting has on the other. If my CPU is showing low utilisation and there are lots of free ram available, on a 6 core CPU, what would be a reasonable setting to start testing if I need to handle a surge load of 1500 users within a time span of 15 seconds? Feb 4, 2020 at 0:09
  • @iWantSimpleLife, given your given usage data I'd say and the documents I linked, I'd say something between 100 and 300 threads. See my updated answer for a link to the full performance tuning guide. Seems like this is what you need. Feb 4, 2020 at 12:28
0

@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.

1
  • Hi, Thanks for the addition. However, through experimentation on a jboss installation, i have discovered that any number that i add above the jboss default to any of those settings, tend to have a negative impact to the performance, overall making JBoss slower. Except on very specific cases. Jun 8, 2020 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .