Number of Worker Threads

RuleManager is a multi-threaded application, which allows processing of multiple time_bombs simultaneously. The processing of each time_bomb is done by a worker thread. As work enters RuleManager, it is placed in a queue. This work is then assigned to a thread that does the work on it.

The number of worker threads is controlled by the ApplicationEventProcessorState.NumberOfWorkerThreads configuration setting. By default, this value is set to 10, assuming a single processor machine. Depending upon the application and the server hardware, this value may be set higher or lower for optimal server behavior.

Threads consume resources, so handle this setting with care—you can degrade performance by increasing the value unnecessarily. Adding more threads does not necessarily imply that you can process more work. Even if you add more threads, you are still limited by the power of your processor. A high thread count causes more memory to be used and increases context switching, which can degrade performance.

In general, the default setting should be used for initial testing. If RuleManager is running on a machine with multiple processors, then the default value should be appropriately scaled. For example, set it to 20 for a dual processor machine, 40 for a quad processor machine, etc.

If RuleManager does not appear to be processing time_bombs fast enough, then this setting can be increased slightly. In addition to monitoring the activity of the RuleManager application, system resources (such as memory and CPU usage) should be monitored as well.

See Also

Configuring RuleManager

appSettings Section

fchoice Section

log4net Section

configSections

Next

Limitations - SQL Constraints in Property Paths

Number of Worker Threads