Sun Java System Web Server 6.1 SP9 Administrator's Guide

Adding and Using Thread Pools

You can use thread pools to allocate a specific number of threads to a specific service.

You can also use thread pools to runn thread-unsafe plugins. By defining a pool with the maximum number of threads set to 1, only one request is allowed into the specified service function.

When you add a thread pool, the specified information includes the minimum and maximum number of threads, the stack size, and the queue size.

For more information, see the online Performance Tuning and Sizing Guide on

The Native Thread Pool and Generic Thread Pools (Windows)

On Windows, you can use two types of thread pools: the native thread pool (NativePool) and additional generic thread pools.

To edit the native thread pool, access The Native Thread Pool Page (NT) in the Server Manager.

You can create any number of generic thread pools . To create generic thread pools, access The Generic Thread Pools Page (NT) in the Server Manager.

Thread Pools (UNIX/Linux)

Since threads on UNIX/Linux are always OS-scheduled (as opposed to user-scheduled) UNIX/Linux users do not need to use the NativePool, and do not have a Server Manager page for editing its settings. However, UNIX/Linux users can still create thread pools. To create thread pools, access The Thread Pools Page (UNIX/Linux) in the Server Manager.

Editing Thread Pools

Once you have added a thread pool, you can change the values of the thread pool settings (minimum threads, maximum threads and so on) through the Server Manager.

You can also edit the thread pool settings in vsclass.obj.conf, where vsclass is the virtual server class name.

A thread pool appears in the vsclass.obj.conf as follows:

Init fn="thread-pool-init" name=name_of_the_pool MaxThreads=n MinThreads=n QueueSize=n StackSize=n

Use the parameters to change the pool MinThreads, MaxThreads, QueueSize, and StackSize.

Windows users can edit the native pool settings using the Server Manager.

Using Thread Pools

After you set up a thread pool, you use it by designating it as the thread pool for a specific service.

To configure a thread pool, go to the Server Manager Preferences tab and select Thread Pool. Once a thread pool is configured, it is available to be used for the specific designated service.

You can also designate a thread pool by using the pool parameter of the load-modules function in vsclass.obj.conf, where vsclass is the virtual server class name.


In addition, you can use the pool parameter on any NSAPI function so that only that NSAPI function runs on the specified pool.