Configuring a thread pool

B2B Advanced Communications uses thread pools to manage concurrent tasks. A thread pool is a group of pre-instantiated, idle threads that stand ready to receive work. When many short tasks need to be done rather than a few long tasks, thread pool usage is preferred over instantiating new threads for each task. Using thread pools can prevent diminished system performance that is caused by creating many new threads. If you tune thread pool sizes, the server components can reuse threads. The reuse of threads eliminates the need to create new threads at run time to handle each new request, which can improve system performance.

Before you begin

You can also import a thread pool as a resource from another installation of B2B Advanced Communications. For more information, see Resource commands.

About this task

A thread pool manages the threads in the pool to process the tasks. To handle large volumes of files or large files, you can create a thread pool with more threads and associate the thread pool to the appropriate component.

Procedure

To create a thread pool, complete the following steps.

  1. Log in to B2B Advanced Communications. You must have system administrator permissions to create a thread pool.
  2. Click Systems Management > Thread Pools.
  3. On the Thread Pools collection page, click New.
  4. On the New Thread Pool page, specify values for the necessary fields.
    Field Description
    Name Specify a unique name for the thread pool.
    Description Optional: Type a description for the thread pool.
    Core size Specify the minimum number of threads that must be available in the thread pool.
    Maximum size Specify the maximum number of threads that can be available in the thread pool.
    Inactivity timeout Specify the time interval (in seconds) for which the threads are kept active and available when the associated component is waiting for a request. If there is no data transfer between the client and server within the time that is specified, the connection is closed.
    Core thread timeout Optional: Select the check box to allow the core threads to timeout after the time interval specified in the Inactivity timeout field.
    Bound capacity Specify the number of threads that can at the same time function in a thread pool.
    Rejection policy Optional: Select a rejection policy to be used if the maximum task capacity is reached and there are no idle threads.
    • Abort - Exits the task (this value is the default)
    • Caller - The caller thread runs the task
    • Retry - Try to run the task again after the specified waiting period
    Retry attempts If Retry was selected for the rejection policy, specify the number of times to attempt to run the task.
    Retry interval If Retry was selected for the rejection policy, specify the time interval (in seconds) that must elapse before the caller thread can try to run the task again.
  5. Click Save to save the thread pool configuration. The thread pool is automatically started when you save the configuration.