JP2013214146A - Virtual computer system, hypervisor, and virtual computer system management method - Google Patents
Virtual computer system, hypervisor, and virtual computer system management method Download PDFInfo
- Publication number
- JP2013214146A JP2013214146A JP2012082866A JP2012082866A JP2013214146A JP 2013214146 A JP2013214146 A JP 2013214146A JP 2012082866 A JP2012082866 A JP 2012082866A JP 2012082866 A JP2012082866 A JP 2012082866A JP 2013214146 A JP2013214146 A JP 2013214146A
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- virtual machine
- hypervisor
- computer system
- time
- 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.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明の実施形態は、仮想計算機システム、ハイパーバイザ及び仮想計算機システムの
管理方法に関する
Embodiments described herein relate generally to a virtual machine system, a hypervisor, and a management method for a virtual machine system.
仮想化環境において、N台(Nは任意の整数)の仮想計算機(以下、仮想マシンといい
、VMと記載する)が、M基(Mは任意の整数)のCPUを共有する仮想計算機システム
がある。仮想計算機システムはハイパーバイザを備え、このハイパーバイザは、ある時刻
において、あるVMがどのCPUをどれだけの時間使用するのかを決定する。すなわちハ
イパーバイザは各VM間でのCPUのタイムシェアリングを行なう。
In a virtual environment, a virtual computer system in which N virtual machines (N is an arbitrary integer) (hereinafter referred to as a virtual machine, referred to as VM) share M CPUs (M is an arbitrary integer). is there. The virtual machine system includes a hypervisor, and this hypervisor determines which CPU a certain VM uses for how long at a certain time. That is, the hypervisor performs CPU time sharing between the VMs.
このとき、各VMは独立しており、ある時刻において必要とするCPUリソースは異な
る。仮想計算機システムにはVM−AとVM−Bが備えられるとし、仮想計算機システム
の運用期間中における所定の期間に注目すると、VM−Aが割り当てられたCPU時間を
全て使い切る一方で、VM−Bは割り当てられたCPU時間を残すという場合がある。こ
の場合、VM−Bに割り当てたCPU時間減らす、もしくはVM−Bに割り当てたCPU
時間減らしVM−Aに再割り当てすれば、CPUのリソースの利用効率が高くなる。
At this time, each VM is independent, and CPU resources required at a certain time are different. It is assumed that the virtual machine system is provided with VM-A and VM-B, and paying attention to a predetermined period during the operation period of the virtual machine system, the CPU time allocated to the VM-A is completely used, while the VM-B May leave the allocated CPU time. In this case, CPU time allocated to VM-B is reduced or CPU allocated to VM-B
If the time is reduced and reassigned to VM-A, the CPU resource utilization efficiency is increased.
仮想化環境には準仮想化と完全仮想化がある。準仮想化環境における仮想計算機システ
ムであれば、VMは、ハイパーバイザを認識しているため、例えばCPU使用率が低い場
合に、あまったCPUリソースをハイパーバイザに返却することが可能である。したがっ
て、準仮想化環境の仮想計算機システムであれば、VM−BがCPU時間を残したとき、
VM−B自らがハイパーバイザにCPU時間の返却をすることができる。これにより返却
されたCPU時間を、ハイパーバイザがVM−Aに割り当てることで、VM−AのCPU
時間を延ばすことができる。
Virtual environments include paravirtualization and full virtualization. In the case of a virtual computer system in a para-virtualized environment, since the VM recognizes the hypervisor, for example, when the CPU usage rate is low, it is possible to return additional CPU resources to the hypervisor. Therefore, in the case of a virtual computer system in a para-virtualized environment, when VM-B leaves CPU time,
The VM-B itself can return the CPU time to the hypervisor. The CPU time of the VM-A is assigned by the hypervisor to the VM-A.
You can extend the time.
しかしながら、準仮想化環境における仮想計算機システムは、VMがハイパーバイザを
認識するために、VM上で動作するオペレーティングシステム(以下、OS)の修正を行
なう必要がある。すなわち、OSの修正なしにシステムを構築できない。
However, the virtual computer system in the para-virtualized environment needs to modify an operating system (hereinafter referred to as OS) operating on the VM in order for the VM to recognize the hypervisor. That is, the system cannot be constructed without correcting the OS.
一方、完全仮想化環境における仮想計算機システムは、OSを修正せずに動作する。こ
の完全仮想化環境の仮想計算機システムは、ハイパーバイザを認識していないため、CP
U時間を残したVM−Bは、ハイパーバイザにCPU時間の返却をすることができない。
したがって、完全仮想化環境の仮想計算機システムにおいては、ハイパーバイザはVMの
CPU使用率を把握できず、効率的なCPUリソースの利用ができないという問題がある
。
On the other hand, a virtual computer system in a fully virtualized environment operates without modifying the OS. This fully virtualized virtual machine system does not recognize the hypervisor, so
The VM-B that has left U time cannot return the CPU time to the hypervisor.
Therefore, in the virtual computer system in a fully virtualized environment, there is a problem that the hypervisor cannot grasp the CPU usage rate of the VM and cannot efficiently use CPU resources.
本発明が解決しようとする課題は、完全仮想化環境における仮想計算機システムのCP
Uリソースを効率的に利用することを可能とする仮想計算機システム及び同システムの管
理方法を提供することである。
The problem to be solved by the present invention is that the CP of a virtual machine system in a fully virtualized environment
It is to provide a virtual machine system and a management method for the system that can efficiently use U resources.
実施形態の仮想計算機システムは、仮想マシンと、仮想マシン上で動作するゲストOS
と、ゲストOSからのHLT命令に基づいて仮想マシンに割り当てられたCPUの使用率
を算出し、算出されたCPUの使用率に基づいて仮想マシンにCPUを割り当てる時間長
を決定するハイパーバイザとを備える。
A virtual machine system according to an embodiment includes a virtual machine and a guest OS that operates on the virtual machine
And a hypervisor that calculates the usage rate of the CPU assigned to the virtual machine based on the HLT command from the guest OS and determines the time length for assigning the CPU to the virtual machine based on the calculated CPU usage rate. Prepare.
以下、実施形態の仮想計算機システムについて図面を参照して説明する。 Hereinafter, a virtual machine system according to an embodiment will be described with reference to the drawings.
(第1の実施形態)
図1乃至図14を参照して本実施形態の仮想計算機システムについて説明する。
(First embodiment)
The virtual machine system of this embodiment will be described with reference to FIGS.
図1は本実施形態の仮想計算機システムの基本構成の一例である。図1に示すように仮
想計算機システム10は、物理サーバ20と、ハイパーバイザ(以下、HVという)30
と、仮想マシン(以下、VMという)40とを備え、例えばパーソナルコンピュータ(以
下、PCという)である。
FIG. 1 shows an example of the basic configuration of the virtual machine system of this embodiment. As shown in FIG. 1, the
And a virtual machine (hereinafter referred to as VM) 40, for example, a personal computer (hereinafter referred to as PC).
仮想計算機システム10は、3層構造で構成され、最下位層の物理サーバ20上に中位
層のHV30と最上位層のVM40が仮想環境を構築して動作する。このときの仮想環境
は、完全仮想化環境であるとする。
The
下位層の物理サーバ20は、物理CPU21を含むさまざまなハードウェアによって構
成される。物理CPU21は、後述する上位層のVM40上のゲストオペレーティングシ
ステム(以下、ゲストOSという)41の処理を実際に実行する。ただし、本実施形態の
仮想計算機システム10は、完全仮想化環境であるため、上位層のVM40は、下位層の
物理サーバ20を認識していない。
The lower-layer
中位層のHV30は、下位層のハードウェアと後述する上位層の各VM40とを制御す
る。すなわち、HV30は、上位層の各VM40上で動作するゲストOS41に対して物
理的なハードウェアを隠蔽し、仮想ハードウェアを提供する。
The
また、HV30は、各VM40の状態をコンテキストとして管理するスケジューリング
機能を備える。HV30を利用する利点としては、単一システム上で複数のゲストOSを
並列に動作させることができるので、a)各ゲストOSの長所を併せ持つシステムを構築
できること、b)物理的なハードウェアの違いを隠蔽できること、c)各ゲストOSの動
作エラーがシステム全体に影響しないこと、等々が挙げられる。
Further, the
上位層には、1つ以上のVM40が存在し、VM40毎にゲストOS41が動作する。本
実施形態では2つのVM40(VM1とVM2)がある。
One or
各VM40は、1基以上の仮想CPU(以下、VCという)42を有する。図1に示すよ
うに、VM1はVC1を、VM2はVC2をそれぞれ有する。各VC42が、HV30に
よって物理CPU21にディスパッチされることにより、各VM40内のゲストOS41
は動作することができる。
Each
Can work.
本実施形態の2台のVC42は、HV30が作成する仮想的なCPUである。本実施形態
においては、VM1はVC1を、また、VM2はVC2を、本物のCPUと認識して使用
するが、実際には使用されるのは物理サーバ20上の物理CPU21である。
The two
この物理CPU21は、仮想化支援機能を提供するCPUである必要がある。仮想化支援
機能を提供するCPUは、ホルト(HALT)命令(以下HLT命令という)等の特定の
命令を受け取ると、例えばVMX rootモードと呼ばれる状態に遷移し、ハイパーバ
イザにコンテキストを切り替え、ハイパーバイザ上で処理を実行後、VMX rootモ
ードを解除し、元のコンテキストに戻る。このハイパーバイザへのコンテキスト切り替え
機能を持ったCPUであれば、CPUの種類は問わない。
The
なお、HLT命令とは、物理CPUを実行状態から停止状態へと変更させる命令であり、
ゲストOS41から発行され、VM40が実行する。
The HLT instruction is an instruction for changing the physical CPU from the execution state to the stop state,
Issued by the
ここで、図2を参照してHV30について詳しく説明する。図2は、HV30の機能構
成の一例を示す図である。
Here, the
図2に示すようにHV30は、仮想マシンHLT命令実行管理部31、スケジューリン
グ部32、タイムシェア長管理部33、仮想マシン統計部34、CPU使用率計算部35
、CPU割り当て時間計算部36、及び記憶装置300を備える。
As shown in FIG. 2, the
The CPU allocation
仮想マシンHLT命令実行管理部31は、VM40が実行したHLT命令を管理するHL
T命令実行管理処理を行う。図3を参照して、仮想マシンHLT命令実行管理部31が実
行するHLT命令実行管理処理について説明する。
The virtual machine HLT instruction
Performs T instruction execution management processing. The HLT instruction execution management process executed by the virtual machine HLT instruction
仮想マシンHLT命令実行管理部31は、VM40がHLT命令を実行すると(ステップ
S311)、HLT命令を実行したVM名と、HLT命令の実行時刻とを対応付けて、記
憶装置300の仮想マシンHLT命令実行管理テーブル301に記録する(ステップS3
12)。図4に、仮想マシンHLT命令実行管理テーブル301の一例を示す。
When the
12). FIG. 4 shows an example of the virtual machine HLT instruction execution management table 301.
仮想マシンHLT命令実行管理部31は、VM40がHLT命令を実行するタイミング
で上述のHLT命令実行管理処理を開始する。HLT命令が実行されるタイミングの一例
は、VM40上で動作するゲストOS41において、実行状態および実行可能状態のプロ
セスが存在せず、待ち状態のプロセスのみになり、VC42をidle状態にする場合な
どがある。なお、待ち状態のプロセスには、I/Oの完了待ちを含む。
The virtual machine HLT instruction
スケジューリング部32は、物理CPU21毎に存在し、管理対象の物理CPU21への
割り当て待ちである全てのVC42から物理CPU21に割り当てるVC42を1つ選択
する。スケジューリング部32は、記憶装置300に記憶されたCPU割り当て時間管理
テーブル305を参照して、選択した物理CPU21にVC42を割り当てるCPU割り
当て処理を行う。初期状態では、物理CPU21にVC42を割り当てるタイムシェア長
はあらかじめ一定の時間長に設定されているとする。CPU割り当て時間管理テーブル3
05及びCPU割り当て処理については後述する。
The
05 and the CPU allocation process will be described later.
選択されたVC42を使用するVM40は、物理CPU21に対するVC42の割り当て
が解除されるまで動作する。なお、管理対象の物理CPU21への割り当て待ちである全
てのVC42の選択は、例えばHV30においてあらかじめ設定されたタイミングで行わ
れる。あらかじめ設定されたタイミングは、例えば物理CPU21に割り当てられていた
VC42が、CPUの割り当て許可時間を使い切った場合などである。
The
タイムシェア長管理部33は、スケジューリング部32が物理CPU21にVC42を割
り当てた場合に、VC42に物理CPU21を割り当てる時間の長さ(以下、タイムシェ
ア長という)を管理するタイムシェア長管理処理を行う。
When the
図5を参照して、本実施形態のタイムシェア長管理処理について説明する。本実施形態の
タイムシェア長管理処理は、例えばスケジューリング部32によって物理CPU21にV
C42が割り当てられた直後に開始される。
With reference to FIG. 5, the time share length management process of this embodiment is demonstrated. The time share length management process of the present embodiment is performed by the
Starts immediately after C42 is assigned.
タイムシェア長管理部33は、スケジューリング部32によって物理CPU21にVC4
2が割り当てられると(ステップS331)、物理CPU21に割り当てられるVC42
に対応するVM名、スケジューリング部32による物理CPU21の割り当て開始時刻、
スケジューリング部32による物理CPU21へのVC42の割り当て終了時刻、及びタ
イムシェア長を記憶装置300のタイムシェア長管理テーブル302に記録する(ステッ
プS332)。図6にタイムシェア長管理テーブル302の一例を示す。
The time share
2 is assigned (step S331), the
, The allocation start time of the
The allocation end time of the
仮想マシン統計部34は、タイムシェア長管理テーブル302を参照して、あらかじめ設
定された一定期間Tm1の間に各VM40がHLT命令を実行した回数を計算し、計算結
果の回数にHLT命令の実行時間を乗じて、HLTしていた合計の長さ(以下、合計HL
T長という)を算出する合計HLT長算出処理を行う。合計HLT長は、割り当てられた
CPUの不使用時間といえる。算出結果の合計HLT長は、仮想マシン統計部34によっ
て仮想マシン統計管理テーブル303に格納される。
The virtual
A total HLT length calculation process for calculating (T length) is performed. The total HLT length can be said to be a non-use time of the allocated CPU. The total HLT length of the calculation result is stored in the virtual machine statistics management table 303 by the virtual
図7を参照して本実施形態の合計HLT長算出処理について説明する。なお、本実施形態
の合計HLT長算出処理は、例えばタイムシェア長管理部33がタイムシェア長管理テー
ブル302を更新した場合に開始される。
The total HLT length calculation process of this embodiment will be described with reference to FIG. The total HLT length calculation process according to the present embodiment is started when the time share
仮想マシン統計部34は、タイムシェア長管理テーブル302を参照して、各VM40に
おける、あらかじめ設定された一定期間Tm1ごとのタイムシェア長を算出する(ステッ
プS341)。
The virtual
このとき、仮想マシン統計部34は、一定周期Tmlの通し番号(例えば1周期目をTm
1−1、2周期目をTm1−2、3周期目をTm1−3と記載する)と、算出結果のタイ
ムシェア長と、算出対象のVM名とを対応付ける。
At this time, the virtual machine
1-1, the second period is described as Tm1-2, and the third period is described as Tm1-3), the time share length of the calculation result, and the VM name to be calculated.
続いて、仮想マシン統計部34は、タイムシェア長管理テーブル302を参照して、一
定期間Tm1の間に各VM40がHLT命令を実行した回数を算出する(ステップS34
2)。仮想マシン統計部34は、ステップS33の計算結果の回数にHLT命令の実行時
間を乗じて、VM40がHLT実行していた合計のながさ(以下、合計HLT長という)
を算出する(ステップS343)。なお、1回のHLT命令における実行時間(以下、H
LT長という)は一定であり、あらかじめ設定されている。
Subsequently, the virtual machine
2). The virtual machine
Is calculated (step S343). The execution time for one HLT instruction (hereinafter referred to as H
(LT length) is constant and preset.
仮想マシン統計部34は、上述した一定周期Tmlの通し番号と、合計HLT長の算出
対象のVM名と、ステップS341における算出結果であるタイムシェア長と、ステップ
S343における算出結果である合計HLT長とを対応付けて、仮想マシン統計管理テー
ブル303に格納する。図8に仮想マシン統計管理テーブル303の一例を示す。
The virtual
CPU使用率計算部35は、仮想マシン統計管理テーブル303を参照してCPU使用率
を計算するCPU使用率計算処理を行う。図9を参照して、本実施形態のCPU使用率計
算処理について説明する。なお、本実施形態のCPU使用率計算処理は、仮想マシン統計
管理テーブル303が更新された場合に開始される。
The CPU usage
CPU使用率計算部35は、仮想マシン統計管理テーブル303から、CPU使用率を算
出するVM40を順番に選択し、選択したVM40に関する、一定期間Tm1における合
計HLT長と、タイムシェア長とを取得する(ステップS351)。CPU使用率計算部
35は、取得した合計HLT長と、タイムシェア長に基づいて後述する計算式(1)を用
いて、一定周期TmlにおけるCPU使用率を算出する(ステップS352)。
The CPU usage
CPU使用率[%]
={1−(合計HLT長[ms]/タイムシェア長[ms])}×100 ・・
・(1)
CPU使用率計算部35は、一定周期Tmlの通し番号、タイムシェア長、合計HLT
長、及び、算出したCPU使用率を対応付けてCPU使用率管理テーブル304に格納す
る(ステップS353)。図10に、CPU使用率管理テーブル304の一例を示す。C
PU使用率管理テーブル304はVMの台数分存在し、図10のCPU使用率管理テーブ
ル304はVM1に関する。
CPU usage [%]
= {1- (total HLT length [ms] / time share length [ms])} × 100
・ (1)
The CPU usage
The length and the calculated CPU usage rate are associated with each other and stored in the CPU usage rate management table 304 (step S353). FIG. 10 shows an example of the CPU usage rate management table 304. C
The PU usage rate management table 304 exists for the number of VMs, and the CPU usage rate management table 304 in FIG. 10 relates to VM1.
CPU割り当て時間計算部36は、CPU使用率管理テーブル304に格納された各VM
40のCPU使用率に基づいて、後述するCPU割り当て処理において、スケジューリン
グ部32が物理CPU21にVC42を割り当てるタイムシェア長をどのくらい補正する
かを示す補正値を算出する。具体的には、CPU割り当て時間計算部36は、後述する計
算式(2)を用いて、CPUを割り当てるタイムシェア長を補正する比率(以下、補正比
率という)を算出する。
The CPU allocation
Based on the CPU usage rate of 40, a correction value indicating how much the
以下に、補正比率を算出する計算式(2)の一例を示す。なお、CにはCPU使用率[%
]が代入される
補正比率[%]
=0.0001×C3−0.0175×C2+0.9838×C+20.046・・・
(2)
図11に計算式(2)のグラフを示す。計算式(2)は、CPU使用率が50%以上の
ときは正の補正比率、50%未満のときは負の補正比率となるような式である。また、C
PU使用率に応じて補正比率は−20(最小値)〜20%(最大値)で変化し、CPU使
用率が100%に近いほど補正比率は最大値に近づき、0%に近いほど最小値に近づく。
この最大/最小値は管理者が任意の大きさを指定できる。。
An example of calculation formula (2) for calculating the correction ratio is shown below. Note that C uses CPU usage [%
] Is substituted for [%]
= 0.0001 × C 3 −0.0175 × C 2 + 0.9838 × C + 20.046.
(2)
FIG. 11 shows a graph of the calculation formula (2). The calculation formula (2) is a formula that gives a positive correction ratio when the CPU usage rate is 50% or more, and a negative correction ratio when the CPU usage rate is less than 50%. C
The correction ratio varies from -20 (minimum value) to 20% (maximum value) according to the PU usage rate. The closer the CPU usage rate is to 100%, the closer the correction rate is to the maximum value, and the closer to 0%, the minimum value. Get closer to.
This maximum / minimum value can be arbitrarily set by the administrator. .
補正比率を算出する計算式は、上記の計算式(2)以外でもよい。例えば、以下の条件
1〜3を全て満たす関数であればよい。
The calculation formula for calculating the correction ratio may be other than the above calculation formula (2). For example, any function that satisfies all the following
条件1:横軸の最小値で縦軸の最小値と一致
条件2:横軸の最大値で縦軸の最大値と一致
また、CPU割り当て時間計算部36は、算出した補正比率に基づいて累計の補正比率を
算出する。累計の補正比率は、VM40の起動時に100%であり、補正比率の値を一定
期間Tm1ごとに加算することにより、算出される。
Condition 1: Minimum value on the horizontal axis matches the minimum value on the vertical axis Condition 2: Maximum value on the horizontal axis matches the maximum value on the vertical axis
Further, the CPU allocation
累計補正比率は上限及び下限を持つ。例えば、上限が180%、下限が20%とする。こ
の場合、VM1の累計補正比率が21%のときに、算出された補正比率が−20%であっ
ても、次の累計補正比率は1%ではなく20%となる。これにより、各VM40は、最低
限動作するためのCPU割り当てを確保することができる。この上限及び下限は管理者が
任意で設定してかまわない。なお、累計補正比率の上限を100%にすることで、CPU
使用率が高いVM40のCPU割り当て時間を伸ばさないことが可能となる。これにより
、所定のVM40のCPU割り当て時間が、本来の割り当て時間よりも延びてしまうこと
が無くなる。
The cumulative correction ratio has an upper limit and a lower limit. For example, the upper limit is 180% and the lower limit is 20%. In this case, when the cumulative correction ratio of VM1 is 21%, even if the calculated correction ratio is −20%, the next cumulative correction ratio is 20% instead of 1%. As a result, each
It becomes possible not to extend the CPU allocation time of the
CPU割り当て時間計算部36は、一定周期Tmlの通し番号、タイムシェア長、CPU
使用率、補正比率、及び累計の補正比率をCPU割り当て時間管理テーブル305に記録
する。図12にCPU割り当て時間管理テーブル305の一例を示す。
The CPU allocation
The usage rate, the correction rate, and the cumulative correction rate are recorded in the CPU allocation time management table 305. FIG. 12 shows an example of the CPU allocation time management table 305.
ここで、図13を参照して、スケジューリング部32が、CPU割り当て時間管理テーブ
ル305を参照して、物理CPU21に割り当てるVC42を選択するCPU割り当て処
理について説明する。図13は本実施形態のCPU割り当て処理の一例を示すフローチャ
ートである。なお、CPU割り当て処理は、例えばスケジューリング部32が割り当てた
タイムシェア長を割り当て対象のVC42が使い切った場合に開始される。
Here, with reference to FIG. 13, CPU allocation processing in which the
スケジューリング部32は、物理CPU21に割り当てられるVC42を選択すると(
ステップS321)、当該VC42を有するVM40の累計補正比率、CPU割り当て時
間管理テーブル305から取得する(ステップS322)。
When the
In step S321), the cumulative correction ratio of the
スケジューリング部32は、VC42のタイムシェア長に、取得した累計補正比率を乗
じ、補正タイムシェア長を算出する(ステップS323)。図14に算出結果の補正タイ
ムシェア長の一例を示す。
The
算出結果の補正タイムシェア長の間、スケジューリング部32は、ステップS321で
選択した物理CPU21にVC42を割り当てる(ステップS324)。
During the corrected time share length of the calculation result, the
上述のように、本実施形態の仮想計算機システムは、仮想マシン上で動作するゲストO
SからのHLT命令に基づいてハイパーバイザがCPU使用率を算出し、算出された使用
率に基づいて次のスケジューリングにおけるCPU割り当て時間の補正を行う。したがっ
て、ゲストOSからハイパーバイザに利用状況を通知できない完全仮想化環境であっても
CPUを効率的に利用することが可能である。
As described above, the virtual machine system of this embodiment is a guest O that operates on a virtual machine.
The hypervisor calculates the CPU usage rate based on the HLT instruction from S, and corrects the CPU allocation time in the next scheduling based on the calculated usage rate. Therefore, the CPU can be used efficiently even in a fully virtualized environment in which the usage status cannot be notified from the guest OS to the hypervisor.
また、本実施形態の仮想計算機システムは、HLT命令の実行回数と、CPUを割り当
てる時間を基にCPU使用率を求めて、その値に応じて次のスケジューリングにおけるC
PU割り当て時間の補正を行うことにより、CPUをあまり使用していない仮想マシンの
CPU使用時間を、CPUを必要とする仮想マシンに分け与えることができる。すなわち
、CPUリソースの効率的な利用が可能となる。
In addition, the virtual machine system according to the present embodiment obtains the CPU usage rate based on the number of execution times of the HLT instruction and the time for allocating the CPU, and the C in the next scheduling according to the value.
By correcting the PU allocation time, it is possible to share the CPU usage time of the virtual machine that does not use the CPU much to the virtual machine that requires the CPU. That is, the CPU resource can be efficiently used.
以上、本発明の実施形態を説明したが、この実施形態は例として提示したものであり、
発明の範囲を限定することは意図していない。この新規な実施形態は、その他の様々な形
態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換
え、変更を行うことができる。この実施形態やその変形は、発明の範囲や要旨に含まれる
とともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。
As mentioned above, although embodiment of this invention was described, this embodiment is shown as an example,
It is not intended to limit the scope of the invention. The novel embodiment can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. This embodiment and its modifications are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
例えば、本実施形態では、仮想マシンが2台の場合を例に説明したが、仮想マシンは何台
であってもかまわない。この場合の利用例として、例えば以下のようなケースが考えられ
る。
For example, in the present embodiment, the case where there are two virtual machines has been described as an example, but any number of virtual machines may be used. As a usage example in this case, for example, the following cases can be considered.
例えば、3台以上の仮想マシンが、それぞれ1基の仮想CPUを使用し、1基の物理C
PUを共有する場合で、全ての仮想マシンのCPU使用率が常に100%の場合のケース
である。この場合、CPU割り当て処理のたびに補正比率が+20%であるから、累計補
正比率は最大の180%になるが、それ以上割り当てが増加することは無いので、特定の
仮想CPUが物理CPUを占有することは無い。
For example, three or more virtual machines each use one virtual CPU and one physical C
This is a case where the CPU usage rate of all virtual machines is always 100% when the PU is shared. In this case, since the correction ratio is + 20% for each CPU allocation process, the cumulative correction ratio is 180%, which is the maximum, but since the allocation does not increase any more, a specific virtual CPU occupies the physical CPU. There is nothing to do.
また、本実施形態では、物理CPUが1基の場合を例に説明したが、物理CPUは何基あ
ってもかまわない。各物理CPU上で、本実施形態の各処理が独立して動作する。
In this embodiment, the case where there is one physical CPU has been described as an example, but any number of physical CPUs may be used. Each process of this embodiment operates independently on each physical CPU.
具体的には、図15に示すような物理CPU(以下、PCPUと記載する)21が4基(
PCPU1〜PCPU4)、仮想CPUが8基(VC1−1〜VC2−4)備えられた仮
想計算機システム100においてPCPU1に、今までVC1−1の仮想CPUが割り当
てられていて、その割り当てが解除されたとすると、次のVC42の割り当ては、PCP
Uに割り当てられていないVC42から、スケジューラのアルゴリズムにしたがって選択
される。PCPU21に割り当てられていないVC42は、VC1−1、VC1−3、V
C1−4、VC2−2、VC2−3である。そのときに行われる本実施形態のフローは、
物理CPUが1基のときと同様なものである。
Specifically, four physical CPUs (hereinafter referred to as PCPUs) 21 as shown in FIG.
PCPU1 to PCPU4), in the
The
C1-4, VC2-2, and VC2-3. The flow of this embodiment performed at that time is as follows:
This is the same as when there is one physical CPU.
10…仮想計算機システム、20…物理サーバ、21…物理CPU、30…ハイパーバイ
ザ、31…仮想マシンHLT命令実行管理部、32…スケジューリング部、33…タイム
シェア長管理部、34…仮想マシン統計部、35…CPU使用率計算部、36…CPU割
り当て時間計算部、40…仮想マシン、41…ゲストOS、42…仮想CPU、300…
記憶装置
DESCRIPTION OF
Storage device
Claims (5)
シン上で動作するOSを備える仮想計算機システムであって、
前記ハイパーバイザは、前記OSからのHLT命令に基づいて前記仮想マシンを割り当て
られたCPUの使用率を算出し、算出された前記CPUの使用率に基づいて前記仮想マシ
ンに前記CPUを割り当てる時間長を決定する仮想計算機システム。 A virtual computer system comprising a hypervisor, a virtual machine controlled by the hypervisor, and an OS operating on the virtual machine,
The hypervisor calculates a usage rate of a CPU to which the virtual machine is allocated based on an HLT instruction from the OS, and allocates the CPU to the virtual machine based on the calculated usage rate of the CPU. Determine the virtual machine system.
CPUの使用率を算出する請求項1に記載の仮想計算機システム。 The virtual computer system according to claim 1, wherein the hypervisor calculates the usage rate of the CPU based on the number of HLT instructions from the OS per predetermined time.
間とに基づいて、前記仮想マシンに割り当てられたCPUの使用率を算出する請求項1及
び請求項2のいずれか1項に記載の仮想計算機システム。 The said hypervisor calculates the usage rate of CPU allocated to the said virtual machine based on the said HLT instruction | indication and the time which allocated the said virtual machine to the said CPU. The virtual computer system described in 1.
前記仮想マシン上で動作するOSからのHLT命令に基づいて前記仮想マシンに割り当
てられたCPUの使用率を算出し、算出された前記CPUの使用率に基づいて前記仮想マ
シン前記CPUを割り当てる時間長を決定するハイパーバイザ。 A hypervisor that controls a virtual machine provided in a virtual machine system,
A time length for calculating the CPU usage rate allocated to the virtual machine based on an HLT instruction from an OS operating on the virtual machine and allocating the CPU to the virtual machine based on the calculated CPU usage rate Determine the hypervisor.
シン上で動作するOSを備える仮想計算機システムの管理方法であって、
前記OSからのHLT命令に基づいて前記仮想マシンに割り当てられたCPUの使用率を
算出するステップと、
算出された前記CPUの使用率に基づいて前記仮想マシンに前記CPUを割り当てる時
間長を決定するステップと、を備える仮想計算機システムの管理方法。 A management method of a virtual machine system comprising a hypervisor, a virtual machine controlled by the hypervisor, and an OS operating on the virtual machine,
Calculating a usage rate of a CPU allocated to the virtual machine based on an HLT instruction from the OS;
Determining a time length for allocating the CPU to the virtual machine based on the calculated usage rate of the CPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012082866A JP2013214146A (en) | 2012-03-30 | 2012-03-30 | Virtual computer system, hypervisor, and virtual computer system management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012082866A JP2013214146A (en) | 2012-03-30 | 2012-03-30 | Virtual computer system, hypervisor, and virtual computer system management method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013214146A true JP2013214146A (en) | 2013-10-17 |
Family
ID=49587439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012082866A Pending JP2013214146A (en) | 2012-03-30 | 2012-03-30 | Virtual computer system, hypervisor, and virtual computer system management method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013214146A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE112020001632T5 (en) | 2019-05-10 | 2022-01-13 | Hitachi Astemo, Ltd. | HYPERVISOR AND CONTROL DEVICE |
CN114579302A (en) * | 2022-02-23 | 2022-06-03 | 阿里巴巴(中国)有限公司 | Resource scheduling method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002202959A (en) * | 2000-12-28 | 2002-07-19 | Hitachi Ltd | Virtual computer system for performing dynamic resource distribution |
JP2010218151A (en) * | 2009-03-16 | 2010-09-30 | Toshiba Corp | Virtual computer management mechanism and cpu time allocation control method in virtual computer system |
JP2011186793A (en) * | 2010-03-09 | 2011-09-22 | Hitachi Ltd | Hypervisor, computer system, and virtual processor scheduling method |
-
2012
- 2012-03-30 JP JP2012082866A patent/JP2013214146A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002202959A (en) * | 2000-12-28 | 2002-07-19 | Hitachi Ltd | Virtual computer system for performing dynamic resource distribution |
JP2010218151A (en) * | 2009-03-16 | 2010-09-30 | Toshiba Corp | Virtual computer management mechanism and cpu time allocation control method in virtual computer system |
JP2011186793A (en) * | 2010-03-09 | 2011-09-22 | Hitachi Ltd | Hypervisor, computer system, and virtual processor scheduling method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE112020001632T5 (en) | 2019-05-10 | 2022-01-13 | Hitachi Astemo, Ltd. | HYPERVISOR AND CONTROL DEVICE |
CN114579302A (en) * | 2022-02-23 | 2022-06-03 | 阿里巴巴(中国)有限公司 | Resource scheduling method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6646114B2 (en) | Dynamic virtual machine sizing | |
Song et al. | Multi-tiered on-demand resource scheduling for VM-based data center | |
TWI748530B (en) | Resource management method and apparatus, electronic device, and storage medium | |
US20160196157A1 (en) | Information processing system, management device, and method of controlling information processing system | |
JP4705051B2 (en) | Computer system | |
Quang-Hung et al. | EPOBF: energy efficient allocation of virtual machines in high performance computing cloud | |
JP5354108B2 (en) | Information processing program, information processing apparatus, and information processing method | |
EP3036625A1 (en) | Virtual hadoop manager | |
JP2007272263A (en) | Method for managing computer, computer system, and management program | |
CN106844007A (en) | A kind of virtual method and system based on spatial reuse | |
US20120317331A1 (en) | Using cooperative greedy ballooning to reduce second level paging activity | |
JP5624084B2 (en) | Computer, virtualization mechanism, and scheduling method | |
Banerjee et al. | Memory overcommitment in the ESX server | |
CN103514038A (en) | Method and system for smoothly shutting down virtual system | |
JP2011198027A (en) | Virtual machine system and virtual machine management method | |
JP5178778B2 (en) | Virtual machine and CPU allocation method | |
JP2016115065A (en) | Information processor, information processing system, task processing method, and program | |
JP5640844B2 (en) | Virtual computer control program, computer, and virtual computer control method | |
Baresi et al. | Towards vertically scalable spark applications | |
KR20150090439A (en) | Method for scheduling a task in hypervisor for many-core systems | |
JP2013214146A (en) | Virtual computer system, hypervisor, and virtual computer system management method | |
JP6239400B2 (en) | Control device | |
JP4409568B2 (en) | Band control program and multiprocessor system | |
JP2010205208A (en) | Host computer, multipath system, and method and program for allocating path | |
Shelar et al. | Autonomic and energy-aware resource allocation for efficient management of cloud data centre |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130820 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20131220 |