A JVM will have a single process, and the process identification number (PID) can be found using the ps command (Linux). A process will contain numerous threads. Some examples of threads are the JVMs garbage collector, a code optimizer thread, and a finalizer thread.
ps -ef | grep jvm_name
A WebSphere JVM has pools for threads, appropriately known as thread pools.
- In the left panel of the WebSphere admin console, select Servers > Server types.
- Select a JVM.
- Select Thread pools.
The thread pools that are created when the JVM was created will be displayed, as well as the minimum and maximum size of the thread pool. When an application in a JVM starts up, the threads will probably be below the minimum size. Once the minimum has been reached, the pool will never drop below the minimum, even if threads are idle.
Selecting a thread pool will let you change the settings. The timeout is the number of milliseconds that should elapse before a thread is reclaimed. Entering -1 would disable the timeout (wait forever).
The Tivoli Performance Monitor can be used to view the number of threads being used in a pool.
- In the left panel of the WebSphere admin console, select Monitoring and Tuning > Performance Viewer > Current activity.
- Select a JVM
- Expand JVM > Summary Reports > Thread Pool.
In this example, the TCPChannel.DCS pool has 20 threads, which matches the minimum:maximum size for the TCPChannel.DCS pool.