You can configure the Q engine using sp_config and the parameters discussed in this section. For more information about using sp_config, see Adaptive Server Enterprise Reference Manual: Procedures.
You can use the max online Q engines parameter with sp_config to control the maximum the number of Adaptive Server Q engines. For example:
sp_configure "max online Q engines", 4
Valid values are:
Minimum value: 0.
Default value: 0.
Maximum value: Depends on the settings using sp_configure “max online engines".
The restrictions are:
max online Q engines cannot be greater than max online engines minus number of engines at startup.
The command fails if there is already an engine group referencing an engine in the range max online engines minus max online Q engines to max online engines minus 1.
For instance, if max online engines is 10 and you then attempt to set max online Q engines to 4, an error is returned if there is an engine group bound to engines 6, 7, 8, or 9.
max online Q engines cannot be greater than max online engines.
Setting max online Q engines reserves the high range of max online engines for Q engines. Once you set max online Q engines, Adaptive Server engines cannot use the engines in the range that is reserved for Q engines. For example, if you set max online engines to 10, and set max online Q engines to 4, Adaptive Server cannot use engines 6, 7, 8, and 9, and subsequent attempts to change number of engines at startup to 7, 8, or 9 fail, as do attempts to add engines 6, 7, 8, or 9 to an engine group.
Setting max online Q engines can
affect existing production environments. For this reason, Sybase
recommends that you increase max online engines by
the same value as you set max online Q engines.
For example, to set max online Q engines to 4,
increase max online engines by 4 also.
This is an integer option that controls the number of Adaptive Server Q engines that are automatically started when Adaptive Server starts. For example:
sp_configure "number of Q engines at startup", 4
Valid values are:
Minimum value is 0
Default value is 0
Maximum value must be less than max online Q engines
A Q engine uses operating system native threads. The max native threads per engine configuration parameter controls the maximum number of native threads that a Q engine uses. In this example, the procedure limits every Q engine to a maximum of 100 native threads:
sp_configure 'max native threads per engine', 100
The parameter has the following values:
Minimum value is 50
Maximum value is 1000
Default value is 50
If there are more messaging sessions than there are native threads configured, the messaging operation blocks and waits until a native thread is released.
The total number of online database management systems and Q engines cannot be greater than the number of CPUs on the system.
You cannot use msgsend and msgrecv if the values of max online Q engines or number of Q engines at startup are 0.