To enable automatic CPU Frequency selection,
there are three requirements, after completing the configuration:
- A global (cluster-level) performance threshold configuration
file (lsb.threshold) is required, to control the minimize energy or
running time policy.
- Three parameters must be set in lsf.conf: LSF_MANAGE_FREQUENCY=HOST, LSF_COLLECT_ENERGY_USAGE=Y,
and LSF_DEFAULT_FREQUENCY
- Coefficient data must be generated and saved in database.
The threshold file (lsb.threshold) is available at the
location specified by the parameter PERFORMANCE_THRESHOLD_FILE in
lsb.params. The default location is $LSF_ENVDIR/lsbatch/cluster_name/configdir/lsb.threshold.
There are two parts in the threshold file:
- minimize energy policy: The purpose of this policy
is to save energy. With this policy, LSF will select a frequency that
is equal to or less than the default CPU frequency and the time variation
is equal to or less than the threshold value, which can save the most
energy. The value should be a positive value (or 0). The default threshold
value is 0.
- minimize time policy: The purpose of this policy is
to improve performance. The value must be a negative value. This policy
will allow the job to run in a frequency that is higher than the default
frequency and is only available when the default frequency is less
than the nominal frequency. LSF will only consider the frequency range
that is higher than the default frequency. When a job runs with this
policy, LSF checks the time variation from the nominal to the default
frequency. The frequency is used for the job when the time variation
is less than or equal to the corresponding threshold value (the absolute
value of time variation is large than or equal to corresponding threshold’s
absolute value), otherwise, LSF checks the next frequency. The job
will run in the default frequency when there is no frequency that
matches the specified threshold value. You must specify at least one
frequency value that is larger than the default CPU frequency and
less than or equal to the maximum available frequency. The available
frequency list is available at (/sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies.
If it is not in the available frequency list, the frequency will be
ignored. For other frequencies larger than the default CPU frequency,
LSF will automatically calculate the value based on the difference
of these two values and (default frequency and defined frequency).
LSF will calculate the increase between each frequency and use that
to get all frequencies that are larger than the default CPU frequency.
The lsb.threshold file may appear as follows:
# Copyright International Business Machines Corp,1993-2006, 2013
#....
# Minimize energy policy
#.....
Begin Min_Energy
THRESHOLD_RUNTIME_VAR = 10
End Min_Energy
#
# Minimize run time policy
#...
Begin Min_Time
CPU_FREQ RUNTIME_VAR
2100000KHz -2
2200000KHz -4
2300000KHz -9
2400000KHz -12
2500000KHz -15
2700000KHz -20
End Min_Time
The following rules must be followed when defining the
lsb.threshold file:
- Example definitions are commented with a pound sign
(#) in the sample lsb.threshold file. Remove the # to enter your own
values for the example definitions. If no lines are uncommented, default
values will be used for all definitions.