I am running Http server using Netty I/O library on a quad-core Linux machine. Running with default worker thread pool size (which is set to 2 x number of cores internally in Netty), performance analysis show throughput caps at 1k requests/second and further increases in request rate causes increase in latency almost linearly.
As max CPU utilization shows 60%, I increased number of worker threads as per code below. However, there is hardly any change in performance and CPU is still capped at 60-70%. The process is not bounded by memory, I/O or network bandwidth. Why isn't there change in performance by increasing worker threads? What other things I can do to improve my server performance to increase it's capacity.
EventLoopGroup group = new NIOEventLoopGroup(100);
ServerBootStrap serverBootStrap = new ServerBootStrap();
serverBootStrap.group(group)
.channel(NioServerSocketChannel.class)
.localAddress(..)
...
