MAXBG parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
Line 16: Line 16:
This parameter specifies the maximum number of background or independent daemon
This parameter specifies the maximum number of background or independent daemon
requests that may be running at once.
requests that may be running at once.
Before ''Sirius Mods'' 7.0, the only way to create a background daemon request was with
Before <var class="product">Sirius Mods</var> 7.0, the only way to create a background daemon request was with
the $commbg function.
the $commbg function.
Under ''Sirius Mods'' 7.0 and later, independent daemon requests can also be created
Under <var class="product">Sirius Mods</var> 7.0 and later, independent daemon requests can also be created
using the Daemon class [[RunIndependently method]].
using the Daemon class [[RunIndependently method]].
Daemons running either as a result of RunIndependently or $commbg are both counted
Daemons running either as a result of RunIndependently or $commbg are both counted
Line 34: Line 34:
to 5.
to 5.
If there are 40 daemon threads, MAXBG defaults to 30.
If there are 40 daemon threads, MAXBG defaults to 30.
While there was no explicit MAXBG parameter before ''Sirius Mods'' 7.0, the default MAXBG
While there was no explicit MAXBG parameter before <var class="product">Sirius Mods</var> 7.0, the default MAXBG
was used &ldquo;under the covers&rdquo; by $commbg, anyway.
was used &ldquo;under the covers&rdquo; by $commbg, anyway.



Revision as of 00:45, 30 October 2012

Summary

Default value
Number of daemon (SDAEMDEV) threads divided by two, or number of daemon threads minus 10, whichever is greater
Parameter type
System
Where set
User 0 CCAIN parameters
Related products
All
Introduced
Sirius Mods 7.0

Description

This parameter specifies the maximum number of background or independent daemon requests that may be running at once. Before Sirius Mods 7.0, the only way to create a background daemon request was with the $commbg function. Under Sirius Mods 7.0 and later, independent daemon requests can also be created using the Daemon class RunIndependently method. Daemons running either as a result of RunIndependently or $commbg are both counted the same way against the MAXBG limit.

If a $commbg request would exceed the MAXBG limit (or there are no daemon threads immediately available to run the request) the request is enqueued and run later when daemon threads are available and the number of running background/independent requests drops below MAXBG. If a RunIndependently request would exceed the MAXBG limit, the request is cancelled.

The default value of MAXBG is the number of daemon (SDAEMDEV) threads divided by two or the number of threads minus 10, whichever is greater. For example, if there are 10 daemon threads defined in the Online, MAXBG defaults to 5. If there are 40 daemon threads, MAXBG defaults to 30. While there was no explicit MAXBG parameter before Sirius Mods 7.0, the default MAXBG was used “under the covers” by $commbg, anyway.

Setting MAXBG to a value greater than or equal to the number of daemon threads allows background/independent requests to use up every available daemon thread, if they want. Setting MAXBG to 0 indicates that the default value of MAXBG, calculated from the number of daemon threads, is to be used. This means that the lowest explicit value of MAXBG that will be honored is 1.