This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes CorePoolSizeVsMaxPoolSizeVsQueueSize Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "CorePoolSizeVsMaxPoolSizeVsQueueSize" Watch "CorePoolSizeVsMaxPoolSizeVsQueueSize" New topic


xcitin java

Joined: Jan 03, 2012
Posts: 1
Hi All,

Can anyone please explain in detail what is the difference between core pool size,max pool size & queue size?
What are worker threads??

thanks in advance
Prabakar Kalivaradan

Joined: Dec 12, 2011
Posts: 20

core pool size - size of the thread pool(no.of worker threads working in parallel) in normal situation
max pool size - pool size can go up to this point if thread pool is busy(means all workers are busy and more jobs are there waiting and in this situation, new workers will be created); but it always attempts to stay at core size whenever idle threads present
queue size - is the no.of jobs waiting to be processed by the worker threads; when the queue is full and all worker threads are busy, no additional jobs can be submitted to the pool

worker threads - threads that are waiting for the jobs; they keep executing the available jobs in the queue, and when there are no more jobs to be done, they sit idle, but jump to work at the first sight of any new job

Have Fun.

I agree. Here's the link:
subject: CorePoolSizeVsMaxPoolSizeVsQueueSize
Similar Threads
Stateful Bean Causing trouble
DBCP could not obtain an idle db connection, pool exhausted
ejb and web pool size
Connection problem on Stress Testing
question about how to set isolation level with ias6.5