Slurm Power Management Guide
Slurm provide an integrated power management system for power capping.
The mode of operation is to take the configured power cap for the system and
distribute it across the compute nodes under Slurm control.
Initially that power is distributed evenly across all compute nodes.
Slurm then monitors actual power consumption and redistributes power as appropriate.
Specifically, Slurm lowers the power caps on nodes using less than their cap
and redistributes that power across the other nodes.
The thresholds at which a node's power cap are raised or lowered are configurable
as are the rate of change the power cap.
In addition, starting a job on a node immediately triggers resetting the node's
power cap to a higher level.
Note this functionality is distinct from Slurm's ability to
power down idle nodes.
Slurmは、電力制限のための統合電力管理システムを提供します。動作モードは、システムに構成された消費電力上限を取得し、それをSlurm制御下の計算ノード全体に分散することです。最初、その電力はすべての計算ノードに均等に分散されます。次にSlurmは実際の電力消費を監視し、必要に応じて電力を再分配します。具体的には、Slurmはノードの消費電力上限をそれらの上限未満で使用し、他のノード間でその電力を再分配します。ノードの消費電力上限が上昇または下降するしきい値は、消費電力上限の変化率と同様に構成可能です。さらに、ノードでジョブを開始すると、すぐにノードの消費電力上限がより高いレベルにリセットされます。この機能は、アイドルノードの電源を切るSlurmの機能とは異なります。
Configuration
The following configuration parameters are available:
次の構成パラメータを使用できます。
- DebugFlags=power:
Enable plugin-specific logging messages.
DebugFlags = power:プラグイン固有のログメッセージを有効にします。 - PowerParameters:
Defines power management behavior.
Changes to this value take effect when the Slurm daemons are reconfigured.
Currently valid options are:
PowerParameters:電源管理の動作を定義します。この値の変更は、Slurmデーモンが再構成されたときに有効になります。現在有効なオプションは次のとおりです。
- balance_interval=# -
Specifies the time interval, in seconds, between attempts to balance power
caps across the nodes.
This also controls the frequency at which Slurm attempts to collect current
power consumption data (old data may be used until new data is available from
the underlying infrastructure and values below 10 seconds are not recommended
for Cray systems).
The default value is 30 seconds.
Supported by the power/cray_aries plugin.
balance_interval =#-ノード間で消費電力上限のバランスをとる試行間の時間間隔を秒単位で指定します。これは、Slurmが現在の電力消費データを収集しようとする頻度も制御します(基盤となるインフラストラクチャから新しいデータが利用可能になるまで古いデータを使用でき、Crayシステムでは10秒未満の値は推奨されません)。デフォルト値は30秒です。power / cray_ariesプラグインでサポートされています。 - capmc_path=/... -
Specifies the absolute path of the capmc command.
The default value is "/opt/cray/capmc/default/bin/capmc".
Supported by the power/cray_aries plugin.
capmc_path = / ...-capmcコマンドの絶対パスを指定します。デフォルト値は「/ opt / cray / capmc / default / bin / capmc」です。power / cray_ariesプラグインでサポートされています。 - cap_watts=#[KW|MW] -
Specifies the total power limit to be established across all compute nodes
managed by Slurm.
A value of 0 sets every compute node to have an unlimited cap.
The default value is 0.
Supported by the power/cray_aries plugin.
cap_watts =#[KW | MW]-Slurmが管理するすべての計算ノードにわたって確立される総電力制限を指定します。値0は、すべての計算ノードに無制限の上限を設定します。デフォルト値は0です。power/ cray_ariesプラグインでサポートされています。 - decrease_rate=# -
Specifies the maximum rate of change in the power cap for a node where the
actual power usage is below the power cap by an amount greater than
lower_threshold (see below).
Value represents a percentage of the difference between a node's minimum and
maximum power consumption.
The default value is 50 percent.
Supported by the power/cray_aries plugin.
reduce_rate =#-実際の電力使用量が、lower_thresholdよりも大きい量だけ電力制限を下回っているノードの電力制限の最大変化率を指定します(以下を参照)。値は、ノードの最小電力消費量と最大電力消費量の差の割合を表します。デフォルト値は50%です。power / cray_ariesプラグインでサポートされています。 - increase_rate=# -
Specifies the maximum rate of change in the power cap for a node where the
actual power usage is within upper_threshold (see below) of the power cap.
Value represents a percentage of the difference between a node's minimum and
maximum power consumption.
The default value is 20 percent.
Supported by the power/cray_aries plugin.
incremental_rate =#-実際の電力使用量が電力上限値のupper_threshold(下記参照)内にあるノードの電力上限値の最大変化率を指定します。値は、ノードの最小電力消費量と最大電力消費量の差の割合を表します。デフォルト値は20パーセントです。power / cray_ariesプラグインでサポートされています。 - job_level -
All compute nodes associated with every job will be assigned the same power
cap.
Nodes shared by multiple jobs with have a power cap different from other
nodes allocated to the individual jobs.
By default, this is configurable by the user for each job.
job_level-すべてのジョブに関連付けられているすべての計算ノードに同じ電力上限が割り当てられます。を使用して複数のジョブで共有されているノードには、個々のジョブに割り当てられている他のノードとは異なる消費電力上限があります。デフォルトでは、これはユーザーがジョブごとに構成できます。 - job_no_level -
Power caps are established independently for each compute node.
This disabled the "--power=level" option available in the job submission
commands.
By default, this is configurable by the user for each job.
job_no_level-消費電力上限は、計算ノードごとに独立して設定されます。これにより、ジョブ送信コマンドで使用可能な「--power = level」オプションが無効になりました。デフォルトでは、これはユーザーがジョブごとに構成できます。 - lower_threshold=# -
Specify a lower power consumption threshold.
If a node's current power consumption is below this percentage of its current
cap, then its power cap will be reduced.
The default value is 90 percent.
Supported by the power/cray_aries plugin.
lower_threshold =#-低い電力消費のしきい値を指定します。ノードの現在の消費電力が現在の上限のこのパーセンテージを下回っている場合は、ノードの消費電力上限が削減されます。デフォルト値は90%です。power / cray_ariesプラグインでサポートされています。 - recent_job=# -
If a job has started or resumed execution (from suspend) on a compute node
within this number of seconds from the current time, the node's power cap will
be increased to the maximum.
The default value is 300 seconds.
Supported by the power/cray_aries plugin.
Recent_job =#-現在の時間からこの秒数以内に計算ノードでジョブが(サスペンドから)実行を開始または再開した場合、ノードの消費電力上限が最大に増加します。デフォルト値は300秒です。power / cray_ariesプラグインでサポートされています。 - set_watts=# -
Specifies the power limit to be set on every compute nodes managed by Slurm.
Every node gets this same power cap and there is no variation through time
based upon actual power usage on the node.
Supported by the power/cray_aries plugin.
set_watts =#-Slurmが管理するすべての計算ノードに設定する電力制限を指定します。すべてのノードはこの同じ電力上限を取得し、ノードでの実際の電力使用量に基づく時間による変動はありません。power / cray_ariesプラグインでサポートされています。 - upper_threshold=# -
Specify an upper power consumption threshold.
If a node's current power consumption is above this percentage of its current
cap, then its power cap will be increased to the extent possible.
A node's power cap will also be increased if a job is newly started on it.
The default value is 95 percent.
Supported by the power/cray_aries plugin.
upper_threshold =#-電力消費の上限しきい値を指定します。ノードの現在の電力消費量が現在の上限のこのパーセンテージを上回っている場合、その電力上限は可能な限り増加されます。ノードで新たにジョブが開始されると、ノードの消費電力上限も増加します。デフォルト値は95%です。power / cray_ariesプラグインでサポートされています。
- balance_interval=# -
Specifies the time interval, in seconds, between attempts to balance power
caps across the nodes.
This also controls the frequency at which Slurm attempts to collect current
power consumption data (old data may be used until new data is available from
the underlying infrastructure and values below 10 seconds are not recommended
for Cray systems).
The default value is 30 seconds.
Supported by the power/cray_aries plugin.
- PowerPlugin:
Identifies the plugin used to manage system power consumption.
Changes to this value require restarting Slurm daemons to take effect.
By default, no power plugin is loaded.
Currently valid options are:
PowerPlugin:システムの電力消費を管理するために使用されるプラグインを識別します。この値の変更を有効にするには、Slurmデーモンを再起動する必要があります。デフォルトでは、電源プラグインはロードされていません。現在有効なオプションは次のとおりです。
- power/cray_aries -
Used for Cray XC systems with power monitoring and management
functionality included as part of System Management Workstation (SMW)
7.0.UP03.
power / cray_aries-システム管理ワークステーション(SMW)7.0.UP03の一部として含まれている電力監視および管理機能を備えたCray XCシステムに使用されます。 - power/none - No power management support.
power / none-電源管理サポートなし。
- power/cray_aries -
Used for Cray XC systems with power monitoring and management
functionality included as part of System Management Workstation (SMW)
7.0.UP03.
Note for Cray systems: The JSON-C library must be installed in order
to build Slurm's power/cray_aries plugin, which must parse JSON format data.
See Slurm's JSON installation information
for details.
Crayシステムに関する注意:JSON形式のデータを解析する必要があるSlurmのpower / cray_ariesプラグインをビルドするには、JSON-Cライブラリをインストールする必要があります。詳細については、SlurmのJSONインストール情報を参照してください。
Note for Cray systems: Power management is provided for native
Slurm configurations (i.e. without the ALPS resource manager).
Crayシステムに関する注意:ネイティブSlurm構成(つまり、ALPSリソースマネージャーなし)の電源管理が提供されます。
Note for Cray systems: Use of the capmc command requires either
specifying its absolute path ("/opt/cray/capmc/default/bin/capmc" by default)
or loading the capmc module:
Crayシステムに関する注意:capmcコマンドを使用するには、絶対パス(デフォルトでは「/ opt / cray / capmc / default / bin / capmc」)を指定するか、capmcモジュールをロードする必要があります。
$ module load capmc
User and System Administrator Commands
ユーザーおよびシステム管理者のコマンド
Equal power caps for all nodes allocated to a job can be requested at job
submission time by using the "--power=level" option with the salloc, sbatch
or srun command.
The system administrator can override the user option with the PowerParameters
configuration parameter and the job_level or job_no_level option.
salloc、sbatch、またはsrunコマンドで「--power = level」オプションを使用すると、ジョブの送信時に、ジョブに割り当てられたすべてのノードに等しい消費電力上限を要求できます。システム管理者は、PowerParameters構成パラメーターとjob_levelまたはjob_no_levelオプションでユーザーオプションを上書きできます。
Specific minimum and maximum CPU frequency in addition to CPU governor may
be requested at job submit time using the "--cpu-freq" option with the salloc,
sbatch or srun command. The frequency requested may be "low", "medium",
"highm1" (second highest available frequency), "high" or a specific frequency
(expressed as a KHz value). The governor specification may be "conservative",
"ondemand", "performance" or "powersave". These values are user requests
subject to system constraints. Some examples follow.
CPUガバナーに加えて、特定の最小および最大CPU周波数は、ジョブの送信時にsalloc、sbatch、またはsrunコマンドで「--cpu-freq」オプションを使用して要求できます。要求される周波数は、「低」、「中」、「highm1」(2番目に利用可能な周波数)、「高」、または特定の周波数(KHz値として表される)です。ガバナーの仕様は、「保守的」、「オンデマンド」、「パフォーマンス」、「省電力」のいずれかです。これらの値は、システムの制約を受けるユーザー要求です。次にいくつかの例を示します。
$ sbatch --cpu-freq=2400000-3000000 ... $ salloc --cpu-freq=powersave ... $ srun --cpu-freq=highm1 ...
The power consumption and power cap data are available for all compute nodes
using either the "scontrol show node" or sview commands.
Information available includes "CurrentWatts" and "CapWatts".
「scontrol show node」またはsviewコマンドのいずれかを使用して、すべての計算ノードで消費電力と消費電力上限のデータを利用できます。利用可能な情報には、「CurrentWatts」と「CapWatts」が含まれます。
Example
Initial State
In our example, assume the following configuration:
10 compute node cluster, where each node has a minimum power consumption of 100 watts
and maximum power consumption of 200 watts.
The following values for PowerParameters:
balance_interval=60,
cap_watts=1800,
decrease_rate=30, increase_rate=10,
lower_threshold=90, upper_threshold=98.
The initial state is simply based upon the cap_watts divided by the number of
compute nodes: 1800 watts / 10 nodes = 180 watts per node.
この例では、次の構成を想定しています。10個の計算ノードクラスター。各ノードの最小消費電力は100ワット、最大消費電力は200ワットです。PowerParametersの次の値:balance_interval = 60、cap_watts = 1800、reduce_rate = 30、increase_rate = 10、lower_threshold = 90、upper_threshold = 98。初期状態は単に、cap_wattsを計算ノードの数で割った値に基づいています。1800ワット/ 10ノード=ノードあたり180ワット。
State in 60 Seconds
The power consumption is then examined balance_interval (60) seconds later.
Assume that one of those nodes is consuming 110 watts and the others are
using 180 watts.
First we identify which nodes are consuming less than their lower_threshold
of the power cap: 90% x 180 watts = 162 watts.
One node falls in this category with 110 watts of power consumption.
Its power cap is reduced by either half of the difference between its current
power cap and power consumption ((180 watts - 110 watts) / 2 = 35 watts) OR
decrease_rate, which is a percentage of the difference between the node's
maximum and minimum power consumption ((200 watts - 100 watts) x 30% = 30 watts).
So that node's power cap is reduce from 180 watts to 150 watts.
Ignoring the upper_threshold parameter for now, we now have 1650 watts available
to distribute to the remaining 9 compute nodes, or 183 watts per node
(1650 watts / 9 nodes = 183 watts per node).
次に、消費電力がbalance_interval(60)秒後に調べられます。それらのノードの1つが110ワットを消費し、他のノードが180ワットを使用していると想定します。最初に、どのノードが電力上限のlower_threshold未満を消費しているかを特定します:90%x 180ワット= 162ワット。1つのノードはこのカテゴリに該当し、消費電力は110ワットです。その消費電力上限は、現在の消費電力上限と消費電力の差の半分((180ワット-110ワット)/ 2 = 35ワット)またはノードの最大電力と最小電力の差のパーセンテージである減少率によって減少します。消費量((200ワット-100ワット)x 30%= 30ワット)。したがって、そのノードの電力上限は180ワットから150ワットに削減されます。ここでは、upper_thresholdパラメータを無視します。
State in 120 Seconds
The power consumption is then examined balance_interval (60) seconds later.
Assume that one of those nodes is still consuming 110 watts, a second node is
consuming 115 watts and the other eight are using 183 watts.
First we identify which nodes are consuming less than their lower_threshold.
Our node using 110 watts has its cap reduced by half of the difference between
its current power cap and power consumption
((150 watts - 110 watts) / 2 = 20 watts);
so that node's power cap is reduce from 150 watts to 130 watts.
The node consuming 115 watts has its power cap reduced by 30 watts based
decrease_rate; so that node's power cap is reduce from 183 watts to 153 watts.
That leaves 1517 watts (1800 watts - 130 watts - 153 watts = 1517 watts) to
be distributed over 8 nodes or 189 watts per node.
次に、消費電力がbalance_interval(60)秒後に調べられます。それらのノードの1つがまだ110ワットを消費しており、2番目のノードが115ワットを消費しており、残りの8つは183ワットを使用しているとします。まず、lower_thresholdよりも消費が少ないノードを特定します。110ワットを使用しているノードでは、現在の電力上限と消費電力の差((150ワット-110ワット)/ 2 = 20ワット)の半分だけ、上限が削減されています。そのため、ノードの電力上限は150ワットから130ワットに削減されます。115ワットを消費するノードでは、電力の上限が30ワットベースで減少されます。そのため、ノードの電力上限は183ワットから153ワットに減少します。これにより、1517ワット(1800ワット-130ワット-153ワット= 1517ワット)が8ノードまたはノードあたり189ワットに分散されます。
State in 180 Seconds
The power consumption is then examined balance_interval (60) seconds later.
Assume the node previously consuming 110 watts is now consuming 128 watts.
Since that is over upper_threshold of its power cap
(98% x 130 watts = 127 watts), its power cap is increased by increase_rate
((200 watts - 100 watts) x 10% = 10 watts), so its power cap goes from
130 watts to 140 watts.
Assume the node previously consuming 115 watts has been allocated a new job.
This triggers the node to be allocated the same power cap as nodes previously
running at their power cap.
Therefore we have 1660 watts available (1800 watts - 140 watts = 1660 watts)
to be distributed over 9 nodes or 184 watts per node.
次に、消費電力がbalance_interval(60)秒後に調べられます。以前に110ワットを消費していたノードが現在128ワットを消費していると想定します。これは電力キャップの上限しきい値(98%x 130ワット= 127ワット)を超えているため、電力キャップは増加率((200ワット-100ワット)x 10%= 10ワット)だけ増加し、電力キャップは130からワットから140ワット。以前に115ワットを消費していたノードに新しいジョブが割り当てられたと想定します。これにより、以前に消費電力上限で実行していたノードと同じ消費電力上限がノードに割り当てられます。したがって、9つのノードまたはノードあたり184ワットに分散する1660ワット(1800ワット-140ワット= 1660ワット)を使用できます。
Notes
- Slurm's power management plugin can be used in conjunction with the
power save mode, where idle nodes are powered
down and then powered back up as needed. On a Cray system, set each node's
power cap to the minimum value before powering it down. Also set the default
power cap of each node to the minimum value as that will be used at power up
time.
Slurmの電源管理プラグインは、アイドルノードの電源がオフになり、必要に応じて再び電源がオンになる省電力モードと組み合わせて使用できます。Crayシステムでは、電源を切る前に、各ノードの電力上限を最小値に設定します。また、電源投入時に使用されるため、各ノードのデフォルトの消費電力上限を最小値に設定します。 - Cray permits independent power capping for accelerators (GPUs or MICs),
which is not currently used by Slurm.
Crayは、現在Slurmで使用されていないアクセラレータ(GPUまたはMIC)の独立した電力制限を許可しています。 - Current default values for configuration parameters should probably be
changed once we have a better understanding of the algorithm's behavior.
アルゴリズムの動作をよく理解したら、おそらく構成パラメーターの現在のデフォルト値を変更する必要があります。 - No integration of this logic with gang scheduling currently exists.
It is not clear that configuration is practical to support as gang scheduling
time slices will typically be smaller than the power management
balance_interval and synchronizing changes may be difficult
現在、このロジックとギャングスケジューリングの統合は存在しません。ギャングスケジューリングのタイムスライスは通常、電源管理のbalance_intervalよりも小さく、変更の同期が難しいため、構成がサポートするのに実用的であることは明らかではありません。 - There can be situations where capmc program gets stuck for some reason and
the node remains in IDLE*+POWER state until ResumeTimeout is reached, despite
it has been rebooted or manually cleaned.
In this situation the node can be brought back into service issuing an
'scontrol update nodename=xxx state=power_down' which will cancel the
previous power_up request. Then capmc program must be diagnosed and fixed.
何らかの理由でcapmcプログラムがスタックし、ノードが再起動または手動でクリーンアップされているにもかかわらず、ResumeTimeoutに達するまでノードがIDLE * + POWER状態のままになる場合があります。この状況では、ノードをサービスに戻し、「scontrol update nodename = xxx state = power_down」を発行して、前のpower_up要求をキャンセルすることができます。次に、capmcプログラムを診断して修正する必要があります。
Last modified 7 Mar 2018