JP7355456B2 - CPU resource management device - Google Patents
CPU resource management device Download PDFInfo
- Publication number
- JP7355456B2 JP7355456B2 JP2019222164A JP2019222164A JP7355456B2 JP 7355456 B2 JP7355456 B2 JP 7355456B2 JP 2019222164 A JP2019222164 A JP 2019222164A JP 2019222164 A JP2019222164 A JP 2019222164A JP 7355456 B2 JP7355456 B2 JP 7355456B2
- Authority
- JP
- Japan
- Prior art keywords
- time
- interval
- cpu
- interval time
- cpu usage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 claims description 137
- 238000007726 management method Methods 0.000 claims description 49
- 238000013468 resource allocation Methods 0.000 claims description 45
- 238000012545 processing Methods 0.000 description 19
- 238000012552 review Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 4
- 206010000210 abortion Diseases 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
- Multi Processors (AREA)
Description
本発明は、CPUリソース管理装置、CPUリソース管理方法、および、プログラムに関する。 The present invention relates to a CPU resource management device, a CPU resource management method, and a program.
近年のコンピュータシステムでは、システム管理者が、プロセスが属するクラスであるワークロードクラスを設定し、ワークロードクラス毎に利用可能なCPUリソースを割り当てることが行われている。このようなコンピュータシステムでは、各ワークロードクラスに対するリソース配分を適切に行わないと、システム性能が大きく低下し、システムの運用に支障をきたすことがある。そのため、これまでにも、各ワークロードクラスに対するCPUリソース配分を工夫して行うための技術が開示されている。 In recent computer systems, system administrators set workload classes, which are classes to which processes belong, and allocate available CPU resources to each workload class. In such a computer system, if resources are not allocated appropriately to each workload class, system performance may drop significantly and system operation may be hindered. Therefore, techniques have been disclosed for devising CPU resource allocation to each workload class.
例えば、特許文献1には、各ワークロードクラスに割り当てるCPUリソースの配分比に従い、一定の時間であるインターバル毎に、各ワークロードクラスにCPUリソースを割り当てる最大CPU使用時間を設定し、この最大CPU使用時間に従い、各ワークロードクラスに属するプロセスにCPUリソースを割り当てる技術が記載されている。例えば、a、b、cの3つのワークロードクラスがあり、そのCPUリソース配分比を4:3:3とし、インターバル時間を100msとすると、1回のインターバルでは、ワークロードクラスa、b、cに属する各プロセスに、それぞれ最大40ms、30ms、30msのCPU使用時間が割り当てられることになる。
For example, in
ところで、インターバル内で、割り当てられた最大CPU使用時間を必要としない低負荷なワークロードクラスが存在する場合、余剰CPU時間分だけ、インターバルを早く終了し、次のインターバルを開始することが望ましい。例えば、ワークロードクラスaは高負荷な状態にあり、割り当てられた最大CPU使用時間以上にCPUリソースを必要とするが、ワークロードクラスb、cは低負荷な状態にあり、割り当てられた最大CPU使用時間を必要としないものとする。このとき、ワークロードクラスb、cが割り当てられた最大CPU使用時間の30msのうち例えば15msだけしか使用しなかった場合、30msの余剰CPU時間分だけ、インターバルを早く終了し、次のインターバルを開始する。この結果、前回のインターバルは実質70msに短縮される。次のインターバルでも同様の状況が生じると、次のインターバルも実質70msに短縮される。 By the way, if there is a low-load workload class that does not require the allocated maximum CPU usage time within the interval, it is desirable to end the interval earlier by the excess CPU time and start the next interval. For example, workload class a is in a high load state and requires more CPU resources than the allotted maximum CPU usage time, while workload classes b and c are in a low load state and require more CPU resources than the allotted maximum CPU usage time. It shall not require any usage time. At this time, if workload classes b and c use only 15ms of the maximum CPU usage time of 30ms allocated to them, the interval will end early by the 30ms of extra CPU time and the next interval will start. do. As a result, the previous interval is effectively shortened to 70 ms. If a similar situation occurs in the next interval, the next interval will also be effectively shortened to 70 ms.
このように割り当てられた最大CPU使用時間を必要としない低負荷なワークロードクラスの余剰CPU時間分だけインターバルを短縮することにより、割り当てられた最大CPU使用時間以上にCPUリソースを必要とする高負荷なワークロードクラスのターンアラウンド時間を改善することができる。しかしながら、インターバルを短縮すればするほどに単位時間当たりのプロセス切り替え回数が増大するため、スループットが低下する。 In this way, by shortening the interval by the surplus CPU time of a low-load workload class that does not require the allocated maximum CPU usage time, you can reduce the interval by the surplus CPU time of a low-load workload class that does not require the allocated maximum CPU usage time. can improve turnaround time for specific workload classes. However, as the interval is shortened, the number of process switches per unit time increases, resulting in a decrease in throughput.
本発明の目的は、上述した課題を解決するCPUリソース管理装置を提供することにある。 An object of the present invention is to provide a CPU resource management device that solves the above-mentioned problems.
本発明の一形態に係るCPUリソース管理装置は、
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたCPUリソース管理装置であって、
前記プロセッサは、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する実行制御手段と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する調整手段と、
を備えるように構成されている。
A CPU resource management device according to one embodiment of the present invention includes:
A CPU resource management device comprising a storage device that stores a process, and a processor that executes the process,
The processor includes:
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. Execution control means for recording the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval. and,
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and adjustment means for determining the next maximum CPU usage time for each workload class based on the distribution ratio of CPU usage time for each workload class;
It is configured to include.
また本発明の他の形態に係るCPUリソース管理方法は、
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたコンピュータが実行するCPUリソース管理方法であって、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録し、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する、
ように構成されている。
Further, a CPU resource management method according to another embodiment of the present invention includes:
A CPU resource management method executed by a computer including a storage device that stores a process and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. and record the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
It is configured as follows.
また本発明の他の形態に係るプログラムは、
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたコンピュータに、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する処理と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する処理と、
を行わせるように構成されている。
Further, a program according to another embodiment of the present invention is
A computer including a storage device that stores a process, and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. terminating the interval and recording the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
is configured to perform the following.
本発明は上述したような構成を有することにより、コンピュータシステムのスループットを改善することができる。 By having the configuration as described above, the present invention can improve the throughput of a computer system.
次に本発明の実施の形態について図面を参照して詳細に説明する。
[第1の実施形態]
図1は本発明の第1の実施形態に係るCPUリソース管理装置100のブロック図である。図1を参照すると、CPUリソース管理装置100は、記憶装置110と、この記憶装置110に接続されたCPU120とから構成されている。
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[First embodiment]
FIG. 1 is a block diagram of a CPU resource management device 100 according to a first embodiment of the present invention. Referring to FIG. 1, the CPU resource management device 100 includes a
記憶装置110は、ハードディスクやメモリなどから構成され、CPU120で実行される各種処理に必要な処理情報およびプログラム114を記憶するように構成されている。プログラム114は、CPU120に読み込まれて実行されることにより各種処理部を実現するプログラムであり、図示しない通信インターフェース部などのデータ入出力機能を介して外部装置(図示せず)や記憶媒体(図示せず)から予め読み込まれて記憶装置110に保存される。記憶装置110に記憶される処理情報には、ワークロード定義111、実行可能プロセスキュー112、および、ディスパッチング情報113がある。
The
ワークロード定義111は、プロセス(もしくはジョブ)が属するクラス(ワークロードクラス)を定義するクラス定義と、各ワークロードクラスに割り当てるCPUリソースの配分比(または配分率)を定義する配分定義とを表す情報である。ワークロード定義111は、主に、システム管理者により設定される。図2は、ワークロード定義111の構成例である。このワークロード定義111のクラス定義では、それぞれa、b、cという名前の3つのワードロードクラスが存在することが定義されている。ワードロードクラスは、主に、業務単位に分けられる。また、このワークロード定義111の配分定義では、ワークロードクラスa、b、cのCPUリソースの配分比が4:3:3であることが定義されている。
The
実行可能プロセスキュー112は、実行可能なプロセスがキューイングされる記憶手段である。図3は、実行可能プロセスキュー112の構成例である。この実行可能プロセスキュー112では、キューイングされたプロセスのプロセス番号および所属するワークロードクラスの情報が記憶されている。実行可能プロセスキュー112には、プロセス番号および所属するワークロードクラスの情報以外に、各プロセスの実行優先度などの情報が記憶されていてもよい。また、各プロセスが所属するワークロードクラスは、実行可能プロセスキュー112以外の箇所で記憶するようにしてもよい。
The
ディスパッチング情報113は、プロセスにCPUリソースを割り当てる制御に使用する情報である。図1を参照すると、ディスパッチング情報113は、ベースインターバル時間131、プロセス切替平均時間132、閾値133、次回のインターバル時間134、次回のワークロードクラス毎の最大CPU使用時間135、前回のインターバル時間136、前回の総割り当て時間137、および、前回のCPUリソース割り当て打ち切り回数138を含んで構成されている。
The dispatching
ベースインターバル時間131は、基本となるインターバル時間であり、固定値である。例えば、ベースインターバル時間131は、100msとしてよい。
The
プロセス切替平均時間132は、CPU120上で実行するプロセスを別のプロセスに切り替えるために必要な時間の平均値である。プロセス切替平均時間132は、1回のプロセス切替にかかる平均時間である。
The process switching
閾値133は、後述する次回のインターバル時間見直し処理(2)の判定で使用する閾値である。
The
次回のインターバル時間134は、次回のインターバルで使用されるインターバル時間である。この次回のインターバル時間134は可変値である。
The
次回のワークロードクラス毎の最大CPU使用時間135は、次回のインターバルにおけるワークロードクラス毎の最大CPU使用時間である。最大CPU使用時間は、配分時間とも称される。
The next maximum CPU usage time for each
前回のインターバル時間136は、前回のインターバルで使用されたインターバル時間である。
The
前回の総割り当て時間137は、前回のインターバルの開始から終了までの時間である。
The previous
前回のCPUリソース割り当て打ち切り回数138は、前回のインターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数である。
The previous CPU resource
CPU120は、演算処理装置とその周辺回路とから構成され、記憶装置110からプログラム114を読み込んで実行することにより、ハードウェアとプログラム114とを協働させて各種処理部を実現するように構成されている。CPU120で実現される処理部には、初期化手段121と実行制御手段122と調整手段123とがある。
The
初期化手段121は、ワークロード定義111およびディスパッチング情報113を初期化するように構成されている。具体的には、初期化手段121は、図示しない通信インターフェース部などのデータ入出力機能を介してシステム管理者からワークロード定義111を入力し、記憶装置110に記憶する。また初期化手段121は、ベースインターバル時間131に予め定められた固定時間(例えば100ms)を設定する。また初期化手段121は、プロセス切替平均時間132に事前の測定などによって決定した1回のプロセス切替にかかる平均時間(例えば10μs)を設定する。また初期化手段121は、閾値133に予め定められた値(例えば5%)を設定する。また初期化手段121は、次回のインターバル時間134にベースインターバル時間131と同じ時間を設定する。また初期化手段121は、次回のワークロードクラス毎の最大CPU使用時間135に、次回のインターバル時間134に設定したインターバル時間をワークロード定義111に記載されるワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロードクラス毎の最大CPU使用時間を設定する。また初期化手段121は、前回のCPUリソース割り当て打ち切り回数138に初期値(例えば0)を設定する。但し、初期化手段121は、前回のインターバル時間136、前回の総割り当て時間137、および、前回のCPUリソース割り当て打ち切り回数138に前回の履歴が残されている場合、それらを初期化しないようにしてもよい。
The initialization means 121 is configured to initialize the
実行制御手段122は、プロセスにCPUリソースを割り当てて実行するように構成されている。具体的には、実行制御手段122は、ディスパッチング情報113を記憶装置110から読み出し、そのディスパッチング情報113に従って、実行可能プロセスキュー112にキューイングされている各ワークロードクラスのプロセスを実行するインターバルを開始する。また実行制御手段122は、インターバルを開始すると、内部変数として有するワークロードクラス毎のCPU使用時間とCPUリソース割り当て打ち切り回数をそれぞれ零にリセットし、次回のインターバル時間134をセットしたタイマの減算を開始する。また実行制御手段122は、インターバル開始後のCPU使用時間が、次回のワークロードクラス毎の最大CPU使用時間135に設定されている最大CPU使用時間以下であるワークロードクラスに属するプロセスを実行可能プロセスキュー112から取り出してCPU120を割り当てて実行する。また実行制御手段122は、プロセスの実行時間に応じて、そのプロセスが属するワークロードクラスのCPU使用時間を加算する。また実行制御手段122は、プロセスの実行中に、そのプロセスが属するワークロードクラスのCPU使用時間がその最大CPU使用時間135を超えると、そのプロセスへのCPUリソースの割り当てを打ち切り、そのプロセスを実行可能プロセスキュー112に格納する。その際、実行制御手段122は、CPUリソース割り当て打ち切り回数をインクリメントする。また、実行中のプロセスが自らCPUを離す事象(入出力要求など)が発生した場合、実行制御手段122は、そのプロセスへのCPUリソースの割り当てを打ち切り、そのプロセスを図示しない実行待ちキューなどに格納する。このとき実行制御手段122は、CPUリソース割り当ての打ち切りを行った原因が最大CPU使用時間によるものでないため、CPUリソース割り当て打ち切り回数はインクリメントしない。
The execution control means 122 is configured to allocate CPU resources to processes and execute them. Specifically, the
一方、実行制御手段122は、インターバル開始後のCPU使用時間が次回のワークロードクラス毎の最大CPU使用時間135に設定されている最大CPU使用時間以下であるワークロードクラスに属するプロセスが、実行可能プロセスキュー112に存在しない場合、次回のインターバル時間134をセットしたタイマの減算を停止させ、今回のインターバルを終了する。また実行制御手段122は、インターバル開始後のCPU使用時間が次回のワークロードクラス毎の最大CPU使用時間135に設定されている最大CPU使用時間以下であるワークロードクラスに属するプロセスが、実行可能プロセスキュー112に存在していても、次回のインターバル時間134をセットしたタイマの値が零になってタイムアウトすると、今回のインターバルを終了する。
On the other hand, the
また実行制御手段122は、インターバルを終了すると、次のような更新処理をディスパッチング情報113に対して行った後、更新後のディスパッチング情報113を記憶装置110に書き戻す。先ず実行制御手段122は、前記のインターバル時間136に、次回のインターバル時間134に設定されていた時間を記憶する。また実行制御手段122は、次回のインターバル時間134から停止またはタイムアップしたタイマの値を減算することによって、今回のインターバルの開始から終了までの時間を総割り当て時間として計算し、前回の総割り当て時間137に記憶する。例えば、次回のインターバル時間134が例えば100msの場合、インターバルを開始するとタイマは100msから減算を開始するため、例えばタイマ値が30msの時点でインターバルを終了すると、100ms-30ms=70msが総割り当て時間となる。また実行制御手段122は、インターバル開始から終了までにカウントしたCPUリソース割り当て打ち切り回数を前回のCPUリソース割り当て打ち切り回数138に記憶する。
Further, when the interval ends, the
調整手段123は、実行制御手段122による前回のインターバルにおける各ワークロードクラスのプロセスの実行状況に基づいて、次回のインターバル時間および次回のワークロードクラス毎の最大CPU使用時間を調整するように構成されている。具体的には、調整手段123は、実行制御手段122によって更新されたディスパッチング情報113を記憶装置110から読み出し、次回のインターバル時間を以下のようにして見直す。
The adjustment means 123 is configured to adjust the next interval time and the next maximum CPU usage time for each workload class based on the execution status of the process of each workload class in the previous interval by the execution control means 122. ing. Specifically, the adjustment means 123 reads out the dispatching
<次回のインターバル時間見直し処理(1)>
先ず調整手段123は、前回の総割り当て時間137とベースインターバル時間131とを比較し、前回の総割り当て時間137が、ベースインターバル時間131より長いか、同じか、短いかを判断する。また調整手段123は、前回のCPUリソース割り当て打ち切り回数138が1以上か否か、すなわち、CPUリソースの割り当てが打ち切られたワークロードクラスが存在したか否かを判断する。次に調整手段123は、上記2つの判断の結果と予め定められた判定ルールとに基づいて、次回のインターバル時間を前回のインターバル時間136から変更するか、変更しないかを判断する。
<Next interval time review process (1)>
First, the adjusting means 123 compares the previous total allocated
図4は、判定ルールの構成例である。この判定ルールでは、以下の2つのケースの場合、次回のインターバル時間を前回のインターバル時間から変更し、それ以外のケースの場合、次回のインターバル時間を変更せずに前回のインターバル時間と同じにする。
<ケース1>
CPUリソースの割り当てが打ち切られたワークロードクラスが存在し、且つ、前回の総割り当て時間がベースインターバルより短い。
<ケース2>
前回の総割り当て時間がベースインターバルより長い。CPUリソースの割り当てが打ち切られたワークロードクラスが存在するか否かは問わない。
FIG. 4 is a configuration example of the determination rule. In this judgment rule, in the following two cases, the next interval time will be changed from the previous interval time, and in other cases, the next interval time will not be changed and will be the same as the previous interval time. .
<
There is a workload class for which CPU resource allocation has been discontinued, and the previous total allocation time is shorter than the base interval.
<
The previous total allocation time is longer than the base interval. It does not matter whether there is a workload class for which CPU resource allocation has been discontinued.
調整手段123は、上記判定において、次回のインターバル時間を前回のインターバル時間から変更すると判定した場合、ケース1の場合は、次回のインターバル時間を前回のインターバル時間よりも長い時間に変更し、ケース2の場合は、次回のインターバル時間を前回のインターバル時間よりも短い時間に変更する。具体的には、調整手段123は、図5に示す計算式(1)に従って、次回のインターバル時間を計算する。即ち、調整手段123は、前回の総割り当て時間137に対するベースインターバル時間131の比を前回のインターバル時間136に乗じて得られる時間を、次回のインターバル時間とする。
If the
<次回のインターバル時間見直し処理(2)>
調整手段123は、上記次回のインターバル時間見直し処理(1)に引き続き、次回のインターバル時間見直し処理(2)を実行する。次回のインターバル時間見直し処理(2)では、先ず調整手段123は、図6に示す条件式(2)が成立するか否かを判断する。即ち、調整手段123は、ベースインターバル時間に対する、最大CPU使用時間に達したことが原因で行われたプロセス切替による総時間(プロセス切替平均時間×n)の割合が、閾値以上か否かを判断する。ここで、条件式2および後述する計算式3において、nは前回のCPUリソース割り当て打ち切り回数138である。
<Next interval time review process (2)>
The adjusting means 123 executes the next interval time review process (2) following the next time interval review process (1). In the next interval time review process (2), the adjusting means 123 first determines whether conditional expression (2) shown in FIG. 6 is satisfied. That is, the adjusting means 123 determines whether the ratio of the total time (process switching average time x n) due to process switching performed due to reaching the maximum CPU usage time to the base interval time is equal to or greater than the threshold value. do. Here, in
次に調整手段123は、条件式2が成立しない場合、次回のインターバル時間見直し処理(1)で決定した次回のインターバル時間を、最終的な次回のインターバル時間に決定する。一方、調整手段123は、条件式2が成立する場合、次回のインターバル時間見直し処理(1)で決定した次回のインターバル時間が、更に長くなるように調整する。具体的には、調整手段123は、図7に示す計算式(3)に従って、次回のインターバル時間を計算する。即ち、調整手段123は、次回のインターバル時間見直し処理(1)で決定した次回のインターバル時間に、ベースインターバル時間に対する最大CPU使用時間に達したことが原因で行われたプロセス切替による総時間の割合を乗じた値に、更に閾値133で除算した値を、最終的な次回のインターバル時間とする。
Next, if
調整手段123は、最終的な次回のインターバル時間を決定すると、その最終的な次回のインターバル時間を、ディスパッチング情報113の次回のインターバル時間134に設定する。また調整手段123は、次回のインターバル時間134に設定したインターバル時間をワークロード定義111に記載されるワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロードクラス毎の最大CPU使用時間135をディスパッチング情報113に設定する。そして、調整手段123は、更新後のディスパッチング情報113を記憶装置110に書き戻す。
After determining the final next interval time, the adjusting means 123 sets the final next interval time as the
図8は、本実施形態に係るCPUリソース管理装置100の動作を示すフローチャートである。以下、図8を参照して、本実施形態に係るCPUリソース管理装置100の動作について説明する。 FIG. 8 is a flowchart showing the operation of the CPU resource management device 100 according to this embodiment. The operation of the CPU resource management device 100 according to this embodiment will be described below with reference to FIG. 8.
CPUリソース管理装置100は、起動すると、先ず初期化手段121が動作して初期化を行い(ステップS1)、その後に実行制御手段122が1つのインターバルによってプロセスの実行制御を行う(ステップS2)。また実行制御手段122によって1つのインターバルが終了する毎に、調整手段123は、可及的速やかに、前回のインターバルの状況に基づいて次回のインターバル時間およびワークロードクラス毎の最大CPU使用時間を調整する(ステップS3)。そして再び、実行制御手段122は、調整手段123の処理が終了すると、可及的速やかに、調整後のインターバル時間およびワークロードクラス毎のCPU使用時間に基づくインターバルを開始してプロセスの実行制御を行う(ステップS2)。このステップS2、S3のループは、システムの運用が停止されるまで継続して実行される。 When the CPU resource management device 100 is started, the initialization means 121 operates to perform initialization (step S1), and then the execution control means 122 controls the execution of processes at one interval (step S2). Furthermore, each time one interval is ended by the execution control means 122, the adjustment means 123 adjusts the next interval time and the maximum CPU usage time for each workload class as soon as possible based on the situation of the previous interval. (Step S3). Once the processing of the adjustment means 123 is finished, the execution control means 122 again starts an interval based on the adjusted interval time and the CPU usage time for each workload class to control the execution of the process. (Step S2). This loop of steps S2 and S3 is continuously executed until the system operation is stopped.
ステップS1の初期化では、初期化手段121は、前述したように記憶装置1100上のワークロード定義111およびディスパッチング情報113を初期化する。
In the initialization of step S1, the initialization means 121 initializes the
ステップS2の実行制御では、実行制御手段122は、ディスパッチング情報113に従って、実行可能プロセスキュー112にキューイングされている各ワークロードクラスのプロセスを実行する。具体的には、実行制御手段122は、インターバルを開始すると、インターバルの開始後のCPU使用時間が次回のワークロードクラス毎の最大CPU使用時間135以下であるワークロードクラスに属するプロセスにCPUリソースを割り当てて実行する。また実行制御手段122は、インターバルの開始後のCPU使用時間が上記最大CPU使用時間以下であるワークロードクラスに属するプロセスが存在しなくなった時点でインターバルを終了する。また実行制御手段122は、インターバル終了時、インターバルの開始から終了までに上記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数とインターバルの開始から終了までの時間である総割り当て時間とを、前回のCPUリソース割り当て打ち切り回数138と前回の総割り当て時間137とに設定する。
In the execution control in step S2, the execution control means 122 executes the processes of each workload class queued in the
ステップS3の調整では、調整手段123は、ディスパッチング情報113の前回の総割り当て時間137および前回のCPUリソース割り当て打ち切り回数138に基づいて、前述した次回のインターバル時間見直し処理(1)および次回のインターバル時間見直し処理(2)によって次回のインターバル時間134を決定し、また決定後の次回のインターバル時間に基づいて次回のワークロードクラス毎の最大CPU使用時間135を決定する。
In the adjustment in step S3, the adjusting means 123 performs the above-described next interval time review process (1) and The
次に本実施形態に係るCPUリソース管理装置100の効果を説明する。 Next, the effects of the CPU resource management device 100 according to this embodiment will be explained.
例えば、a、b、cの3つのワークロードクラスがあり、そのCPUリソース配分比を4:3:3とし、インターバル時間およびベースインターバル時間を100msとすると、そのインターバルでは、図9の上段に示すように、ワークロードクラスa、b、cに属する各プロセスに、それぞれ最大40ms、30ms、30msのCPU使用時間が割り当てられることになる。しかし、ワークロードクラスa、bが低負荷、ワークロードクラスcが高負荷な場合、例えば図9の中段に示すように、ワークロードクラスa、bに割り当てられた最大CPU使用時間に余剰が生じる一方、ワークロードクラスcでは最大CPU使用時間に達したことが原因でCPUリソース割り当ての打ち切りが生じる。 For example, if there are three workload classes a, b, and c, and the CPU resource allocation ratio is 4:3:3, and the interval time and base interval time are 100 ms, then the Thus, each process belonging to workload classes a, b, and c is allocated a maximum CPU usage time of 40 ms, 30 ms, and 30 ms, respectively. However, if workload classes a and b have a low load and workload class c has a high load, there will be a surplus in the maximum CPU usage time allocated to workload classes a and b, for example, as shown in the middle part of Figure 9. On the other hand, in workload class c, CPU resource allocation is discontinued because the maximum CPU usage time has been reached.
図9の例では、低負荷なワークロードクラスa、bは、それぞれ30ms、20msしか使用せず、それぞれ最大CPU使用時間のうちの10msは未使用である。一方、高負荷なワークロードクラスでは、最大CPU使用時間の30msを全て使った後、CPUリソースの割り当てを打ち切られている。その結果、総割り当て時間は、30+20+30=80msとなっている。 In the example of FIG. 9, the low-load workload classes a and b use only 30 ms and 20 ms, respectively, and 10 ms of the maximum CPU usage time is unused. On the other hand, in a high-load workload class, CPU resource allocation is terminated after the maximum CPU usage time of 30 ms is used. As a result, the total allocated time is 30+20+30=80ms.
このようなインターバルの実行後に行われる調整手段123による次回のインターバル時間見直し処理(1)では、前回の総割り当て時間である80msがベースインターバル時間である100msより小さく、且つ、CPUリソースの割り当てが打ち切られたワークロードクラスcが存在するため、図4の判定ルールから次回のインターバル時間を前回のインターバル時間から変更すると判断する。そして、調整手段123は、図5の計算式1の右辺の前回のインターバル時間に100ms、ベースインターバル時間に100ms、前回の総割り当て時間に80msを代入することにより、次回のインターバル時間として125msを計算する。次に調整手段123は、次回のインターバル時間見直し処理(2)における図6の条件式が成立するか否かを判断するが、ここでは成立しなかったと仮定すると、次回のインターバル時間は最終的に125msに決定される。
In the next interval time review process (1) performed by the adjusting means 123 after execution of such an interval, if the previous total allocation time of 80 ms is smaller than the base interval time of 100 ms, and the CPU resource allocation is terminated. Since the workload class c exists, it is determined based on the determination rule in FIG. 4 that the next interval time should be changed from the previous interval time. Then, the adjusting means 123 calculates 125 ms as the next interval time by substituting 100 ms for the previous interval time, 100 ms for the base interval time, and 80 ms for the previous total allocated time on the right side of
次に調整手段123は、次回のインターバル時間である125msを配分比に従って配分することにより、次回のワークロードクラス毎の最大CPU使用時間として、図9に示すように、ワークロードクラスa、b、cにそれぞれ50ms、38ms、38msを割り当てる。そして、実行制御手段122は、次回のインターバル時間である125ms、次回のワークロードクラスa、b、cの最大CPU使用時間である50ms、38ms、38msの条件の下で、次のインターバルの実行を開始する。 Next, the adjusting means 123 allocates the next interval time of 125 ms according to the allocation ratio, so that the next maximum CPU usage time for each workload class is set as the maximum CPU usage time for workload classes a, b, Assign 50ms, 38ms, and 38ms to c, respectively. Then, the execution control means 122 executes the next interval under the conditions of the next interval time of 125 ms and the next maximum CPU usage time of workload classes a, b, and c of 50 ms, 38 ms, and 38 ms. Start.
ワークロードクラスa、b、cの負荷状況に変化がなければ、次回のインターバルにおいて、ワークロードクラスa、bは最大CPU使用時間の50ms、38msの全てを使わず、一部は未使用になる。一方、ワークロードクラスcは、最大CPU使用時間の38msを全て使用することになる。その結果、次回のインターバルにおいて予想される実際に使用するCPU使用時間は、図9に示すように、ワークロードクラスaは37ms(30×125/100)、ワークロードクラスbは25ms(20×125/100)、ワークロードクラスcは最大CPU使用時間の38msとなり、その合計(即ち、総割り当て時間)は100msとなる。換言すれば、調整手段123は、前回のインターバルの総割り当て時間をもとに、次回のインターバルの総割り当て時間がベースインターバル時間となるように、インターバル時間を長く設定し、これをもとに、各ワークロードクラスの最大CPU使用時間を決定していることになる。 If there is no change in the load status of workload classes a, b, and c, in the next interval, workload classes a and b will not use all of the maximum CPU usage time of 50ms and 38ms, and some of them will remain unused. . On the other hand, workload class c uses the entire maximum CPU usage time of 38 ms. As a result, the expected actual CPU usage time for the next interval is 37ms (30x125/100) for workload class a and 25ms (20x125/100) for workload class b, as shown in Figure 9. /100), workload class c has a maximum CPU usage time of 38 ms, and the total (that is, total allocated time) is 100 ms. In other words, the adjusting means 123 sets the interval time longer based on the total allocated time of the previous interval so that the total allocated time of the next interval becomes the base interval time, and based on this, This means determining the maximum CPU usage time for each workload class.
前回および今回のインターバルにおけるプロセス切替回数は共に3回であるため、前回と今回のインターバルを合わせると、80ms+100ms=180msの期間で合計6回のプロセス切替が行われることになり、単位時間当たりのプロセス切替回数は、6/180=0.0333となる。 The number of process switches in the previous and current intervals is 3, so if you combine the previous and current intervals, a total of 6 process switches will be performed in a period of 80ms + 100ms = 180ms, and the number of processes per unit time will be 3. The number of switching times is 6/180=0.0333.
一方、次回のインターバル時間の調整を行わず、インターバル時間を100msに固定すると、図9の下段に破線で示すように、次回のインターバルにおける総割り当て時間は前回のインターバルと同じく80msとなる。そのため、前回と今回のインターバルを合わせると、80ms+80ms=160msの期間で合計6回のプロセス切替が行われることになり、単位時間当たりのプロセス切替回数は、6/160=0.0375(>0.333)となる。 On the other hand, if the next interval time is not adjusted and the interval time is fixed at 100 ms, the total allocated time for the next interval will be 80 ms, the same as the previous interval, as shown by the broken line in the lower part of FIG. Therefore, combining the previous and current intervals, a total of 6 process switches will be performed in a period of 80ms + 80ms = 160ms, and the number of process switches per unit time is 6/160 = 0.0375 (>0. 333).
上記のように各ワークロードクラスのCPU使用状況に応じて、動的に次回のインターバル時間を調整することにより、単位時間当たりのプロセス切替回数を低減することができる。その結果、プロセス切替のオーバヘッドが削減され、システム全体のスループットが向上する。 By dynamically adjusting the next interval time according to the CPU usage status of each workload class as described above, it is possible to reduce the number of process switching times per unit time. As a result, the overhead of process switching is reduced and the throughput of the entire system is improved.
しかし、次回のインターバル時間がベースインターバル時間より長くなると、各ワークロードクラスがCPUリソースを割り当てられるまでの待ち時間が長くなるため、応答時間が延びてしまうという副作用が生じる。そのため、調整手段123は、図4の判定ルールおよび図5の計算式1に従い、前回の総割り当て時間がベースインターバルより長い場合には、次回のインターバル時間を前回のインターバル時間よりも短い時間に変更することにより、上記副作用を抑えている。
However, if the next interval time is longer than the base interval time, the waiting time until CPU resources are allocated to each workload class becomes longer, resulting in a side effect of longer response time. Therefore, according to the determination rule in FIG. 4 and
また、ワークロードクラス数が増大するほどにインターバル内でのプロセス切替回数が増大するため、プロセス切替によるオーバヘッドが増大する。そのため、調整手段123は、図6の条件式に基づいて、プロセス切替によるオーバヘッドが閾値以上となる場合、次回のインターバル時間を更に長くすることにより、スループットの低下を防止している。
Furthermore, as the number of workload classes increases, the number of process switching within an interval increases, so the overhead due to process switching increases. Therefore, based on the conditional expression in FIG. 6, the
以上の説明では、ディスパッチング情報113は、前回のインターバル時間136および前回の総割り当て時間137を記憶するように構成されていた。しかし、ディスパッチング情報113は、直前の複数回分のインターバル時間および総割り当て時間の履歴を記憶するように構成されていてもよい。また調整手段123は、計算式1の右辺における前回のインターバル時間および前回の総割り当て時間として、ディスパッチング情報113に記憶された直前の複数回分のインターバル時間および総割り当て時間の平均値を使用するようにしてもよい。
In the above description, the dispatching
[第2の実施形態]
図10は、本発明の第2の実施形態に係るCPUリソース管理装置200のブロック図である。図10を参照すると、CPUリソース管理装置200は、記憶装置210と、この記憶装置210に接続された複数のCPU220-0~220-mとから構成されている。
[Second embodiment]
FIG. 10 is a block diagram of a CPU resource management device 200 according to the second embodiment of the present invention. Referring to FIG. 10, the CPU resource management device 200 includes a
記憶装置210は、複数のCPU220-0~220-mで共用されるハードディスクやメモリなどから構成され、CPU220-0~220-mで実行される各種処理に必要な処理情報およびプログラム214-0~214-1を記憶するように構成されている。プログラム214-0~214-1は、CPU220-0~220-mに読み込まれて実行されることにより各種処理部を実現するプログラムであり、図示しない通信インターフェース部などのデータ入出力機能を介して外部装置(図示せず)や記憶媒体(図示せず)から予め読み込まれて記憶装置210に保存される。記憶装置210に記憶される処理情報には、ワークロード定義211、実行可能プロセスキュー212、および、CPU220-1~220-mに1対1に対応するm個のディスパッチング情報213-1~213-mがある。これらは、図1を参照して説明したワークロード定義111、実行可能プロセスキュー112、および、ディスパッチング情報113と同様に構成されている。
The
CPU220-0は、演算処理装置とその周辺回路とから構成され、記憶装置210からプログラム214-0を読み込んで実行することにより、ハードウェアとプログラム214-0とを協働させて各種処理部を実現するように構成されている。CPU220-0で実現される処理部には、初期化手段221と調整手段223とがある。これらは、図1を参照して説明した初期化手段121、調整手段123と同様に構成されている。即ち、初期化手段221は、ワークロード定義211およびディスパッチング情報213-1~213-mを初期化するように構成されている。また調整手段223は、ディスパッチング情報213-1~213-mに記憶された前回のインターバルにおける総割り当て時間およびCPUリソース割り当て打ち切り回数に基づいて次回のインターバル時間およびワークロードクラス毎の最大CPU使用時間を決定してディスパッチング情報213-1~213-mを更新するように構成されている。
The CPU 220-0 is composed of an arithmetic processing unit and its peripheral circuits, and by reading and executing the program 214-0 from the
CPU220-1~220-mは、演算処理装置とその周辺回路とから構成され、記憶装置210~プログラム214-1を読み込んで実行することにより、ハードウェアとプログラム214-1とを協働させて各種処理部を実現するように構成されている。CPU220-1~220-mで実現される処理部には、実行制御手段222-1~222-mがある。これらは、図1を参照して説明した実行制御手段122と同様に構成されている。即ち、実行制御手段222-1~222-mは、対応するディスパッチング情報213-1~213-mに従って、実行可能プロセスキュー112にキューイングされている各ワークロードクラスのプロセスを実行するように構成されている。
The CPUs 220-1 to 220-m are composed of an arithmetic processing unit and its peripheral circuits, and read and execute the
次に、図8を借用して、本実施形態に係るCPUリソース管理装置200の動作について説明する。 Next, referring to FIG. 8, the operation of the CPU resource management device 200 according to this embodiment will be described.
CPUリソース管理装置200は、起動すると、先ず初期化手段221が動作してワークロード定義211および各ディスパッチング情報213-11~213-mの初期化を行う(ステップS1)。次に、各実行制御手段222-1~222-mが、対応するディスパッチング情報213-1~213-mに従って、インターバルを開始し、実行可能プロセスキュー212に格納されたプロセスをCPU220-1~220-m上で実行する制御を行う(ステップS2)。また何れかの実行制御手段222-i(iは1からmの何れか)によってインターバルが終了する毎に、調整手段223は、可及的速やかに、その実行制御手段222-iに対応するディスパッチング情報213-iに記憶された前回のインターバルの状況(前回の総割り当て時間、前回のCPUリソース割り当て打ち切り回数)に基づいて次回のインターバル時間およびワークロードクラス毎の最大CPU使用時間を調整する(ステップS3)。そして再び、実行制御手段222-iは、可及的速やかに、調整後のインターバル時間およびワークロードクラス毎のCPU使用時間が記憶されたディスパッチング情報213-iに基づくインターバルを開始してプロセスの実行制御を行う(ステップS2)。このステップS2、S3のループは、システムの運用が停止されるまで継続して実行される。
When the CPU resource management device 200 is started, the initialization means 221 first operates to initialize the
このように本実施形態に係るCPUリソース管理装置200によれば、第1の実施形態に係るCPUリソース管理装置100と同様の理由により、プロセス切替のオーバヘッドが削減され、システム全体のスループットが向上する。 As described above, according to the CPU resource management device 200 according to the present embodiment, the overhead of process switching is reduced and the throughput of the entire system is improved for the same reason as the CPU resource management device 100 according to the first embodiment. .
また本実施形態に係るCPUリソース管理装置200によれば、複数のCPU22-1~220-mが互いに並行して複数の実行制御手段222-1~222-mを実行するため、単位時間当たりのプロセス実行回数が増大し、システム全体のスループットが向上する。 Further, according to the CPU resource management device 200 according to the present embodiment, since the plurality of CPUs 22-1 to 220-m execute the plurality of execution control means 222-1 to 222-m in parallel with each other, The number of process executions increases and the overall system throughput improves.
以上の説明では、CPU220-0は実行制御手段を備えていないが、CPU220-1~220-m上の実行制御手段と同様な実行制御手段をCPU220-0に備えるようにしてもよい。また以上の説明では、CPU220-1~220-mは調整手段を備えていないが、CPU220-0上の調整手段と同様な調整手段を各CPU220-1~220-mに備え、CPU220-i(iは1からmの何れか)は、そのCPU220-i上の実行制御手段の処理が終了したときに、そのCPU220-i上の調整手段が調整処理を行い、その後にそのCPU220-i上の実行制御手段が次のインターバルを開始するように構成してもよい。 In the above description, the CPU 220-0 is not equipped with an execution control means, but the CPU 220-0 may be equipped with an execution control means similar to the execution control means on the CPUs 220-1 to 220-m. Furthermore, in the above explanation, although the CPUs 220-1 to 220-m are not equipped with adjustment means, each CPU 220-1 to 220-m is equipped with an adjustment means similar to the adjustment means on the CPU 220-0, and the CPU 220-i ( i is any one from 1 to m), when the processing of the execution control means on the CPU 220-i is completed, the adjustment means on the CPU 220-i performs adjustment processing, and then the adjustment means on the CPU 220-i The execution control means may be arranged to start the next interval.
[第3の実施形態]
図11は、本発明の第3の実施形態に係るCPUリソース管理装置300のブロック図である。図11を参照すると、CPUリソース管理装置300は、記憶装置310と、この記憶装置310に接続されたプロセッサ320とから構成されている。
[Third embodiment]
FIG. 11 is a block diagram of a CPU resource management device 300 according to the third embodiment of the present invention. Referring to FIG. 11, the CPU resource management device 300 includes a
記憶装置310は、ワークロード定義311と実行可能プロセスキュー312とディスパッチング情報313とを記憶するように構成されている。ワークロード定義311は、ワークロードクラス毎のCPU使用時間の配分比を表す情報を記憶する。実行可能プロセスキュー312は、何れかのワークロードクラスに属する複数のプロセスを記憶する。ディスパッチング情報313は、ワークロードクラス毎の最大CPU使用時間、ワークロードクラス毎の最大CPU使用時間の和であるインターバル時間、インターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数、インターバルの開始から終了までの時間である総割り当て時間、ベースインターバル時間を記憶する。
プロセッサ320は、1以上のCPUを含んで構成されている。またプロセッサ320は、実行制御手段321と調整手段322とを備えている。
実行制御手段321は、ディスパッチング情報313に従ってインターバルを開始すると、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスが存在しなくなった時点でインターバルを終了するように構成されている。また実行制御手段321は、インターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と、インターバルの開始から終了までの時間である総割り当て時間とをディスパッチング情報313に記憶するように構成されている。
When starting an interval according to the dispatching
調整手段322は、ディスパッチング情報313に記憶された総割り当て時間がベースインターバル時間より短く、且つ、ディスパッチング情報313に記憶されたCPUリソース割り当ての打ち切り回数が1以上の場合、ディスパッチング情報313に記憶されたインターバル時間をより長い時間に変更するように構成されている。また調整手段322は、ディスパッチング情報313に記憶されたワークロードクラス毎の最大CPU使用時間を、上記より長い時間に変更した後のインターバル時間をワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロード毎の最大CPU使用時間に変更するように構成されている。また調整手段は、変更後のディスパッチング情報313に従って実行制御手段321に次回のインターバルを開始させるように構成されている。
When the total allocation time stored in the dispatching
このように構成されたCPUリソース管理装置300は以下のように動作する。即ち、実行制御手段321は、ディスパッチング情報313に従ってインターバルを開始すると、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスが存在しなくなった時点でインターバルを終了する。また実行制御手段321は、インターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と、インターバルの開始から終了までの時間である総割り当て時間とをディスパッチング情報313に記憶する。
The CPU resource management device 300 configured in this manner operates as follows. That is, when the
次に調整手段322は、ディスパッチング情報313に記憶された総割り当て時間がベースインターバル時間より短く、且つ、ディスパッチング情報313に記憶されたCPUリソース割り当ての打ち切り回数が1以上の場合、ディスパッチング情報313に記憶されたインターバル時間をより長い時間に変更する。また調整手段322は、ディスパッチング情報313に記憶されたワークロードクラス毎の最大CPU使用時間を、上記より長い時間に変更した後のインターバル時間をワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロード毎の最大CPU使用時間に変更する。また調整手段は、変更後のディスパッチング情報313に従って実行制御手段321に次回のインターバルを開始させる。
Next, when the total allocation time stored in the dispatching
以上のように構成され動作するCPUリソース管理装置300によれば、コンピュータシステムのスループットを改善することができる。その理由は、前回のインターバルが、最大CPU使用時間のCPUリソースを必要としないワークロードクラスが存在したことによりベースインターバルよりも短時間で終了し、かつ、最大CPU使用時間以上のCPUリソースを必要としたワークロードクラスが存在していた場合、次回のインターバルを前回のインターバルよりも長い時間に変更し、その変更に合わせてワークロードクラス毎の最大CPU使用時間も変更するため、各ワークロードクラスの負荷が前回と同様であれば、次回の総割り当て時間が前回の総割り当て時間よりも長くなり、単位時間当たりのプロセス切替回数が低減し、その結果、プロセス切替のオーバヘッドが削減されるためである。 According to the CPU resource management device 300 configured and operated as described above, the throughput of the computer system can be improved. The reason for this is that the previous interval ended in a shorter time than the base interval due to the existence of a workload class that did not require CPU resources for the maximum CPU usage time, and it also required CPU resources for more than the maximum CPU usage time. If a workload class exists, the next interval will be changed to a longer time than the previous interval, and the maximum CPU usage time for each workload class will also be changed accordingly. If the load of be.
以上、上記各実施形態を参照して本発明を説明したが、本発明は、上述した実施形態に限定されるものではない。本発明の構成や詳細には、本発明の範囲内で当業者が理解しうる様々な変更をすることができる。 Although the present invention has been described above with reference to the embodiments described above, the present invention is not limited to the embodiments described above. The configuration and details of the present invention may be modified in various ways within the scope of the present invention by those skilled in the art.
本発明は、予め決められたCPUリソースの利用割合に従って、各ワークロードで使用するCPUリソースの配分を行うCPUリソース管理といった用途に適用できる。 The present invention can be applied to applications such as CPU resource management, which allocates CPU resources used by each workload according to a predetermined CPU resource utilization ratio.
100…CPUリソース管理装置
110…記憶装置
111…ワークロード定義
112…実行可能プロセスキュー
113…ディスパッチング情報
114…プログラム
120…CPU
121…初期化手段
122…実行制御手段
123…調整手段
131…ベースインターバル時間
132…プロセス切替平均時間
133…閾値
134…次回のインターバル時間
135…次回のワークロードクラス毎の最大CPU使用時間
136…前回のインターバル時間
137…前回の総割り当て時間
138…前回のCPUリソース割り当て打ち切り回数
200…CPUリソース管理装置
210…記憶装置
211…ワークロード定義
212…実行可能プロセスキュー
213-1~213-m…ディスパッチング情報
214-0~214-1…プログラム
220-0~220-m…CPU
221…初期化手段
222-1~222-m…実行制御手段
223…調整手段
300…CPUリソース管理装置
310…記憶装置
311…ワークロード定義
312…実行可能プロセスキュー
313…ディスパッチング情報
320…プロセッサ
321…実行制御手段
322…調整手段
100...CPU
121...Initialization means 122...Execution control means 123...Adjustment means 131...
221...Initialization means 222-1 to 222-m...Execution control means 223...Adjustment means 300...CPU
Claims (9)
前記プロセッサは、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する実行制御手段と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する調整手段と、
を備えるCPUリソース管理装置。 A CPU resource management device comprising a storage device that stores a process, and a processor that executes the process,
The processor includes:
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. Execution control means for recording the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval. and,
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and adjustment means for determining the next maximum CPU usage time for each workload class based on the distribution ratio of CPU usage time for each workload class;
A CPU resource management device comprising:
請求項1に記載のCPUリソース管理装置。 When the total allocation time is longer than the base interval time, the adjustment means determines the next interval time to be shorter than the previous interval time, and adjusts the next interval time and the CPU usage time for each workload class. determining the next maximum CPU usage time for each workload class based on the distribution ratio;
The CPU resource management device according to claim 1.
請求項1または2に記載のCPUリソース管理装置。 The adjustment means calculates the next interval time by multiplying the previous interval time by a ratio of the base interval time to the total allocated time.
The CPU resource management device according to claim 1 or 2.
請求項1または2に記載のCPUリソース管理装置。 The adjustment means calculates a value obtained by multiplying the previous interval time by the ratio of the base interval time to the total allocation time, and calculates the total time taken for process switching due to the termination of the CPU resource allocation with respect to the base interval time. If the ratio exceeds the threshold, the value obtained by multiplying the value by the ratio is further divided by the threshold, and the value is calculated as the next interval time.
The CPU resource management device according to claim 1 or 2.
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録し、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する、
CPUリソース管理方法。 A CPU resource management method executed by a computer including a storage device that stores a process and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. and record the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
CPU resource management method.
請求項5に記載のCPUリソース管理方法。 If the total allocation time is longer than the base interval time, the next interval time is determined to be shorter than the previous interval time, and based on the next interval time and the distribution ratio of CPU usage time for each workload class. to determine the next maximum CPU usage time for each workload class.
The CPU resource management method according to claim 5.
請求項5または6に記載のCPUリソース管理方法。 calculating the next interval time by multiplying the previous interval time by the ratio of the base interval time to the total allocated time;
The CPU resource management method according to claim 5 or 6.
請求項5または6に記載のCPUリソース管理方法。 A value obtained by multiplying the previous interval time by the ratio of the base interval time to the total allocation time is calculated, and the ratio of the total time taken for process switching due to the termination of the CPU resource allocation to the base interval time exceeds a threshold value. If so, calculate the value obtained by multiplying the value by the ratio and further dividing the value by the threshold value as the next interval time.
The CPU resource management method according to claim 5 or 6.
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する処理と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する処理と、
を行わせるためのプログラム。 A computer including a storage device that stores a process, and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. terminating the interval and recording the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
A program to do this.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019222164A JP7355456B2 (en) | 2019-12-09 | 2019-12-09 | CPU resource management device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019222164A JP7355456B2 (en) | 2019-12-09 | 2019-12-09 | CPU resource management device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021092904A JP2021092904A (en) | 2021-06-17 |
JP7355456B2 true JP7355456B2 (en) | 2023-10-03 |
Family
ID=76312421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019222164A Active JP7355456B2 (en) | 2019-12-09 | 2019-12-09 | CPU resource management device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7355456B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025143752A1 (en) * | 2023-12-29 | 2025-07-03 | 삼성전자 주식회사 | Electronic device and secure resource restriction method using same |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008225641A (en) | 2007-03-09 | 2008-09-25 | Nec Corp | Computer system, interrupt control method and program |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6211941A (en) * | 1985-07-10 | 1987-01-20 | Nec Corp | Multiplex processing control system |
JPH04336334A (en) * | 1991-05-13 | 1992-11-24 | Kobe Nippon Denki Software Kk | Time slice value setting system |
JPH05241860A (en) * | 1992-02-26 | 1993-09-21 | Kobe Nippon Denki Software Kk | Time slice optimization system |
JPH08147178A (en) * | 1994-11-24 | 1996-06-07 | Hitachi Ltd | Shared resource access method and shared resource access device |
-
2019
- 2019-12-09 JP JP2019222164A patent/JP7355456B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008225641A (en) | 2007-03-09 | 2008-09-25 | Nec Corp | Computer system, interrupt control method and program |
Also Published As
Publication number | Publication date |
---|---|
JP2021092904A (en) | 2021-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0384635B1 (en) | Adaptive job scheduling for multiprocessing systems | |
US6560628B1 (en) | Apparatus, method, and recording medium for scheduling execution using time slot data | |
US7191446B2 (en) | Method for resource management in a real-time embedded system | |
US6016503A (en) | Methods, systems and computer program products for preemptive avoidance of constraints for shared resources | |
KR101651871B1 (en) | Job Allocation Method on Multi-core System and Apparatus thereof | |
JPH09120389A (en) | Method and device for job scheduling of cluster type computer | |
US20080098395A1 (en) | System and method of expediting certain jobs in a computer processing system | |
US20080235695A1 (en) | Resource allocation system for jobs, resource allocation method and resource allocation program for jobs | |
CN111930516B (en) | Load balancing method and related device | |
US7096471B2 (en) | Apparatus for resource management in a real-time embedded system | |
CN111580949B (en) | Automatic regulating method for network packet receiving mode | |
CN112214299A (en) | Multi-core processor and task scheduling method and device thereof | |
JP7355456B2 (en) | CPU resource management device | |
WO2023165485A1 (en) | Scheduling method and computer system | |
CN107589993A (en) | A kind of dynamic priority scheduling algorithm based on linux real time operating systems | |
CN111143063A (en) | Task resource reservation method and device | |
CN112395063B (en) | Dynamic multithreading scheduling method and system | |
CN111314249B (en) | Method and server for avoiding data packet loss of 5G data forwarding plane | |
JP2022550064A (en) | Shared Resource Allocation in Multithreaded Microprocessors | |
US11275621B2 (en) | Device and method for selecting tasks and/or processor cores to execute processing jobs that run a machine | |
CN110213178B (en) | Traffic management method, integrated chip, and device | |
US20030023660A1 (en) | Real-time embedded resource management system | |
JP2021060923A (en) | Vehicle control device | |
EP1594048A2 (en) | Thread selection unit and method for a multithreaded processor | |
EP1262871A2 (en) | Real-time embedded resource management system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221102 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230711 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230822 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230914 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7355456 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |