When Running the Java Application in a single core container I want to specify the value of I/O Thread Pool Size as 1.
But SDK overrides the value to 3.
2019-07-20 12:01:55.086 INFO 26888 — [ main] c.c.client.core.env.CoreEnvironment : ioPoolSize is less than 3 (1), setting to: 3
2019-07-20 12:01:55.086 INFO 26888 — [ main] c.c.client.core.env.CoreEnvironment : computationPoolSize is less than 3 (1), setting to: 3
My Java Application uses Spring Data Reactor and hence I want to limit the number of threads. Please advise.
Hi,
we force it to a minimum of 3 to prevent deadlocks in certain scenarios. Even if you are using spring data reactor, you likely want a minimum of 3 IO loops since we evenly spread out the IO load to those, netty will assign the sockets to them.
Is there a specific issue you are seeing as a result why you want to tune that variable in the first place? If not, I’d leave it at the default (or 3) and not worry about it. Again, those loops are not blocking but rather non-blockion IO netty loops to perform the lower level ops.
Since I have only one (1) CPU core assigned to the application container, I wanted to restrict the thread pool size to one (1), to restrict the amount of context switching because I am using Spring Reactor.