Quality of Service (QOS)
One can specify a Quality of Service (QOS) for each job submitted
to Slurm. The quality of service associated with a job will affect
the job in three ways:
Slurmに送信される各ジョブのサービス品質(QOS)を指定できます。ジョブに関連付けられたサービス品質は、次の3つの点でジョブに影響します。
The QOS's are defined in the Slurm database using the sacctmgr
utility.
QOSは、sacctmgrユーティリティを使用してSlurmデータベースで定義されます。
Jobs request a QOS using the "--qos=" option to the
sbatch, salloc, and srun commands.
ジョブは、sbatch、salloc、およびsrunコマンドの「--qos =」オプションを使用してQOSを要求します。
Job Scheduling Priority
Job scheduling priority is made up of a number of factors as
described in the priority/multifactor plugin. One
of the factors is the QOS priority. Each QOS is defined in the Slurm
database and includes an associated priority. Jobs that request and
are permitted a QOS will incorporate the priority associated with that
QOS in the job's multi-factor priority
calculation.
ジョブスケジューリングの優先順位は、priority / multifactorプラグインで説明されているように、いくつかの要素で構成されています。要因の1つは、QOS優先度です。各QOSはSlurmデータベースで定義され、関連付けられた優先度が含まれています。QOSを要求して許可されるジョブは、そのQOSに関連付けられた優先度をジョブの多要素優先度計算に組み込みます。
To enable the QOS priority component of the multi-factor priority
calculation, the "PriorityWeightQOS" configuration parameter must be
defined in the slurm.conf file and assigned an integer value greater
than zero.
多要素優先度計算のQOS優先度コンポーネントを有効にするには、 "PriorityWeightQOS"構成パラメーターをslurm.confファイルで定義し、ゼロより大きい整数値を割り当てる必要があります。
A job's QOS only affects is scheduling priority when the
multi-factor plugin is loaded.
ジョブのQOSが影響するのは、多要素プラグインがロードされたときのスケジューリング優先度だけです。
Job Preemption
Slurm offers two ways for a queued job to preempt a running job,
free-up the running job's resources and allocate them to the queued
job. See the Preemption description for
details.
Slurmは、キューに入れられたジョブが実行中のジョブをプリエンプトし、実行中のジョブのリソースを解放して、それらをキューに入れられたジョブに割り当てる2つの方法を提供します。詳細については、プリエンプションの説明を参照してください。
The preemption method is determined by the "PreemptType"
configuration parameter defined in slurm.conf. When the "PreemptType"
is set to "preempt/qos", a queued job's QOS will be used to determine
whether it can preempt a running job.
プリエンプション方式は、slurm.confで定義された「PreemptType」構成パラメーターによって決定されます。「PreemptType」が「preempt / qos」に設定されている場合、キューに入れられたジョブのQOSを使用して、実行中のジョブをプリエンプトできるかどうかが判断されます。
The QOS can be assigned (using sacctmgr) a list of other
QOS's that it can preempt. When there is a queued job with a QOS that
is allowed to preempt a running job of another QOS, the Slurm
scheduler will preempt the running job.
QOSには、(sacctmgrを使用して)プリエンプトできる他のQOSのリストを割り当てることができます。別のQOSの実行中のジョブをプリエンプトすることが許可されているQOSのキューに入れられたジョブがある場合、Slurmスケジューラーは実行中のジョブをプリエンプトします。
The QOS option PreemptExemptTime specifies the minimum run time before the
job is considered for preemption. The QOS option takes precedence over the
global option of the same name.
QOSオプションPreemptExemptTimeは、ジョブがプリエンプションと見なされるまでの最小実行時間を指定します。QOSオプションは、同じ名前のグローバルオプションよりも優先されます。
Job Limits
Each QOS is assigned a set of limits which will be applied to the
job. The limits mirror the limits imposed by the
user/account/cluster/partition association defined in the Slurm
database and described in the Resource
Limits section. When limits for a QOS have been defined, they
will take precedence over the association's limits.
各QOSには、ジョブに適用される一連の制限が割り当てられます。制限は、Slurmデータベースで定義され、リソース制限セクションで説明されているユーザー/アカウント/クラスター/パーティションの関連付けによって課される制限を反映しています。QOSの制限が定義されている場合、それらはアソシエーションの制限よりも優先されます。
Partition QOS
A QOS can be attached to a partition. This means a partition will have all
the same limits as a QOS. This also gives the ability of a true 'floating'
partition, meaning if you assign all the nodes to a partition and then in the
Partition's QOS limit the number of GrpCPUs or GrpNodes the partition will have
access to all the nodes, but only be able to run on the number of
resources in it.
QOSはパーティションに接続できます。つまり、パーティションにはQOSと同じ制限がすべてあります。これにより、真の「フローティング」パーティションの機能も提供されます。つまり、すべてのノードをパーティションに割り当て、パーティションのQOS制限でGrpCPUまたはGrpNodesの数を制限すると、パーティションはすべてのノードにアクセスできますが、その中のリソースの数で実行します。
The Partition QOS will override the job's QOS. If the opposite is
desired you need to have the job's QOS have the 'OverPartQOS' flag
which will reverse the order of precedence.
パーティションQOSはジョブのQOSを上書きします。逆が必要な場合は、ジョブのQOSに「OverPartQOS」フラグを付けて、優先順位を逆にする必要があります。
Other QOS Options
- Flags Used by the slurmctld to override or enforce certain
characteristics. Valid options are:
フラグslurmctldが特定の特性をオーバーライドまたは強制するために使用します。有効なオプションは次のとおりです。
- DenyOnLimit If set, jobs using this QOS will be rejected at
submission time if they do not conform to the QOS 'Max' limits. Group
limits will also be treated like 'Max' limits as well and will be
denied if they go over. By default jobs that go over these limits
will pend until they conform. This currently only applies to QOS and
Association limits.
DenyOnLimit設定されている場合、このQOSを使用するジョブは、QOSの「最大」制限に準拠していない場合、送信時に拒否されます。グループ制限も「最大」制限と同様に扱われ、超えた場合は拒否されます。デフォルトでは、これらの制限を超えるジョブは、準拠するまで保留されます。これは現在、QOSとアソシエーションの制限にのみ適用されます。
- EnforceUsageThreshold If set, and the QOS also has a UsageThreshold,
any jobs submitted with this QOS that fall below the UsageThreshold
will be held until their Fairshare Usage goes above the Threshold.
EnforceUsageThreshold設定されていて、QOSにもUsageThresholdがある場合、このQOSで送信され、UsageThresholdを下回るジョブは、フェアシェアの使用量がしきい値を超えるまで保留されます。
- NoReserve If this flag is set and backfill scheduling is used,
jobs using this QOS will not reserve resources in the backfill
schedule's map of resources allocated through time. This flag is
intended for use with a QOS that may be preempted by jobs associated
with all other QOS (e.g use with a "standby" QOS). If this flag is
used with a QOS which can not be preempted by all other QOS, it could
result in starvation of larger jobs.
NoReserveこのフラグが設定されていて、バックフィルスケジューリングが使用されている場合、このQOSを使用するジョブは、バックフィルスケジュールの時間を通じて割り当てられたリソースのマップでリソースを予約しません。このフラグは、他のすべてのQOSに関連付けられているジョブによってプリエンプトされる可能性があるQOSでの使用を目的としています(たとえば、「スタンバイ」QOSでの使用)。このフラグを他のすべてのQOSが横取りできないQOSで使用すると、より大きなジョブが不足する可能性があります。
- PartitionMaxNodes If set, jobs using this QOS will be able to
override the requested partition's MaxNodes limit.
PartitionMaxNodes設定されている場合、このQOSを使用するジョブは、要求されたパーティションのMaxNodes制限をオーバーライドできます。
- PartitionMinNodes If set, jobs using this QOS will be able to
override the requested partition's MinNodes limit.
PartitionMinNodes設定されている場合、このQOSを使用するジョブは、要求されたパーティションのMinNodes制限をオーバーライドできます。
- OverPartQOS If set, jobs using this QOS will be able to
override any limits used by the requested partition's QOS limits.
OverPartQOS設定されている場合、このQOSを使用するジョブは、要求されたパーティションのQOS制限によって使用される制限を上書きできます。
- PartitionTimeLimit If set, jobs using this QOS will be able to
override the requested partition's TimeLimit.
PartitionTimeLimit設定されている場合、このQOSを使用するジョブは、要求されたパーティションのTimeLimitをオーバーライドできます。
- RequiresReservaton If set, jobs using this QOS must designate a
reservation when submitting a job. This option can be useful in
restricting usage of a QOS that may have greater preemptive capability
or additional resources to be allowed only within a reservation.
RequiresReservaton設定されている場合、このQOSを使用するジョブは、ジョブを送信するときに予約を指定する必要があります。このオプションは、より大きなプリエンプティブ機能または追加のリソースが予約内でのみ許可される可能性があるQOSの使用を制限するのに役立ちます。
- NoDecay If set, this QOS will not have its GrpTRESMins,
GrpWall and UsageRaw decayed by the slurm.conf PriorityDecayHalfLife
or PriorityUsageResetPeriod settings. This allows
a QOS to provide aggregate limits that, once consumed, will not be
replenished automatically. Such a QOS will act as a time-limited quota
of resources for an association that has access to it. Account/user
usage will still be decayed for associations using the QOS. The QOS
GrpTRESMins and GrpWall limits can be increased or
the QOS RawUsage value reset to 0 (zero) to again allow jobs submitted
with this QOS to be queued (if DenyOnLimit is set) or run (pending with
QOSGrp{TRES}MinutesLimit or QOSGrpWallLimit
reasons, where {TRES} is some type of trackable resource).
NoDecay設定されている場合、このQOSは、slurm.conf PriorityDecayHalfLifeまたはPriorityUsageResetPeriod設定によって減衰されたGrpTRESMins、GrpWall、およびUsageRawを持ちません。これにより、QOSは、一度消費されると自動的に補充されない集計制限を提供できます。このようなQOSは、それにアクセスできるアソシエーションのリソースの時間制限付きクォータとして機能します。QOSを使用する関連付けでは、アカウント/ユーザーの使用は引き続き減少します。QOS GrpTRESMinsとGrpWallの制限を増やすか、QOS RawUsage値を0(ゼロ)にリセットして、このQOSで送信されたジョブをキューに入れる(DenyOnLimitが設定されている場合)か、実行する(QOSGrp {TRES} MinutesLimitまたはQOSGrpWallLimitの理由で保留中)ここで、{TRES}は追跡可能なリソースの一種です)。
- UsageFactorSafe If set, and AccountingStorageEnforce includes
Safe, jobs will only be able to run if the job can run to completion
with the UsageFactor applied.
UsageFactorSafeが設定されていて、AccountingStorageEnforceにSafeが含まれている場合、UsageFactorを適用してジョブを完了するまで実行できる場合にのみ、ジョブを実行できます。
- DenyOnLimit If set, jobs using this QOS will be rejected at
submission time if they do not conform to the QOS 'Max' limits. Group
limits will also be treated like 'Max' limits as well and will be
denied if they go over. By default jobs that go over these limits
will pend until they conform. This currently only applies to QOS and
Association limits.
- GraceTime Preemption grace time to be extended to a job
which has been selected for preemption.
GraceTimeプリエンプションのために選択されたジョブまで延長されるプリエンプション猶予時間。
UsageFactor A float that is factored into a job’s TRES usage (e.g. RawUsage, TRESMins, TRESRunMins). For example, if the usagefactor was 2, for every TRESBillingUnit second a job ran it would count for 2. If the usagefactor was .5, every second would only count for half of the time. A setting of 0 would add no timed usage from the job.
UsageFactorジョブのTRES使用量に因数分解される浮動小数点数(RawUsage、TRESMins、TRESRunMinsなど)。たとえば、使用率が2の場合、TRESBillingUnitの1秒ごとにジョブが実行され、2としてカウントされます。使用率が0.5の場合、毎秒は半分の時間しかカウントされません。0に設定すると、ジョブからの時間指定の使用は追加されません。
The usage factor only applies to the job's QOS and not the partition QOS.
使用率は、ジョブのQOSにのみ適用され、パーティションQOSには適用されません。
If the UsageFactorSafe flag is set and AccountingStorageEnforce includes Safe, jobs will only be able to run if the job can run to completion with the UsageFactor applied.
UsageFactorSafeフラグが設定されていて、AccountingStorageEnforceにSafeが含まれている場合、UsageFactorが適用された状態でジョブを最後まで実行できる場合にのみ、ジョブを実行できます。
If the UsageFactorSafe flag is not set and AccountingStorageEnforce includes Safe, a job will be able to be scheduled without the UsageFactor applied and will be able to run without being killed due to limits.
UsageFactorSafeフラグが設定されておらず、AccountingStorageEnforceにSafeが含まれている場合、UsageFactorを適用せずにジョブをスケジュールでき、制限のために強制終了されることなく実行できます。
If the UsageFactorSafe flag is not set and AccountingStorageEnforce does not include Safe, a job will be able to be scheduled without the UsageFactor applied and could be killed due to limits.
UsageFactorSafeフラグが設定されておらず、AccountingStorageEnforceにSafeが含まれていない場合、UsageFactorを適用せずにジョブをスケジュールでき、制限により中止される可能性があります。
See AccountingStorageEnforce in slurm.conf man page.
slurm.confのmanページのAccountingStorageEnforceを参照してください。
Default is 1. To clear a previously set value use the modify command with a new value of -1.
デフォルトは1です。以前に設定した値をクリアするには、新しい値-1を指定してmodifyコマンドを使用します。
- UsageThreshold
A float representing the lowest fairshare of an association allowable
to run a job. If an association falls below this threshold and has
pending jobs or submits new jobs those jobs will be held until the
usage goes back above the threshold. Use sshare to see current
shares on the system.
UsageThresholdジョブの実行を許可されている関連付けの最低フェアシェアを表す浮動小数点数。アソシエーションがこのしきい値を下回り、保留中のジョブがあるか、新しいジョブを送信すると、使用量がしきい値を超えるまで、それらのジョブは保留されます。sshareを使用して、システム上の現在の共有を確認します。
Configuration
To summarize the above, the QOS's and their associated limits are
defined in the Slurm database using the sacctmgr utility. The
QOS will only influence job scheduling priority when the multi-factor
priority plugin is loaded and a non-zero "PriorityWeightQOS" has been
defined in the slurm.conf file. The QOS will only determine job
preemption when the "PreemptType" is defined as "preempt/qos" in the
slurm.conf file. Limits defined for a QOS (and described above) will
override the limits of the user/account/cluster/partition
association.
上記を要約すると、QOSとそれに関連する制限は、sacctmgrユーティリティを使用してSlurmデータベースで定義されます。QOSは、多要素優先度プラグインが読み込まれ、slurm.confファイルでゼロ以外の「PriorityWeightQOS」が定義されている場合にのみ、ジョブスケジューリングの優先度に影響します。「PreemptType」がslurm.confファイルで「preempt / qos」として定義されている場合にのみ、QOSはジョブのプリエンプションを決定します。QOSに対して定義された制限(および上記で説明)は、ユーザー/アカウント/クラスター/パーティションの関連付けの制限をオーバーライドします。
QOS examples
QOS manipulation examples. All QOS operations are done using
the sacctmgr command. The default output of 'sacctmgr show qos' is
very long given the large number of limits and options available
so it is best to use the format option which filters the display.
QOS操作の例。すべてのQOS操作は、sacctmgrコマンドを使用して行われます。'sacctmgr show qos'のデフォルトの出力は、使用可能な制限とオプションの数が多いため非常に長いため、表示をフィルターするformatオプションを使用するのが最適です。
By default when a cluster is added to the database a default
qos named normal is created.
デフォルトでは、クラスターがデータベースに追加されると、normalという名前のデフォルトqosが作成されます。
$ sacctmgr show qos format=name,priority Name Priority ---------- ---------- normal 0
Add a new qos
新しいQoSを追加する
$ sacctmgr add qos zebra Adding QOS(s) zebra Settings Description = QOS Name $ sacctmgr show qos format=name,priority Name Priority ---------- ---------- normal 0 zebra 0
Set QOS priority
QOS優先度を設定する
$ sacctmgr modify qos zebra set priority=10 Modified qos... zebra $ sacctmgr show qos format=name,priority Name Priority ---------- ---------- normal 0 zebra 10
Set some other limits:
その他の制限を設定します。
$ sacctmgr modify qos zebra set GrpCPUs=24 Modified qos... zebra $ sacctmgr show qos format=name,priority,GrpCPUs Name Priority GrpCPUs ---------- ---------- -------- normal 0 zebra 10 24
Add a qos to a user account
ユーザーアカウントにQoSを追加する
$ sacctmgr modify user crock set qos=zebra $ sacctmgr show assoc format=cluster,user,qos Cluster User QOS ---------- ---------- -------------------- canis_major normal canis_major root normal canis_major normal canis_major crock zebra
Users can belong to multiple qos
ユーザーは複数のQoSに所属できます
$ sacctmgr modify user crock set qos+=alligator $ sacctmgr show assoc format=cluster,user,qos Cluster User QOS ---------- ---------- -------------------- canis_major normal canis_major root normal canis_major normal canis_major crock alligator,zebra
Finally delete a qos
最後にQoSを削除します
$ sacctmgr delete qos alligator Deleting QOS(s)... alligator
Last modified 9 July 2019