I am also facing the same issue. I am having selector.select() inside while loop and it is using high CPU. What can be done to reduce the CPU