Using sp_config to configure the Q engine

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.


max online Q engines

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:

The restrictions are:

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.

NoteSetting 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.


number of Q engines at startup

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:


max native threads per engine

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:

If there are more messaging sessions than there are native threads configured, the messaging operation blocks and waits until a native thread is released.


Online engines and number of CPUs

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.