Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
TIBCO Spotfire Web Player Thread Pool Handling.
Solution:
By default, Spotfire will be configured to use the default Microsoft .NET thread pool. The initial thread pool size is determined initially by the number of CPU cores on the Web Player server, and will be 2x the number of cores. For example, a single core server will have an initial "Thread Pool Max" of 2. A quad core server will have an initial "Thread Pool Max" of 8. The thread pool max size will increase when needed up to the limits as defined by the thread pool. By default, this is not configurable within Spotfire.
The thread pool activity and settings can be seen in the Web Player Diagnostics:
Diagnostics > "Web Server" tab:
- Thread Pool Available
- Thread Pool Min
- Thread Pool Max
- Thread Pool Queue
- Thread Pool Queue Age
The value seen is the current value and the value in parenthesis is the maximum value since the Web Player application started. The thread pool configuration should not be changed unless there is a specific issue that is seen that points to the thread pool handling as a root cause. For example, the queue or queue age remain high for long periodss of time.
It is possible to configure the TIBCO Spotfire Web Player to use an internal private thread pool instead of the default .NET thread pool in the web.config file. This is normally only used in the case of NUMA (non-uniform memory access) architecture based machines where specific adjustments are necessary to optimize performance.
The thread pool settings can be defined in the <analysis> node in the web.config. The following is the default value in the web.config file:
- <analysis antiAliasEnabled="true" useClearType="true" documentStateEnabled="true" closedTimeout="120" checkClosedInterval="60" inactivityTimeout="02:00:00" checkInactivityInterval="300" regularPollChangesInterval="500" maxPollChangesInterval="3000" pollLoadInterval="1000" needsRefreshInterval="15" toolTipDelay="1000" undoRedoEnabled="true" userServicesPoolEnabled="true" maxRenderTimeMs="60000" maxAnalysisShutdownInformations="1024" userPreferencesMaxAge="00:05:00" />
The internal private thread pool can be enabled and configured by adding privateThreadPoolEnabled="true" and the additional related configuration parameters. For example, this configuration could be used to optimize the thread pool configuration for a NUMA machine:
- <analysis privateThreadPoolEnabled="true" privateThreadPoolCpuLimitThreshold="75" privateThreadPoolThreadsPerCore="1" privateThreadPoolMaxThreadsPerCore="8" privateThreadPoolMaxNewThreadsPerSecond="1" antiAliasEnabled="true" useClearType="true" documentStateEnabled="true" closedTimeout="120" checkClosedInterval="60" inactivityTimeout="02:00:00" checkInactivityInterval="300" regularPollChangesInterval="500" maxPollChangesInterval="3000" pollLoadInterval="1000" needsRefreshInterval="15" toolTipDelay="1000" undoRedoEnabled="true" userServicesPoolEnabled="true" maxRenderTimeMs="60000" maxAnalysisShutdownInformations="1024" userPreferencesMaxAge="00:05:00" />
Parameter Definitions:
- privateThreadPoolEnabled: If true, the internal private thread pool is used instead of the .NET thread pool.
- privateThreadPoolCpuLimitThreshold: Percent of CPU utilization allowed by the thread pool.
- privateThreadPoolThreadsPerCore: Default number of threads per core.
- privateThreadPoolMaxThreadsPerCore: The max number of threads allowed per core. The thread pool max size will increase as required up to this defined max per core amount.
- privateThreadPoolMaxNewThreadsPerSecond: The number of max new threads that are allowed to be created by the thread pool per second.
Comments
0 comments
Article is closed for comments.