MAXBG parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Template:MAXBG parameter subtitle}}
==Summary==
==Summary==
<dl>
<dl>
Line 13: Line 14:
<dd><var class="product">[[Sirius Mods]]</var> 7.0
<dd><var class="product">[[Sirius Mods]]</var> 7.0
</dl>
</dl>
==Description==
==Description==
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 <var class="product">Sirius Mods</var> 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 <var>[[$CommBg]]</var> function.
Under <var class="product">Sirius Mods</var> 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 <var>Daemon</var> class <var>[[RunIndependently (Daemon subroutine)|RunIndependently]]</var> method.
Daemons running either as a result of RunIndependently or $commbg are both counted
Daemons running either as a result of <var>RunIndependently</var> or <var>$CommBg</var> are both counted
the same way against the MAXBG limit.
the same way against the <var>MAXBG</var> limit.


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


The default value of MAXBG is the number of daemon (SDAEMDEV) threads divided by
The default value of <var>MAXBG</var> is the number of daemon (<var>[[SDAEMDEV parameter|SDAEMDEV]]</var>) threads divided by
two or the number of threads minus 10, whichever is greater.
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
For example, if there are 10 daemon threads defined in the Online, <var>MAXBG</var> defaults
to 5.
to 5.
If there are 40 daemon threads, MAXBG defaults to 30.
If there are 40 daemon threads, <var>MAXBG</var> defaults to 30.
While there was no explicit MAXBG parameter before <var class="product">Sirius Mods</var> 7.0, the default MAXBG
While there was no explicit <var>MAXBG</var> parameter before <var class="product">Sirius Mods</var> 7.0, the default <var>MAXBG</var> was used "under the covers" by <var>$CommBg</var>, anyway.
was used &ldquo;under the covers&rdquo; by $commbg, anyway.


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

Latest revision as of 22:08, 25 August 2014

Maximum background/independent Daemons

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.