| Summary: | ExecutorThreadPool never grows above core size | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Jan Prach <jendap> |
| Component: | server | Assignee: | Simone Bordet <simone.bordet> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | unspecified | ||
| Target Milestone: | 7.2.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Jan Prach
Simone, Can you take a look at this one as your such a big fan of the JVM thread pool :-) Jan, the Jetty Queued Thread pool has been demonstrated to have a lot better performance than the executor. cheers The behavior reported is expected and it's documented in java.util.concurrent.ThreadPoolExecutor (http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html), specifically in the section "Queuing". While I admit it may be counter-intuitive, that's the JDK behavior, it is documented, and Jetty's ExecutorThreadPool just wraps JDK's ThreadPoolExecutor, so it inherits the behavior. Specifically, from the Javadocs linked above: "Using an unbounded queue (for example a LinkedBlockingQueue without a predefined capacity) will cause new tasks to wait in the queue when all corePoolSize threads are busy. Thus, no more than corePoolSize threads will ever be created. (And the value of the maximumPoolSize therefore doesn't have any effect.)" You're right! I'm going to read the javadocs better next time ;-) Thanks, Jan |