Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Thread Pools

A thread pool ensures threads are used efficiently within the container. A number of threads are created at initialization and placed in the pool. When there is work to be done, for example to service a request, a free thread from the pool is allocated and then returned to the pool when the work has been completed.

Bounded Thread Pool

The thread pool implementation availabile in Jetty is called org.mortbay.thread.BoundedThreadPool. It is called "Bounded" because it manages the size of the thread pool based on configurable minimum and maximum numbers of threads.

If there are no free threads when one is required, a new thread will be created and placed in the pool if the maximum pool size has not been reached. If the maximum pool size is reached, jobs wait for a free thread. Idle threads in the pool will timeout and terminate until the minimum number of threads are running.

It is configured like so:


where:

  • minThreads is the minimum number of threads allowed in the pool
  • maxThreads is the maximum number of threads allowed in the pool

Change the minimum and maximum threads in accordance with the load profile of your installation.

  • No labels
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery