Hi, folks,

I have a server with multiple SocketAcceptors listening on 5 different
socket ports. And I create 5 acceptors the following way.

-----
int NUMBER_CPU = Runtime.getRuntime().availableProcessors();
Executor ioExecutor = Executors.newFixedThreadPool(NUMBER_POOL_THREADS);
SocketAcceptor acceptor = new SocketAcceptor(NUMBER_CPU, ioExecutor);
...
acceptor.bind(...);
-----

Repeating the above statement 5 times.

But my machine has only 2 CPUs (NUMBER_CPU=2). Before I dive into
serious performance experiments, I'd love to learn from you guys
what's the best or recommended parameters to new the SocketAcceptors
in this situation?

Thanks a bunch

Paul

Reply via email to