-gn server option

Sets the maximum number of tasks that the database server can execute concurrently.

Syntax
{ dbsrv11 | dbeng11 } -gn integer ...
Applies to

All operating systems and database servers.

Remarks

This option sets the maximum multiprogramming level of the database server. It limits the number of tasks (both user and system requests) that the database server can execute concurrently. If the database server receives an additional request while at this limit, the new request must wait until an executing task completes.

The maximum number of combined unscheduled and active requests is limited by the -gm server option, which limits the number of connections to the server.

Setting the -gn value too high can result in errors because the system resources for the database server are consumed by the large -gn value.

The default value is 20 active tasks for both the network database server and the personal database server, except on Windows Mobile where the default is 3, and the number of active tasks that can execute simultaneously depends on the number of database server threads and the number of logical processors in use.

The database server's kernel uses tasks as the scheduling unit. The execution of any user request requires at least one task. However, a request may cause the scheduling of additional tasks on its behalf. One example of this is if the request involves the execution of an external procedure or function (Java, Perl, CLR, and so on) that in turn makes database requests back into the database server.

When intra-query parallelism is involved, each access plan component executed in parallel is a task. These tasks count toward the -gn limit as if they were actually separate requests. However, tasks created for intra-query parallelism are not reflected in the database properties that track the number of active and inactive requests.

Caution

A stack of the size specified by -gss is allocated for each database server task, and the maximum number of tasks is specified by the -gn option. If you set both -gss and -gn to a high value, then the database server may not be able to start, or the size of the cache can be limited significantly. For example if you specified -gss 16M and -gn 100 when starting the database server, then 1.6 GB of memory would be reserved just for stacks.

See also