Number of Worker Threads (-T)

Advantage Database Server

Default = 8 worker threads. Range = 1 - 1024.

Note While individual circumstances and client application development style may call for a different value, a general rule is to set the configuration value from 8 to 16 worker threads per CPU. For example, on a server with 4 CPUs, configuring Advantage Database Server to use between 32 and 64 worker threads may produce the best performance for typical usage patterns. Specifying larger numbers of worker threads can often be counterproductive because the OS will have to spend more time managing the threads (e.g., performing context switches), and there may be higher contention for shared resources.

This configuration parameter specifies the number of Advantage Database Server worker threads used to service client database requests. If the number of requests exceeds the number of threads, the requests are queued until a worker thread completes its current request. Increasing this parameter may improve the responsiveness of individual client applications, but it may also reduce the performance of other concurrent server functions.

The Advantage Database Server uses multiple worker threads to execute multiple requests concurrently. If the worker thread count is set to 1, the Advantage Database Server acts as a single-tasking system, processing each database request sequentially in the order it is received. The default thread count is 8, which means that up to eight requests can be executed at one time. In this example, a ninth request would be queued to wait for the first available worker thread.

The result of increasing the number of worker threads is environment dependent. The system administrator may want to experiment with the number of worker threads in an attempt to balance system throughput versus individual application performance.

When the Advantage Database Server performs a time consuming operation such as processing a long SQL query or building an index, the operation is performed using one worker thread and the worker thread is not relinquished until the operation is complete. If all worker threads are being used in this manner, other requests are held off until a thread completes the operation. In this type of situation, it may be desirable to have additional worker threads available to respond to other requests. However, the total system throughput will decrease in most cases as the number of worker threads increases.