'reactor.netty.ioWorkerCount different default count

According to netty documentation, default reactor.netty.ioWorkerCount count is max(4, number of cores), which seems true on local environment. I have a 6 core laptop, and the number of reactor-http-io threads were 6.

But on deploying docker image in kuberenetes we found that reactor-http-epoll (linux) thread count was 36. Our CPU configuration is: Request 4, limit 6.

This doubt was also raised by @ROCKY in one of the comments in Threading model of Spring WebFlux and Reactor. It seems like it is still unanswered.

So is there something that explains this behaviour?



Solution 1:[1]

I think we have have found the answer. Our machine had 36 cores. But our pod had the configuration of 4 cores. So it seems like netty was picking up the machine configuration and not our pod configuration, So this seems like a bug in netty or something else that we are missing.

We are using Spring boot 2.2.0.RELEASE and reactor-netty 0.9.9 version.enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1