문제

I'm using Jetty 8 with its ProxyServlet, and was wondering what's the fastest threadpool to use, ExecutorThreadPool or QueuedThreadPool?

This is the code I'm currently using:

  Server httpProxy = new Server();
  SelectChannelConnector connector = new SelectChannelConnector();
  connector.setPort(8087);
  connector.setMaxIdleTime(400000);
  connector.setThreadPool(new ExecutorThreadPool(256));
  httpProxy.addConnector(connector);
도움이 되었습니까?

해결책

In our tests, QueuedThreadPool has shown to be faster than ExecutorThreadPool for usage with a connector.

I would use QueuedThreadPool and experiment with ExecutorThreadPool only if you have performance problems caused by the thread pool (unlikely in our experience).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top