Is there a way to limit how many threads netty uses for client connections (Netty is the client which connect to a remote server). I am using 1 NioEventLoopGroup which is passed into each Bootstrap. Each of those Bootstraps gets the same ChannelInitializer reference (I used to create different initializers for each Bootstrap, but it seems to work fine sharing the same reference). I am connected from my Java application to many hardware devices which act as the server.
I have noticed that currently up to 16 threads are used (I am on an 8 core machine, from what I have read Netty uses 2 times the number of cores by default). They are named nioEventLoopGroup-2-1 to nioEventLoopGroup-2-16 from what I see in my logging. The 17th server I connect to will run on nioEventLoopGroup-2-1 again.
1) Is there a way to change this default of threads used?
2) Any idea why the group starts to count from 2?