Specifying Generator Settings

Each application has one generator, which is typically hosted by the NS$InstanceName Windows service. When you define an application, you specify which computer runs the generator for the application and how many threads are available for the application.

The generator function governs the rule processing for a notification application. Settings for the generator determine which computer runs the generator and how many threads the generator can use when processing application rules. The values you specify for the generator settings should be considered in terms of a trade-off between improving application performance and monopolizing system resources.

To specify generator settings

If you are defining an application through XML, specify generator settings in the application definition file (ADF). If you are defining an application programmatically, use Notification Services Management Objects (NMO) to specify generator settings.

System Name

The system name property specifies the name of the system that runs the generator. This value typically is the computer name. However, if the generator is running on a failover cluster, this value is the virtual server name.

Notification Services client components must be installed on the computer, and the instance must be registered on the computer.

For more information about scaling-out an application, see Scale-Out Configurations.

To specify the generator system name

Thread Pool Size

Use the thread pool size property to balance improving application speed with monopolizing system resources. Setting a thread pool size is optional.

The thread pool size property specifies the maximum number of threads the generator can use to do its processing. The value determines the amount of work that the generator can perform in parallel, and affects the overall performance of the Notification Services application.

For SQL Server 2005 Enterprise Edition, Developer Edition, and Evaluation Edition, the maximum thread pool size is 25. If you do not define a thread pool size, Notification Services allocates up to 25 threads for parallel rule execution. The actual number of threads allocated is determined by an optimization algorithm.

In SQL Server 2005 Standard Edition, rules are never processed in parallel; the only valid thread pool size is 1.

Determining an Optimal Thread Pool Size

The generator first fires event chronicle rules, then subscription event rules, and finally subscription scheduled rules. Depending on the thread pool size, Notification Services attempts to fire all event chronicle rules in parallel, then all event rules in parallel, and then all scheduled rules in parallel.

The default generator thread pool size is 1, which means that only one rule fires at a time. You can increase the thread pool size to allow for parallel processing of all rules that can be fired simultaneously. For example, if your application has one event chronicle rule, three event rules, and two scheduled rules, you can define a thread pool size of 3, so that all event rules fire in parallel.

Defining an excessive thread pool size does not improve performance, and might consume extra system resources because of thread switching.

You can specify fewer threads to limit the consumption of processor time on your server. If you lower the thread pool size, the degree of parallelism in the generator processing decreases, thereby decreasing the generator's demand on resources.

If you specify a thread pool size of 0, Notification Services uses as many threads as it can get from the system, up to the maximum of 25.

To specify the generator thread pool size

Community Additions