Runtime thread pool
configuration
The implementation of the Asset Gateway and Enterprise Gateway runtime component includes a configurable pool of worker threads. These threads are operating system threads that run in the context of the runtime process. These worker threads perform various tasks, including the support of the:
- Execution of trigger actions
- Reading of device variables
- Communications with external processes, including the Workbench and the Transaction Server.
The original implementation of the pool of worker threads will be referred to as Thread Pool V2.0.
Thread Pool V2.0 is the default configuration for Asset
Gateways and Enterprise Gateways. Its features can be
configured based on your system and application's design
and resource usage.
For some high resource usage applications, the Thread Pool
V2.0 implementation and configurable features provide an
improvement in the system behavior required for the
application's design and resource usage.
Runtime thread pool options
Configuration of the thread pool is an advanced topic. In most cases, you will be directed to this information and the configuration options based on interaction with your support representative.
Thread pool properties, System Variables and default values
Some of the properties are present in the properties files. Other properties are not present in the provided properties files, but have a default value in the code.
Many of the properties and their current values for a node can be seen using the Workbench -> Administration -> System Variables tab.
The default values listed in the following sections are the default values for most Asset Gateway and Enterprise Gateway products. Some products with limited system resources have different default values for some properties. If there is a question, the values can be seen for the node using the Workbench -> Administration -> System Variables tab.
Thread Pool V2.0
The properties available for the configurable features of the Thread Pool V2.0 implementation, and the associated System Variables are:
- Minimum thread count:
- This concept is removed. The
pool.threads.min property is not used.
- This concept is removed. The
pool.threads.min property is not used.
- Maximum thread count:
- The Thread Pool V1.0 property pool.threads.max is not used, pool.v2.threads.max is used instead.
- The number of worker threads started during
the runtime's initialization.
- If the number of current, in use, worker threads reaches this maximum value, a new worker thread will not be created.
- Instead, the new work item is queued, waiting for a current worker thread to complete its work item and be available to process queued work items.
- The defaults are:
- Asset Gateway: pool.v2.threads.max=120.
- Enterprise Gateway: pool.v2.threads.max=500.
- The System Variable is:
pool.v2.threads.max.
- Worker thread limiter count. In the Thread Pool
V2.0 implementation, this is a thread count instead of
a percentage of the maximum thread count:
- The Thread Pool V1.0 property pool.limiter.count is not used, pool.v2.limiter.count is used instead.
- When the worker thread limit count is reached, the system will create a queue and put all new work items for that particular task work type into that queue.
- The defaults are:
- Asset Gateways: pool.v2.limiter.count=40.
- Enterprise Gateways: pool.v2.limiter.count=150.
- The System Variable is:
pool.v2.limiter.count.
- Thread stack size:
- The stack size, in bytes, for each worker thread.
- The default is: pool.threads.stack=65536.
- The System Variable is:
pool.queue.threads.stack.
Properties file management
For information on properties file management, including overwritten of files during a product installation or a product update, see Properties file management.