Server Thread Model

The server thread model uses two thread pools, as follows.

Both thread pools use a Windows I/O completion port to distribute requests among its threads, thereby reducing the thread context switches in the server process.

The thread pools are managed with parameters in the [JadeServer] section of the JADE initialization file, as shown in the following example.

[JadeServer]
TransportIdlePollInterval=120000
MinShortThreads=10
MaxShortThreads=100
ConcurrentShortThreads=0
MinLongThreads=5
MaxLongThreads=50
ConcurrentLongThreads=0

All transports perform a keep-alive check, whose frequency is controlled by the value of the TransportIdlePollInterval parameter.

The number of threads in each pool grows dynamically, starting with the values of the MinShortThreads and MinLongThreads parameters, up to the values of the MaxShortThreads and MaxLongThreads parameters, depending on the request arrival rate.

The values of the ConcurrentShortThreads and ConcurrentLongThreads parameters control the maximum number of threads that the operating system can allow to concurrently process I/O completion packets for each I/O completion port. If the value of these parameters is the recommended value of zero (0), the system allows as many concurrently running threads as there are cores in the system. (For further details, see the Microsoft MSDN CreateIoCompletionPort function at http://msdn.microsoft.com.)