Basic configuration file for CPU control
A configuration file for dynamically enabling or disabling CPUs has several required specifications.
- UPDATE
- specifies the time interval, in seconds, at which cpuplugd evaluates
the rules and, if a rule is met, enables or disables CPUs. This variable
is also required for controlling memory (see Basic configuration file for memory control).
In the example, the rules are evaluated every 10 seconds.
- CPU_MIN
- specifies the minimum number of CPUs. Even if the rule for disabling
CPUs is met, cpuplugd does not reduce the number of CPUs to less than
this number.
In the example, the number of CPUs cannot become less than 2.
- CPU_MAX
- specifies the maximum number of CPUs. Even if the rule for enabling
CPUs is met, cpuplugd does not increase the number of CPUs to more
than this number. If 0 is specified, the maximum number of CPUs is
the number of CPUs available on the system.
In the example, the number of CPUs cannot become more than 10.
- HOTPLUG
- specifies the rule for dynamically enabling CPUs. The rule resolves
to a boolean true or false. Each time this rule is true, cpuplugd
enables one CPU, unless the number of CPUs has already reached the
maximum specified with CPU_MAX.
Setting HOTPLUG to
0
disables dynamically adding CPUs.In the example, a CPU is enabled when the idle times of all active CPUs sum up to less than 10.0%. See Keywords for CPU hotplug rules for information about available keywords.
- HOTUNPLUG
- specifies the rule for dynamically disabling CPUs. The rule resolves
to a boolean true or false. Each time this rule is true, cpuplugd
disables one CPU, unless the number of CPUs has already reached the
minimum specified with CPU_MIN.
Setting HOTUNPLUG to
0
disables dynamically removing CPUs.In the example, a CPU is disabled when the idle times of all active CPUs sum up to more than 100%. See Keywords for CPU hotplug rules for information about available keywords.
If one of these variables is set more than once, only the last occurrence is used. These variables are not case sensitive.
If both the HOTPLUG and HOTUNPLUG rule are met simultaneously, HOTUNPLUG is ignored.