Multi-Thread Mode


In single-thread mode, the server uses one thread for all client and server connections. In multi-thread mode, the server distributes connections to several I/O threads.

Multi-thread mode is enhanced in Release 6.7 (and later). This enhancement lets you configure two separate pools of threads:

Four options configure this feature:

Special Values

If either Client_Threads or Server_Threads is non-zero, then RTserver operates in multi-thread mode.

If one (but not both) of Client_Threads or Server_Threads is zero, then all connections use I/O threads from the other (non-zero) pool.

The default configuration (zero for both Client_Threads and Server_Threads) specifies single-thread mode—one I/O thread services all client and server connections. (This default preserves backward compatibility.)

Although the server does not enforce a maximum number of threads in these pools, we advise caution when using large values; larger values do not necessarily result in better performance.

The optimal number of threads depends on the operational parameters of your deployment, such as the number of processors, the subject namespace, message fan-out characteristics, message rate, disk I/O rate, compression, the number of RTserver-to-RTclient connections, and the number of RTserver-to-RTserver connections (cloud configuration).

We recommend that you empirically determine the optimal size of the thread pools for your deployment. We suggest that you begin tuning with the values in Table 19, and adjust them based on the results of your testing. We caution that the optimal values can change significantly when the operational parameters of your deployment vary; when they do change, we strongly recommend that you re-test to determine the best values.

Table 18 Tuning the Number of I/O Threads
Number of CPUs
Initial Number of Total Threads
2–3
Our testing has not shown any benefit to adjusting these parameters on computers with fewer than 4 processors. We recommend single-thread mode.
4 or more
We recommend that you begin tuning by setting Client_Threads and Server_Threads so that their sum is the number of CPUs plus 1. The way in which you allocate that total to clients and servers will depend on the needs of your deployment.
For example, an RTserver routing hub running on an 8-CPU computer might allocate 2 threads to server connections, and 7 threads to client connections (for a total of 9 threads).

To run in multi-thread mode, your RTserver must be licensed for the SmartSockets MP option. Furthermore, multi-thread mode is not available on all platforms. Attempting to configure multi-thread mode without an appropriate license or on a platform that does not support it, results in a warning message when RTserver starts, and it starts in single-thread mode.

This enhancement supersedes the deprecated option Server_Num_Threads.


TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com