JP6939327B2 - Programs and information processing equipment - Google Patents
Programs and information processing equipment Download PDFInfo
- Publication number
- JP6939327B2 JP6939327B2 JP2017183854A JP2017183854A JP6939327B2 JP 6939327 B2 JP6939327 B2 JP 6939327B2 JP 2017183854 A JP2017183854 A JP 2017183854A JP 2017183854 A JP2017183854 A JP 2017183854A JP 6939327 B2 JP6939327 B2 JP 6939327B2
- Authority
- JP
- Japan
- Prior art keywords
- service
- transfer
- instance
- usage rate
- resource
- 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
Images
Description
本発明は、プログラム及び情報処理装置に関する。 The present invention relates to a program and an information processing device.
特許文献1には、複数のサーバ間における仮想マシンの負荷情報に基づいて移行元サーバと移行対象仮想マシン、移行先サーバを決定し、動的移行の準備が完了した後の移行元サーバ及び移行先サーバの負荷情報に基づいて動的移行の実行の可否を決定する技術が開示されている。
In
クラウドサービスでは、ユーザが利用する各種サービス(画像処理サービス等)を複数個同時に実行可能なインスタンスと呼ばれる仮想マシンが提供され、利用中のインスタンスの数に応じて課金されることがある。例えばサービスの実行主体であるインスタンスを固定している場合、実行中のサービスが1つでも残っているとそのサービスを終了させない限りインスタンスの利用も終了することができないから、インスタンスの数を減らすことができない。
そこで、本発明は、サービスの実行主体を固定する場合に比べて、サービスを実行する仮想マシンを少なくすることを目的とする。
In the cloud service, a virtual machine called an instance that can execute a plurality of various services (image processing service, etc.) used by the user at the same time is provided, and may be charged according to the number of instances in use. For example, if the instance that is the execution subject of the service is fixed, if even one service that is running remains, the use of the instance cannot be terminated unless the service is terminated, so reduce the number of instances. I can't.
Therefore, an object of the present invention is to reduce the number of virtual machines that execute a service as compared with the case where the execution subject of the service is fixed.
本発明の請求項1に係るプログラムは、コンピュータを、各々が自身に割り当てられた第1リソースを用いて複数のサービスを実行する複数の仮想マシンから、1以上のサービスを実行可能な空きリソースを有する第1仮想マシンを検出する検出部と、検出された前記第1仮想マシンのリソース使用率が、前記複数の仮想マシンのうち前記空きリソースで実行可能なサービスを実行中の第2仮想マシンのリソース使用率から定まる閾値以上である場合、前記第1仮想マシンを当該サービスの移転先として決定する決定部として機能させることを特徴とする。
The program according to
本発明の請求項2に係るプログラムは、請求項1に記載の構成において、前記決定部は、サービスの移転元の候補となる前記第2仮想マシンが複数ある場合、当該サービスの移転後に前記リソース使用率が他の前記移転元の候補よりも小さくなる前記第2仮想マシンを移転元とするサービスの移転先を決定することを特徴とする。
In the configuration according to
本発明の請求項3に係るプログラムは、請求項1又は2に記載の構成において、前記決定部は、移転可能なサービスが複数ある場合、実行中の処理が他のサービスに比べて早く終わるサービスの移転先を決定することを特徴とする。
In the configuration according to
本発明の請求項4に係るプログラムは、請求項1から3のいずれか1項に記載の構成において、前記決定部は、前記空きリソースで実行可能なサービスが前記第2仮想マシンとは別の仮想マシンを用いて冗長化されている場合、当該サービスについては前記移転先を決定しないことを特徴とする。
In the configuration according to any one of
本発明の請求項5に係るプログラムは、請求項1から4のいずれか1項に記載の構成において、前記コンピュータを、実行中の1以上のサービスに割り当てられた第2リソースの前記第1リソースに対する第1割合を前記リソース使用率として前記複数の仮想マシンのそれぞれについて算出する第1算出部と、他の仮想マシンに移転予定のサービスを除いた前記実行中のサービスに割り当てられた第3リソースの前記第1リソースに対する第2割合を前記リソース使用率として前記複数の仮想マシンのそれぞれについて算出する第2算出部として機能させ、前記決定部は、前記第2仮想マシンの前記第2割合から定まる閾値以上の前記第2割合が算出された前記第1仮想マシンを前記空きリソースで実行可能なサービスの移転先として決定することを特徴とする。
The program according to claim 5 of the present invention has the configuration according to any one of
本発明の請求項6に係るプログラムは、請求項5に記載の構成において、前記決定部は、サービスの移転元の候補となる前記第2仮想マシンが複数ある場合、当該サービスの移転後に前記第2割合が他の前記移転元の候補よりも小さくなる前記第2仮想マシンで実行されているサービスの前記移転先を決定することを特徴とする。 In the configuration according to claim 5, the program according to claim 6 of the present invention has the determination unit, in the case where there are a plurality of the second virtual machines that are candidates for the transfer source of the service, the first after the transfer of the service. It is characterized in that the transfer destination of the service running in the second virtual machine whose ratio is smaller than the other candidates of the transfer source is determined.
本発明の請求項7に係るプログラムは、請求項5又は6に記載の構成において、前記決定部は、移転先の候補の前記第1仮想マシンが複数ある場合、前記空きリソースにサービスが移転した後の前記第2割合が他の前記移転先の候補よりも大きい前記第1仮想マシンを前記移転先として決定することを特徴とする。 In the program according to claim 7 of the present invention, in the configuration according to claim 5 or 6, the determination unit transfers the service to the free resource when there are a plurality of the first virtual machines as candidates for the transfer destination. It is characterized in that the first virtual machine having a later second ratio larger than that of other candidates for the relocation destination is determined as the relocation destination.
本発明の請求項8に係るプログラムは、請求項1から7のいずれか1項に記載の構成において、前記コンピュータを、前記複数の仮想マシンにおけるサービスの移転履歴を記憶する記憶部として機能させ、前記決定部は、記憶された前記移転履歴に基づいて前記閾値を変化させることを特徴とする。
The program according to claim 8 of the present invention causes the computer to function as a storage unit for storing the transfer history of services in the plurality of virtual machines in the configuration according to any one of
本発明の請求項9に係るプログラムは、請求項8に記載の構成において、前記決定部は、記憶された前記第1仮想マシンの移転履歴が示す移転の頻度又は移転の回数が少ないほど前記閾値を小さくすることを特徴とする。 In the program according to claim 9 of the present invention, in the configuration according to claim 8, the determination unit determines the threshold value as the frequency of transfer or the number of transfers indicated by the stored transfer history of the first virtual machine decreases. It is characterized by making the size smaller.
本発明の請求項10に係るプログラムは、請求項8に記載の構成において、前記決定部は、記憶された前記第1仮想マシンの移転履歴が示す最新の移転時期が古いほど前記閾値を小さくすることを特徴とする。
In the configuration according to claim 8, the program according to
本発明の請求項11に係るプログラムは、請求項1から10のいずれか1項に記載の構成において、前記決定部は、複数の方法のいずれかを用いて前記移転先を決定し、前記複数の方法のうち、決定した前記移転先にサービスを移転させたことで前記第2仮想マシンが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いることを特徴とする。
In the configuration according to any one of
本発明の請求項12に係るプログラムは、請求項1から11のいずれか1項に記載の構成において、前記決定部は、前記空きリソースで実行可能なサービスが実行していた処理が終了したときに前記第1仮想マシンの前記リソース使用率が前記閾値未満になっていた場合、他の仮想マシンを当該サービスの移転先として決定することを特徴とする。
In the configuration according to any one of
本発明の請求項13に係るプログラムは、請求項1から12のいずれか1項に記載の構成において、前記コンピュータを、前記複数の仮想マシンにおけるサービスの移転履歴を記憶する記憶部と、記憶された前記移転履歴を出力する履歴出力部として機能させることを特徴とする。
The program according to
本発明の請求項14に係るプログラムは、請求項1から13のいずれか1項に記載の構成において、前記コンピュータを、前記複数の仮想マシンにおけるサービスの実行状態を示す情報を出力する状態出力部として機能させることを特徴とする。
The program according to
本発明の請求項15に係る情報処理装置は、各々が自身に割り当てられた第1リソースを用いて複数のサービスを実行する複数の仮想マシンから、1以上のサービスを実行可能な空きリソースを有する第1仮想マシンを検出する検出部と、検出された前記第1仮想マシンのリソース使用率が、前記複数の仮想マシンのうち前記空きリソースで実行可能なサービスを実行中の第2仮想マシンのリソース使用率から定まる閾値以上である場合、前記第1仮想マシンを当該サービスの移転先として決定する決定部とを備えることを特徴とする。
The information processing device according to
請求項1、5、15に係る発明によれば、サービスの実行主体を固定する場合に比べて、サービスを実行する仮想マシンを少なくすることができる。
請求項2、6に係る発明によれば、他の仮想マシンを移転元にする場合に比べて、リソースの空きを特定の仮想マシンに偏らせることができる。
請求項3に係る発明によれば、処理の終了時期に関係なくサービスを移転させる場合に比べて、サービスの移転時期を早めることができる。
請求項4に係る発明によれば、冗長化されたサービスの移転先を決定する場合に比べて、そのサービスの復旧ミスを減らすことができる。
請求項7に係る発明によれば、他の仮想マシンを移転先にする場合に比べて、特定の仮想マシンにサービスを偏らせることができる。
請求項8に係る発明によれば、閾値が固定である場合に比べて移転したサービスが移転先に定着しやすいようにすることができる。
請求項9に係る発明によれば、移転の頻度又は回数が多い仮想マシンを移転先にする場合に比べて移転したサービスが移転先に定着しやすいようにすることができる。
請求項10に係る発明によれば、最新の移転時期が新しい仮想マシンを移転先にする場合に比べて移転したサービスが移転先に定着しやすいようにすることができる。
請求項11に係る発明によれば、移転先の決定方法を固定する場合に比べて、サービスを実行する仮想マシンを少なくすることができる。
請求項12に係る発明によれば、移転先を見直さない場合に比べて、移転先として適当でなくなったインスタンスへのサービスの移転を抑制することができる。
請求項13に係る発明によれば、各仮想マシンにおける過去の移転の経緯を把握することができる。
請求項14に係る発明によれば、サービスの実行状態から移転状況を把握することができる。
According to the inventions according to
According to the inventions of
According to the invention of claim 3, the transfer time of the service can be advanced as compared with the case where the service is transferred regardless of the end time of the processing.
According to the invention of claim 4, it is possible to reduce the recovery error of the service as compared with the case of determining the transfer destination of the redundant service.
According to the invention of claim 7, the service can be biased to a specific virtual machine as compared with the case where another virtual machine is used as the transfer destination.
According to the invention of claim 8, it is possible to make it easier for the transferred service to settle in the transfer destination as compared with the case where the threshold value is fixed.
According to the invention of claim 9, it is possible to make it easier for the transferred service to settle in the transfer destination as compared with the case where the virtual machine having a high frequency or frequency of transfer is set as the transfer destination.
According to the invention of
According to the invention of
According to the invention of
According to the invention of
According to the invention of
[1]実施例
図1は実施例に係るリソース提供システム1の全体構成を表す。リソース提供システム1は、処理(情報処理)の実行に用いられるリソースをユーザに使用させるリソース提供サービスを実施するためのシステムである。ここでいうリソースには、CPU(Central Processing Unit)、メモリ、ストレージ、それらを備える物理的な装置及びそれらによって実現される仮想的な装置(いわゆる仮想マシン)等がある。
[1] Example FIG. 1 shows the overall configuration of the
また、リソース提供システム1においては、ユーザが利用する各種サービス(OCR(Optical Character Recognition)サービス及び文章を翻訳する翻訳サービス等)を複数個同時に実行可能なインスタンスと呼ばれる仮想マシンがリソースとして提供される。本実施例では、ユーザに対しては、利用中のインスタンスの数に応じた課金が行われるものとする。
Further, in the
リソース提供システム1は、通信回線2と、ユーザ端末3と、クラウドシステム4と、リソース管理装置20とを備える。通信回線2は、例えばインターネット、移動体通信網及び電話回線等を含み、自回線に接続されている装置同士の通信を仲介する。通信回線2には、ユーザ端末3及びクラウドシステム4が接続されている。
The
ユーザ端末3は、前述したリソース提供サービスを利用するユーザが使用する端末である。ユーザには、例えば、企業の業務としてリソース提供サービスを利用する者と、個人的な活動(例えばオンラインゲームのプレイ等)でリソース提供サービスを利用する者とが含まれる。なお、図1ではユーザ端末3が1台しか表されていないが、通常は複数のユーザ端末3が使用されているものとする。 The user terminal 3 is a terminal used by a user who uses the resource providing service described above. The user includes, for example, a person who uses the resource providing service as a business of a company and a person who uses the resource providing service for personal activities (for example, playing an online game). Although only one user terminal 3 is shown in FIG. 1, it is assumed that a plurality of user terminals 3 are normally used.
ユーザ端末3は、ユーザの操作により前述したサービスの実行をクラウドシステム4に対して要求し、要求したサービスの実行結果を受け取って例えばその実行結果に応じた画面を表示する。クラウドシステム4によるサービスの実行とは、各サービスに対応した1以上の処理(OCRサービスなら文字領域抽出処理、文字の切り出し処理及び文字の認識処理等)を実行することを意味する。 The user terminal 3 requests the cloud system 4 to execute the service described above by the user's operation, receives the execution result of the requested service, and displays, for example, a screen corresponding to the execution result. Execution of a service by the cloud system 4 means executing one or more processes corresponding to each service (in the case of an OCR service, a character area extraction process, a character cutout process, a character recognition process, etc.).
クラウドシステム4は、処理を実行するリソースである複数のサーバ装置10を備え、それらのリソースを用いてユーザ端末3から要求されたサービスを実行する。各サーバ装置10は、前述したインスタンスを実現する。リソース管理装置20は、リソース提供システム1の管理者がリソースの稼働状況を管理するための装置であり、本実施例では、各インスタンスでのサービスの実行状況及びその履歴等を表示する。
The cloud system 4 includes a plurality of
図2はサーバ装置10のハードウェア構成を表す。サーバ装置10は、CPU11と、RAM(Random Access Memory)12と、ROM(Read Only Memory)13と、通信部14と、ストレージ15とを備えるコンピュータである。CPU11は、メモリであるRAM12をワークエリアとして用いてROM13やストレージ15に記憶されているプログラムを実行することで各部の動作を制御する。通信部14は、通信回路等を有し、通信回線2を介して外部装置と通信を行う。ストレージ15は、HDD(Hard Disk Drive)やSSD(Solid State Drive)、フラッシュメモリなどの記憶手段であり、CPU11が制御に用いるデータやプログラムを記憶している。
FIG. 2 shows the hardware configuration of the
図3はリソース管理装置20のハードウェア構成を表す。リソース管理装置20は、CPU21と、RAM22と、ROM23と、通信部24と、ストレージ25と、UI部26(User Interface)とを備えるコンピュータである。CPU21からストレージ25までは、図2に表す同名のハードウェアと共通するハードウェアである。UI部26は、液晶ディスプレイ等の表示手段を備え、自装置を操作するためのメニュー画面等を表示する。また、UI部26は、キーボード及びマウス等の入力手段を備えている。
FIG. 3 shows the hardware configuration of the
リソース提供システム1が備える各装置のCPUがプログラムを実行して各部を制御することで、以下に述べる機能が実現される。
図4及び図5はリソース提供システム1が実現する機能構成を表す。図4ではサーバ装置10を1台だけ表しているが、各サーバ装置10は、いずれも、仮想マシン実現部30と、インスタンス群31と、第1オートスケール制御部32と、第2オートスケール制御部33と、リクエスト・レスポンスキュー34と、サービス定義記憶部35と、サービス管理情報記憶部36と、移転制御部40とを備える。
The functions described below are realized by the CPU of each device included in the
4 and 5 show the functional configuration realized by the
図5に表すように、移転制御部40は、サービス状態管理部401と、サービス状態記憶部402と、リソース使用率算出部403と、サービス移転判断部404と、移転対象選択部405と、サービス停止判断部406と、サービス移転情報記憶部407とを備える。リソース管理装置20は、サービス管理情報表示部201を備える。インスタンス群31は、インスタンス50−1、インスタンス50−2及びインスタンス50−3等の複数のインスタンスを備える。以下それらを区別しない場合は「インスタンス50」という。
As shown in FIG. 5, the
インスタンス50−1は、コンテナ制御要求受付部51−1と、コンテナ実行部52−1と、コンテナ制御部53−1とを備える。インスタンス50−2は、コンテナ制御要求受付部51−2と、コンテナ実行部52−2と、コンテナ制御部53−2とを備える。なお、インスタンス50−3以降の各インスタンスもいずれもインスタンス50−1及びインスタンス50−2と共通の機能を備える。各インスタンス50の機能を区別しない場合、以下ではそれぞれ「コンテナ制御要求受付部51」、「コンテナ実行部52」、「コンテナ制御部53」という。 Instance 50-1 includes a container control request receiving unit 51-1, a container execution unit 52-1 and a container control unit 53-1. Instance 50-2 includes a container control request receiving unit 51-2, a container execution unit 52-2, and a container control unit 53-2. In addition, each instance after instance 50-3 has a function common to instance 50-1 and instance 50-2. When the functions of each instance 50 are not distinguished, they are referred to as "container control request receiving unit 51", "container execution unit 52", and "container control unit 53", respectively.
本実施例では、インスタンス50−1で実行されているサービスの移転先がインスタンス50−2となる場合について主に説明する(ただしインスタンス50−2が移転先にならない場合も説明する)。インスタンス50−1がサービス60の移転元となりインスタンス50−2が移転先となる場合は、インスタンス50−2は本発明の「第1仮想マシン」の一例となり、インスタンス50−1は本発明の「第2仮想マシン」の一例となる。 In this embodiment, the case where the transfer destination of the service executed in the instance 50-1 is the instance 50-2 will be mainly described (however, the case where the instance 50-2 is not the transfer destination will also be described). When instance 50-1 is the transfer source of the service 60 and instance 50-2 is the transfer destination, the instance 50-2 is an example of the "first virtual machine" of the present invention, and the instance 50-1 is the "first virtual machine" of the present invention. This is an example of a "second virtual machine".
仮想マシン実現部30は、仮想マシンを実現する機能であり、本実施例では、コンテナ型の仮想化技術を用いた仮想マシンを実現する。仮想マシン実現部30は、例えばDocker(登録商標)によって実現されるが、これに限らず、その他のコンテナ型の仮想化プログラムによって実現されてもよい。仮想マシン実現部30は、図4の例では、インスタンス50−1等の各インスタンスの他、インスタンス以外の機能である第1オートスケール制御部32及び移転制御部40等も実現する。
The virtual
コンテナ制御要求受付部51は、自インスタンスの外部からのコンテナに対する制御要求を受け付けて、コンテナ制御部53に要求内容を伝達する。コンテナ実行部52は、自インスタンスに割り当てられたリソースを用いて上述したOCRサービス等の複数のサービスを実行する。インスタンスにリソースを割り当てるとは、そのインスタンスのためにリソースを確保することである。インスタンス内では、各サービスに対しても同様にリソースが割り当てられる(確保される)。 The container control request receiving unit 51 receives a control request for the container from the outside of its own instance, and transmits the request content to the container control unit 53. The container execution unit 52 executes a plurality of services such as the OCR service described above by using the resources allocated to the own instance. Allocating resources to an instance means allocating resources for that instance. Within the instance, resources are allocated (allocated) to each service in the same way.
コンテナ実行部52−1は、図5の例では、サービス61−1、サービス61−2及びサービス61−3という3つのサービスを実行しており、インスタンス50−2のコンテナ実行部52−2は、サービス62−1、サービス62−2及びサービス62−3という3つのサービスを実行している。以下では各サービスを区別しない場合は「サービス60」という。 In the example of FIG. 5, the container execution unit 52-1 executes three services, service 61-1, service 61-2, and service 61-3, and the container execution unit 52-2 of the instance 50-2 , Service 62-1, service 62-2, and service 62-3. In the following, when each service is not distinguished, it is referred to as "service 60".
リソース提供システム1では、各インスタンス50及び各サービス60が各々の識別情報(インスタンスID(Identification)、サービスID)によって識別されるようになっている。以下では、各インスタンス50及び各サービス60に関する情報には常にそれらの識別情報が付与されており、どのインスタンス50及びサービス60の情報であるかが分かるようになっているものとする。
In the
リクエスト・レスポンスキュー34は、図1に表すユーザ端末3からのサービス60へのリクエスト及びそのリクエストに対するサービス60からのレスポンスをキュー(先入れ先出しのデータ)として取り扱う。サービス60は、リクエスト・レスポンスキュー34からリクエストを示すメッセージを受け取り、そのメッセージで指定された処理を実行し、処理結果を示すメッセージをレスポンスとしてリクエスト・レスポンスキュー34に格納する。
The request /
コンテナ制御部53は、コンテナ実行部52によるサービス60の実行を制御する。コンテナ制御部53は、コンテナ実行部52へのサービス60の配置、コンテナ実行部52が実行しているサービス60の停止、サービス60の実行に必要なリソースの割り当て、割り当てられたリソース以上のリソースをサービス60が利用することの制限及びサービス60の実行状態の管理等を行う。 The container control unit 53 controls the execution of the service 60 by the container execution unit 52. The container control unit 53 allocates the service 60 to the container execution unit 52, stops the service 60 being executed by the container execution unit 52, allocates resources necessary for executing the service 60, and allocates more resources than the allocated resources. It limits the use of the service 60 and manages the execution status of the service 60.
サービス60の配置とは、コンテナ実行部52のリソースを確保してそのサービス60の実行環境を作成することをいう。サービスの配置は、サービス定義記憶部35が記憶するサービスの定義情報に基づいて行われる。サービスの定義情報とは、そのサービス60で用いられるプログラム、データ、パラメータ及び使用するリソース等を示す情報である。
The arrangement of the service 60 means to secure the resource of the container execution unit 52 and create the execution environment of the service 60. The service is arranged based on the service definition information stored in the service
移転制御部40は、サービス60の移転に関する動作を制御する機能であり、各インスタンス50とは独立して動作する。インスタンス群31においては、インスタンス間でサービス60が移転される。サービス60の移転とは、本実施例では、移転元のインスタンスで実行されているサービス60を移転先のインスタンスで実行させ、移転元のインスタンスで実行されていたサービス60を停止させることをいう。
The
移転制御部40のサービス状態管理部401は、各インスタンス50のコンテナ実行部52におけるサービス60の状態を取得して管理する。サービス60の状態には、作成中、実行中、移転準備中の3つの状態が含まれる。「作成中」は、コンテナ実行部52がサービス60の実行環境を作成している途中であることを意味し、作成中のサービス60は処理を実行することができない状態である。
The service
「実行中」は、サービス60の実行環境の作成が完了しており、コンテナ実行部52が処理を実行することができる状態である。リクエストがなくて処理を実行していなくても、実行環境の作成が完了していれば実行中の状態となる。移転先のサービス60の状態が作成中から実行中になると、後述するように移転制御部40が移転元のサービス60を停止させる。こうして移転元のサービス60を停止したときに移転が完了する。
"Running" is a state in which the creation of the execution environment of the service 60 has been completed and the container execution unit 52 can execute the process. Even if there is no request and the process is not executed, it will be in the running state if the creation of the execution environment is completed. When the state of the service 60 at the transfer destination changes from being created to being executed, the
「移転準備中」は、他のインスタンスに移転予定であり、その移転先のインスタンスで同一のサービス60が作成中となっている状態である。本実施例では、コンテナ実行部52は、移転準備中のサービス60、すなわち他のインスタンスへの移転が決定されたサービス60がある場合、移転先のインスタンスでそのサービス60の実行環境が完成するまで(つまりサービス60の状態が「実行中」になるまで)は、そのサービス60に新たな処理を実行させる。 "Preparing for relocation" is a state in which the transfer is scheduled to be performed on another instance, and the same service 60 is being created in the transfer destination instance. In this embodiment, if there is a service 60 that is being prepared for relocation, that is, a service 60 that has been decided to be relocated to another instance, the container execution unit 52 waits until the execution environment of the service 60 is completed in the relocation destination instance. (That is, until the state of the service 60 becomes "running"), the service 60 is made to execute a new process.
なお、コンテナ実行部52は、前述の場合に、移転先のインスタンスでそのサービス60の実行環境が完成していなくてもそのサービス60に新たな処理を実行させないようにしてもよい。新たな処理を実行させる場合は、新たな処理を実行させない場合に比べて処理の進捗が早まることになり、新たな処理を実行させない場合は、新たな処理を実行させる場合に比べてサービスの移転が早まることになる。 In the above case, the container execution unit 52 may prevent the service 60 from executing a new process even if the execution environment of the service 60 is not completed in the transfer destination instance. When a new process is executed, the progress of the process is faster than when the new process is not executed, and when the new process is not executed, the service is transferred compared to the case where the new process is executed. Will be hastened.
コンテナ実行部52は、サービス60の状態が変更された場合、サービス60が停止された場合、「実行中」の状態のサービス60が処理を開始した場合、又は、その処理が終了した場合に、その旨をコンテナ制御部53及びコンテナ制御要求受付部51を介してサービス状態管理部401に通知する。サービス状態管理部401は、この通知を受け取ると、サービス60の状態をサービス状態記憶部402に記憶させ、既にそのサービス60の状態が記憶されている場合は状態を更新する。こうしてサービス状態記憶部402は、各インスタンス50のサービス60の状態を記憶する。
When the state of the service 60 is changed, the service 60 is stopped, the service 60 in the "running" state starts processing, or the processing ends, the container execution unit 52 may perform the processing. The service
リソース使用率算出部403は、各インスタンス50のリソース使用率を算出する。インスタンス50のリソース使用率とは、そのインスタンス50に割り当てられているリソースのうち、そのインスタンス50で実行されているサービス60に割り当てられているリソースの割合をいう。リソース使用率算出部403は、現時点での使用率と、移転後の使用率とをリソース使用率として算出する。
The resource usage
現時点での使用率は、インスタンス50で現在実行されているサービス60に割り当てられているリソースについてのリソース使用率である。現在実行されているサービス60とは、前述した3つの状態(作成中、実行中、移転準備中)のサービス60のことである。作成中のサービス60も、既に実行の過程にあるものとして含めている。リソース使用率算出部403は、各インスタンス50におけるサービス60の状態を示す情報をサービス状態管理部401から取得する。
The current utilization is the resource utilization for the resources currently assigned to the service 60 currently running on instance 50. The service 60 currently being executed is the service 60 in the above-mentioned three states (creating, executing, and preparing for relocation). The service 60 being created is also included as being in the process of execution. The resource usage
リソース使用率算出部403は、これら3つの状態のサービス60に割り当てられたリソース(以下「第2リソース」という)の、インスタンス50に割り当てられたリソース(以下「第1リソース」という)に対する割合(以下「第1割合」という)を現時点での使用率として、複数のインスタンス50のそれぞれについて算出する。この第1割合を算出するリソース使用率算出部403は本発明の「第1算出部」の一例である。
The resource usage
インスタンス50の移転後の使用率は、そのインスタンス50で実行されているサービス60から他のインスタンス50に移転予定のサービス60を除いたもの、すなわち移転予定のサービス60が移転した後に実行されている見込みのサービス60についてのリソース使用率である。移転後に実行されている見込みのサービス60とは、3つの状態のうち移転準備中のサービス60を除いた作成中及び実行中のサービス60のことである。 The usage rate of the instance 50 after the transfer is the service 60 running on the instance 50 minus the service 60 scheduled to be transferred to another instance 50, that is, the service 60 scheduled to be transferred is executed after the service 60 is transferred. The resource usage rate for the expected service 60. The service 60 that is expected to be executed after the relocation is the service 60 that is being created and is being executed, excluding the service 60 that is being prepared for relocation, out of the three states.
リソース使用率算出部403は、この移転後に実行されている見込みのサービス60に割り当てられているリソース(以下「第3リソース」という)の第1リソース(インスタンスに割り当てられているリソース)に対する割合(以下「第2割合」という)を移転後の使用率として、複数のインスタンス50のそれぞれについて算出する。この第2割合を算出するリソース使用率算出部403は本発明の「第2算出部」の一例である。
The resource usage
リソース使用率算出部403は、サービス移転判断部404からリソース使用率の算出を指示されたときに、サービス状態記憶部402から各インスタンス50のサービスの状態を読み出してリソース使用率を算出する。リソース使用率算出部403は、算出したインスタンス50のリソース使用率をサービス移転判断部404に供給する。
When the service
サービス移転判断部404は、サービス60の移転に関する判断を行う。サービス移転判断部404は、本実施例では、決められた時間間隔でこの判断を行う。サービス移転判断部404は、この時間間隔が経過すると、前述したようにリソース使用率算出部403にリソース使用率の算出を指示して各インスタンス50のリソース使用率(現時点での使用率及び移転後の使用率)を取得する。
The service
サービス移転判断部404は、取得したリソース使用率に基づいて、まず、複数のインスタンス50(各々が自身に割り当てられたリソースを用いて複数のサービスを実行する複数の仮想マシン)から、1以上のサービスを実行可能な空きリソースを有するインスタンス50を、移転先候補として検出する。サービス移転判断部404は本発明の「検出部」の一例である。
Based on the acquired resource usage rate, the service
以下では、説明を分かり易くするため、各インスタンス50に割り当てられているリソースが等しく、各サービス60に割り当てられているリソースも等しく全て第1リソースの3分の1であるという前提を置くこととする。つまり、どのインスタンス50でも最大で3つのサービス60が実行されるようになっている。なお、これらの前提はあくまで説明の便宜上のものであり、本発明はこれに限定されない。 In the following, for the sake of clarity, it is assumed that the resources assigned to each instance 50 are equal and the resources assigned to each service 60 are also equal and all are one-third of the first resource. do. That is, a maximum of three services 60 are executed in any instance 50. It should be noted that these assumptions are for convenience of explanation only, and the present invention is not limited thereto.
サービス移転判断部404は、例えば、取得した現時点での使用率が2つ以下のサービス60を実行するときの使用率(つまり66.6・・%以下)である場合、少なくとも1つのサービス60を実行するだけの空きリソースがあるから、そのインスタンス50を移転先候補として検出する。
The service
また、サービス移転判断部404は、サービス状態記憶部402から各インスタンス50のサービス60の状態を取得して、取得した状態に基づいて移転対象候補となるサービス60(実際に移転させる対象となるサービス60の候補)を検出する。サービス移転判断部404は、本実施例では、「実行中」の状態になっているサービス60のうち、処理を実行していないサービス60(つまり処理を終了した状態になっているサービス60)を移転対象候補として検出する。
Further, the service
また、サービス移転判断部404は、検出した移転対象候補のサービス60を実行しているインスタンス50を移転元候補として検出する。サービス移転判断部404は、こうして検出した移転対象候補、移転元候補及び移転先候補を示す識別情報を、取得したリソース使用率(現時点での使用率及び移転後の使用率)を移転対象選択部405に供給する。移転対象選択部405は、供給された識別情報が示す移転対象候補、移転元候補及び移転先候補から、実際に移転させる対象となるものを選択する。
Further, the service
移転対象選択部405は、検出されたインスタンス50(移転先候補)のリソース使用率が、複数のインスタンス50のうちその移転先候補の空きリソースで実行可能なサービス60(移転対象候補)を実行中のインスタンス50(移転元候補)のリソース使用率から定まる閾値以上である場合、その移転先候補をその移転対象候補の移転先として決定する。移転対象選択部405は本発明の「決定部」の一例である。
The transfer
本実施例では、サービス移転判断部404は、比較するリソース使用率として移転後の使用率を用い、閾値として移転元候補の移転後の使用率を用いる。つまり、サービス移転判断部404は、移転元候補の移転後の使用率(本実施例における閾値)以上の移転後の使用率が算出された移転先候補を移転先として決定する。移転先の決定方法について図6A、図6Bを参照して説明する。
In this embodiment, the service
図6A、図6Bは移転先の決定例を表す。図6の例では、説明を簡単にするため、インスタンス50−1及びインスタンス50−2だけが実現されているものとして説明する。図6A(a)では、インスタンス50−1においてサービス61−1、61−2が実行中の状態で且つ処理を実行している状態(処理中)であり、サービス61−3が実行中の状態だが処理が終了している状態(処理終了)である。また、インスタンス50−2ではサービス62−1、62−2、62−3が実行中且つ処理中の状態である。 6A and 6B show an example of determining the relocation destination. In the example of FIG. 6, for the sake of simplicity, it is assumed that only instances 50-1 and 50-2 are realized. In FIG. 6A (a), services 61-1 and 61-2 are being executed and processing is being executed (processing) in instance 50-1, and services 61-3 are being executed. However, the processing is completed (processing is completed). Further, in instance 50-2, services 62-1, 62-2, and 62-3 are in the state of being executed and being processed.
サービス移転判断部404は、この例では、処理終了の状態のサービス61−3を移転対象候補として検出し、サービス61−3を実行するインスタンス50−1を移転元候補として検出するが、インスタンス50−2にはサービス61−3を実行可能な空きリソースがないので、インスタンス50−2を移転先候補として検出しない。従って、サービス61−3がインスタンス50−2に移転されることはない。
In this example, the service
図6A(b)では、図6A(a)の状態からサービス61−1及びサービス62−1が停止して空きリソースが生じている。この場合、サービス移転判断部404は、インスタンス50−2にサービス61−3を実行可能な空きリソースがあるので移転先候補として検出する。移転対象選択部405は、移転先候補(インスタンス50−2)の移転後の使用率(66.6・・%)が移転元候補(インスタンス50−1)の移転後の使用率(66.6・・%)以上であるため、インスタンス50−2を移転先として決定する。
In FIG. 6A (b), service 61-1 and service 62-1 are stopped from the state of FIG. 6A (a) to generate free resources. In this case, the service
このように、本実施例では、移転後の使用率が同じインスタンス同士でもどちらかにサービスが寄せられることになる。こうしてサービスの実行主体を特定のインスタンス50に偏らせることで、反対にサービスの実行主体にならないインスタンス50、すなわち停止させてもよいインスタンス50が増え、それらのインスタンス50を停止させることで利用中のインスタンスの数に応じた課金が減少する。 As described above, in this embodiment, the service is sent to either of the instances having the same usage rate after the transfer. By biasing the service execution subject to a specific instance 50 in this way, on the contrary, the number of instances 50 that do not become the service execution subject, that is, the instances 50 that may be stopped increases, and those instances 50 are stopped and used. Billing is reduced according to the number of instances.
図6A(c)では、図6A(b)の状態からサービス62−2が移転準備中に変化している。この場合、サービス移転判断部404は、インスタンス50−2の現時点での使用率がサービス61−3を実行させるための空きを示しているため、インスタンス50−2を移転先候補として検出する。しかし、移転先候補(インスタンス50−2)の移転後の使用率(33.3・・%)が移転元候補(インスタンス50−1)の移転後の使用率(66.6・・%)未満であるため、移転対象選択部405はインスタンス50−2を移転先として決定しない。
In FIG. 6A (c), service 62-2 is changing from the state of FIG. 6A (b) during preparation for relocation. In this case, the service
図6A(d)では、図6A(c)の状態からサービス61−1及び61−2が移転準備中に変化している。この場合、移転先候補の現時点の使用率(66.6・・%)は移転元候補の現時点の使用率(100%)未満だが、移転先候補の移転後の使用率(33.3・・%)は移転元候補の移転後の使用率(33.3・・%)以上であるため、移転対象選択部405は、移転先候補であるインスタンス50−2を移転先として決定する。
In FIG. 6A (d), services 61-1 and 61-2 are changing from the state of FIG. 6A (c) during preparation for relocation. In this case, the current usage rate of the relocation candidate (66.6%) is less than the current usage rate of the relocation source candidate (100%), but the post-relocation usage rate of the relocation candidate (33.3 ...%). %) Is equal to or higher than the post-relocation usage rate of the transfer source candidate (33.3 ..%), so the transfer
図6B(e)では、図6A(c)の状態からサービス61−2及び62−3が移転準備中に変化している。この場合、移転先候補の現時点の使用率(66.6・・%)は移転元候補の現時点の使用率(66.6・・%)以上だが、移転先候補の移転後の使用率(0%)は移転元候補の移転後の使用率(33.3・・%)未満であるため、移転対象選択部405は、移転先候補であるインスタンス50−2を移転先として決定しない。
In FIG. 6B (e), services 61-2 and 62-3 are changing from the state of FIG. 6A (c) during preparation for relocation. In this case, the current usage rate of the relocation candidate (66.6.%) Is higher than the current usage rate of the relocation source candidate (66.6%), but the usage rate of the relocation candidate after relocation (0). %) Is less than the post-relocation usage rate (33.3 ..%) of the transfer source candidate, so the transfer
図6B(f)では、図6A(c)の状態からサービス61−2及び62−1が移転準備中に変化している。この場合、移転先候補の移転後の使用率(33.3・・%)が移転元候補の移転後の使用率(33.3・・%)以上になるが、現時点ではインスタンス50−2に空きリソースがないので、サービス移転判断部404は、インスタンス50−2を移転先候補として検出しない。
In FIG. 6B (f), services 61-2 and 62-1 are changing from the state of FIG. 6A (c) during preparation for relocation. In this case, the post-relocation usage rate of the relocation candidate (33.3%) is higher than the post-relocation usage rate of the relocation source candidate (33.3%), but at the moment it is in instance 50-2. Since there are no free resources, the service
なお、図6B(f)の場合にも移転が行われるように、サービス移転判断部404は、移転後の使用率が示す空きリソースで移転対象候補のサービス60を実行可能なインスタンス50−2を移転先候補として検出するようにしてもよい。そうすれば、図6B(f)の場合でも、サービス移転判断部404がインスタンス50−2を移転先候補として検出し、移転対象選択部405がインスタンス50−2を移転先として決定することになる。
As in the case of FIG. 6B (f), the service
移転元候補及び移転先候補はそれぞれ複数検出される場合がある。それらの場合の移転先の決定方法について説明する。まず、移転対象選択部405は、移転元候補となるインスタンス50が複数ある場合、移転対象のサービス60が移転した後のリソース使用率が他の移転元候補よりも小さくなる(つまりそのリソース使用率が最小の)インスタンス50を移転元として決定し、そのインスタンス50を移転元とする移転対象のサービス60の移転先を決定する。
Multiple transfer source candidates and transfer destination candidates may be detected. The method of determining the relocation destination in such cases will be described. First, in the transfer
図7は複数の移転元候補の例を表す。図7(a)では、インスタンス50−1においてサービス61−2が実行中且つ処理中の状態であり、サービス61−3が実行中且つ処理終了の状態である。また、インスタンス50−2ではサービス62−1、62−2が実行中且つ処理中の状態であり、サービス62−3が実行中且つ処理終了の状態である。この場合、インスタンス50−1及び50−2のどちらも移転元対象として検出される。 FIG. 7 shows an example of a plurality of transfer source candidates. In FIG. 7A, service 61-2 is being executed and being processed in instance 50-1, and service 61-3 is being executed and being processed. Further, in the instance 50-2, the services 62-1 and 62-2 are in the state of being executed and being processed, and the service 62-3 is in the state of being executed and the processing is completed. In this case, both instances 50-1 and 50-2 are detected as transfer source targets.
移転対象選択部405は、リソース使用率算出部403により算出された移転後の使用率から、移転対象のサービス60によるリソース使用率を減じた値を、移転対象のサービス60が移転した後のリソース使用率として用いる。図7(a)の例では、インスタンス50−1のリソース使用率は33.3・・%で、インスタンス50−2のリソース使用率は66.6・・%となるので、移転対象選択部405は、リソース使用率がより小さい方のインスタンス50−1を移転元として決定する。
The transfer
図7(b)では、図7(a)からサービス62−1、62−2の状態が実行中から移転準備中に変化している。この場合は、インスタンス50−1のリソース使用率は33.3・・%のままだが、インスタンス50−2のリソース使用率は0%となるので、移転対象選択部405は、リソース使用率がより小さい方のインスタンス50−2を移転元として決定する。このように移転元を決定することで、他のインスタンス50を移転元として決定する場合に比べて、リソースの空きが特定のインスタンス50に偏ることになる。その結果、実行するサービスが0になるインスタンス50が生じやすくなり、インスタンス50を停止させやすくなる。
In FIG. 7 (b), the states of services 62-1 and 62-2 are changed from FIG. 7 (a) during execution and preparation for relocation. In this case, the resource usage rate of instance 50-1 remains 33.3 ..%, but the resource usage rate of instance 50-2 is 0%, so that the transfer
移転対象選択部405は、空きリソースを有して移転先候補となっているインスタンス50が複数ある場合、その空きリソースに移転対象のサービス60が移転した後のリソース使用率が他の移転先候補よりも大きい(つまりそのリソース使用率が最大の)インスタンス50を移転先として決定する。
図8は複数の移転先候補の例を表す。図8(a)では、インスタンス50−1においてサービス61−3が実行中の状態であり、インスタンス50−2ではサービス62−2、62−3が実行中の状態である。この場合、インスタンス50−1及び50−2のどちらも移転先対象として検出される。
When there are a plurality of instances 50 that have free resources and are candidates for the transfer destination, the transfer
FIG. 8 shows an example of a plurality of transfer destination candidates. In FIG. 8A, the service 61-3 is in the running state in the instance 50-1, and the services 62-2 and 62-3 are in the running state in the instance 50-2. In this case, both instances 50-1 and 50-2 are detected as transfer destination targets.
移転対象選択部405は、リソース使用率算出部403により算出された移転後の使用率に、移転対象のサービス60によるリソース使用率を加えた値を、移転対象のサービス60が移転した後のリソース使用率として用いる。図8(a)の例では、インスタンス50−1のリソース使用率は、33.3・・%(移転後の使用率)+33.3・・%(サービス60によるリソース使用率)=66.6・・%となり、インスタンス50−2のリソース使用率は、66.6・・%(移転後の使用率)+33.3・・%(サービス60によるリソース使用率)=100%となるので、移転対象選択部405は、リソース使用率がより大きい方のインスタンス50−2を移転先として決定する。
The transfer
図8(b)では、図8(a)からサービス62−2、62−3の状態が実行中から移転準備中に変化している。この場合は、インスタンス50−1のリソース使用率は図8(a)の例と同じで66.6・・%となるが、インスタンス50−2のリソース使用率は、0%(移転後の使用率)+33.3・・%(サービス60によるリソース使用率)=33.3・・%となるので、移転対象選択部405は、リソース使用率がより大きい方のインスタンス50−1を移転先として決定する。
In FIG. 8 (b), the states of services 62-2 and 62-3 are changed from FIG. 8 (a) during execution and preparation for relocation. In this case, the resource usage rate of instance 50-1 is 66.6%, which is the same as the example of FIG. 8A, but the resource usage rate of instance 50-2 is 0% (use after transfer). Rate) + 33.3 ...% (Resource usage rate by service 60) = 33.3 ..%, so the transfer
このように移転先を決定することで、他のインスタンス50を移転先として決定する場合に比べて、移転後に移転先のインスタンス50に集まるサービス60が多くなり、特定のインスタンス50にサービス60が集中することになる。すると、それ以外のインスタンス50にはサービス60が集まらなくなり、そうしてサービス60が少なくなったインスタンス50からはサービス60が移転で出て行きやすくなるので、その結果、インスタンス50を停止させやすくなる。 By determining the relocation destination in this way, the number of services 60 that gather at the relocation destination instance 50 after the relocation increases, and the services 60 are concentrated on a specific instance 50, as compared with the case where another instance 50 is determined as the relocation destination. Will be done. Then, the service 60 does not gather in the other instances 50, and the service 60 can be easily moved out from the instance 50 in which the number of the service 60 is reduced. As a result, the instance 50 can be easily stopped. ..
移転対象選択部405は、サービス60の移転先を決定した場合、移転先のインスタンスのコンテナ制御要求受付部51に移転するサービス60の配置を要求する。この要求により上記のとおり移転先のインスタンス50に移転対象のサービス60と同じサービス60の実行環境が作成される(例えば移転対象がOCRサービスなら移転先でもOCRサービスの実行環境が作成される)。また、移転対象選択部405は、決定した移転先のインスタンス50、移転元のインスタンス50及び移転対象のサービス60の識別情報をサービス停止判断部406に供給する。
When the transfer
サービス停止判断部406は、受け取った識別情報が示す移転先のインスタンス50のコンテナ制御要求受付部51に移転対象のサービス60の状態を問い合わせる。サービス停止判断部406は、移転対象のサービス60の状態が作成中から実行中になった場合、受け取った識別情報が示す移転元のインスタンス50のコンテナ制御要求受付部51にその移転対象のサービス60の停止を依頼する。移転元のコンテナ制御部53がこの依頼に基づきサービス60を停止すると、移転が完了する。
The service
サービス停止判断部406は、移転が完了すると、サービス60の移転に関する情報(サービス移転情報)として、例えば供給された移転先のインスタンス50、移転元のインスタンス50及び移転対象のサービス60の識別情報と、移転が完了した時刻を示す時刻情報とをサービス移転情報記憶部407に供給する。サービス移転情報記憶部407は、サービス停止判断部406から供給されたサービス移転情報を記憶する。サービス移転情報記憶部407は、記憶したサービス移転情報をサービス管理情報記憶部36に供給する。
When the transfer is completed, the service
サービス管理情報記憶部36は、供給されたサービス移転情報を蓄積して、複数のインスタンス50におけるサービス60の移転履歴として記憶する。また、サービス管理情報記憶部36は、サービス状態記憶部402から、複数のインスタンス50におけるサービス60の実行状態(作成中、実行中、移転準備中)を示す実行状態情報を取得して記憶する。
The service management
また、サービス管理情報記憶部36は、リソース使用率算出部403から、複数のインスタンス50におけるリソース使用率(現時点での使用率及び移転後の使用率)を示す使用率情報を取得して記憶する。サービス管理情報記憶部36は本発明の「記憶部」の一例である。なお、サービス管理情報記憶部36への移転履歴、実行状態情報及び使用率情報の供給は、サービス管理情報記憶部36から要求するプル型で行われてもよいし、供給元が能動的に供給してくるプッシュ型で行われてもよい。
Further, the service management
リソース管理装置20のサービス管理情報表示部201は、サービス管理情報記憶部36に記憶されたサービス管理情報を表示する。例えば、リソース提供システム1の管理者がサービス60の移転履歴を表示させる操作を行うと、サービス管理情報表示部201は、サービス管理情報記憶部36からサービス60の移転履歴を取得して表示する。この場合のサービス管理情報記憶部36は、記憶している複数のインスタンス50におけるサービス60の移転履歴を表示手段であるサービス管理情報表示部201に出力する機能であり、本発明の「履歴出力部」の一例である。このように複数のインスタンスにおけるサービスの移転履歴が出力されることで、各インスタンスにおける過去の移転の経緯が把握される。
The service management
また、管理者が全て又は一部のインスタンス50における実行状態情報(サービス60の実行状態を示す情報)を表示させる操作を行うと、サービス管理情報表示部201は、サービス管理情報記憶部36から指定されたインスタンス50の実行状態情報を取得して表示する。この場合のサービス管理情報記憶部36は、記憶している複数のインスタンス50における実行状態情報を表示手段であるサービス管理情報表示部201に出力する機能であり、本発明の「状態出力部」の一例である。
Further, when the administrator performs an operation to display the execution status information (information indicating the execution status of the service 60) in all or a part of the instances 50, the service management
実行状態情報が出力されることで、サービスの実行状態から移転状況が把握されることになる。例えばサービスの状態が実行中から変化しないインスタンスは移転で出入りするサービスが少なく、移転準備中の状態が多いインスタンスは移転で出入りするサービスが多いことが把握される。 By outputting the execution status information, the transfer status can be grasped from the execution status of the service. For example, it can be understood that an instance whose service status does not change from the running state has few services that come and go by relocation, and an instance that has many states in preparation for relocation has many services that come and go by relocation.
また、管理者が全て又は一部のインスタンス50におけるリソース使用率(現時点での使用率及び移転後の使用率)を表示させる操作を行うと、サービス管理情報表示部201は、サービス管理情報記憶部36から指定されたインスタンス50の使用率情報を取得して、その使用率情報が示すリソース使用率を表示する。これにより、リソース使用率から移転状況が把握されることになる。例えばリソース使用率が高い数値で維持されているインスタンスは移転で出入りするサービスが少なく、リソース使用率が低い数値で変化しているインスタンスは移転で出入りするサービスが多いことが把握される。
Further, when the administrator performs an operation to display the resource usage rate (current usage rate and usage rate after transfer) in all or some of the instances 50, the service management
第1オートスケール制御部32は、定められたルールに則り、インスタンスのスケールイン及びスケールアウトを制御する。スケールインとは仮想マシンの台数を減らすことをいい、スケールアウトとは仮想マシンの台数を増やすことをいう。本実施例では、例えばインスタンス50−1のサービス停止判断部406が、コンテナ実行部52−1が実行していたサービス60を全て停止すると、その旨を第1オートスケール制御部32に通知する。
The first
第1オートスケール制御部32は、コンテナ実行部52−1により実行されるサービス60の数が0になった(実行していたサービス60が全て停止された)インスタンス50をスケールインの対象と判定して停止させる制御を行う。こうしてインスタンス50が停止すると、本実施例における課金(利用中のインスタンスの数に応じた課金)の対象ではなくなる。
The first
なお、第1オートスケール制御部32は、これ以外にも、例えばリクエスト・レスポンスキュー34に格納されたキューの状況に基づいてスケールイン及びスケールアウトの判定を行ってもよい。第2オートスケール制御部33は、定められたルールに則り、サービス60のスケールイン及びスケールアウトを制御する。第2オートスケール制御部33は、コンテナ制御要求受付部51に対して、スケールインを行う際はサービス60の停止を依頼し、スケールアウトを行う際はサービス60の配置を依頼する。
In addition to this, the first
リソース提供システム1が備える各装置は、上記の構成に基づいて、インスタンス間でサービスを移転させる移転処理を行う。
図9は移転処理における各装置の動作手順の一例を表す。図9では、インスタンス50−1及び50−2だけを表しているが、他にもインスタンス50が存在するものとする。まず、インスタンス50が、サービス状態の変更又はサービスの停止を行うと(ステップS11、S12)、その旨を移転制御部40に通知し(ステップS13、S14)、第1オートスケール制御部32にも通知する(ステップS15、S16)。
Each device included in the
FIG. 9 shows an example of the operation procedure of each device in the transfer process. In FIG. 9, only instances 50-1 and 50-2 are shown, but it is assumed that there are other instances 50. First, when the instance 50 changes the service state or stops the service (steps S11 and S12), the
移転制御部40(リソース使用率算出部403)は、通知されてきた情報に基づいて各インスタンス50のリソース使用率(現時点での使用率及び移転後の使用率)を算出する(ステップS21)。次に、移転制御部40(サービス移転判断部404)は、算出されたリソース使用率に基づいて移転先候補のインスタンス50を検出する(ステップS22)。続いて、移転制御部40(サービス移転判断部404)は、算出されたリソース使用率に基づいて移転対象候補のサービス60とそのサービス60を実行する移転元候補のインスタンス50を検出する(ステップS23)。 The transfer control unit 40 (resource usage rate calculation unit 403) calculates the resource usage rate (current usage rate and usage rate after transfer) of each instance 50 based on the notified information (step S21). Next, the transfer control unit 40 (service transfer determination unit 404) detects the transfer destination candidate instance 50 based on the calculated resource usage rate (step S22). Subsequently, the transfer control unit 40 (service transfer determination unit 404) detects the service 60 of the transfer target candidate and the instance 50 of the transfer source candidate that executes the service 60 based on the calculated resource usage rate (step S23). ).
そして、移転制御部40(移転対象選択部405)は、検出された移転先候補、移転対象及び移転元候補から、実際に移転させる移転対象のサービス60と、移転元のインスタンス50と、移転先のインスタンス50とを決定する(ステップS24)。図9の例ではインスタンス50−1が移転先として、インスタンス50−2が移転元として決定されたものとする。移転制御部40(移転対象選択部405)は、移転元として決定されたインスタンス50−1に、移転するサービス60の配置を要求する(ステップS31)。 Then, the transfer control unit 40 (transfer target selection unit 405) transfers the service 60 to be actually transferred from the detected transfer destination candidate, transfer target, and transfer source candidate, the transfer source instance 50, and the transfer destination. Instance 50 is determined (step S24). In the example of FIG. 9, it is assumed that the instance 50-1 is determined as the transfer destination and the instance 50-2 is determined as the transfer source. The transfer control unit 40 (transfer target selection unit 405) requests the instance 50-1 determined as the transfer source to allocate the service 60 to be transferred (step S31).
インスタンス50−1は、要求されたサービス60の実行環境を作成する(ステップS32)。移転制御部40(サービス停止判断部406)は、インスタンス50−1に対して移転対象のサービス60の状態を問い合わせる(ステップS33)。インスタンス50−1は、問い合わせされたサービスの状態を移転制御部40に通知する(ステップS34)。移転制御部40(サービス停止判断部406)は、実行環境が完成したか否かを判断し(ステップS35)、完成していない(NO)と判断した場合はステップS33(問い合わせ)に戻って動作を行う。
Instance 50-1 creates an execution environment for the requested service 60 (step S32). The transfer control unit 40 (service stop determination unit 406) inquires of the instance 50-1 about the status of the service 60 to be transferred (step S33). Instance 50-1 notifies the
移転制御部40(サービス停止判断部406)は、ステップS35で実行環境が完成した(YES)と判断した場合は、移転対象のサービス60を停止するよう、移転元のインスタンス50−2に対して依頼する(ステップS36)。インスタンス50−2は、依頼されたサービスを停止して(ステップS37)、その旨をステップS16と同様に第1オートスケール制御部32に通知する(ステップS41)。
When the transfer control unit 40 (service stop determination unit 406) determines that the execution environment is completed (YES) in step S35, the transfer control unit 40 (service stop determination unit 406) tells the transfer source instance 50-2 to stop the service 60 to be transferred. Request (step S36). Instance 50-2 stops the requested service (step S37), and notifies the first
第1オートスケール制御部32は、ステップS16、S41での通知内容に基づいてインスタンス50−2で実行されるサービスが0になったか否かを判断し(ステップS42)、なっていない(NO)と判断した場合はこの動作手順を終了する。第1オートスケール制御部32は、ステップS42でサービスが0になった(YES)と判断した場合は、インスタンス50−2に対してスケールイン、すなわち停止を指示する(ステップS43)。インスタンス50−2は、この指示を受け取ると、自インスタンスを停止して(ステップS44)、この動作手順を終了する。
The first
本実施例では、上記のとおりサービスの実行主体であるインスタンスがリソース使用率の状況によって変化する(図9の例であれば移転対象のサービス60の実行主体がインスタンス50−2からインスタンス50−1に変化している)。これにより、例えばサービスが1つだけになったインスタンスがそのサービスを実行し続けるとインスタンスの数が減らないが、そのサービスを別のインスタンスに移転させることで、サービスの実行主体(インスタンス)を固定する場合に比べて、サービスの実行主体が特定のインスタンスに偏り、その結果サービスを実行するインスタンスが少なくなり、上述したインスタンス数単位での課金が少なくなる。 In this embodiment, as described above, the instance that is the execution subject of the service changes depending on the status of the resource usage rate (in the example of FIG. 9, the execution subject of the service 60 to be transferred is from instance 50-2 to instance 50-1. Has changed to). As a result, for example, if an instance with only one service continues to execute the service, the number of instances does not decrease, but by moving the service to another instance, the execution subject (instance) of the service is fixed. Compared to the case where the service is executed, the service execution subject is biased to a specific instance, and as a result, the number of instances that execute the service is reduced, and the above-mentioned charge for each number of instances is reduced.
[2]変形例
上述した実施例は本発明の実施の一例に過ぎず、以下のように変形させてもよい。また、実施例及び各変形例は、必要に応じて組み合わせて実施してもよい。
[2] Modifications The above-mentioned examples are merely examples of the implementation of the present invention, and may be modified as follows. Further, the examples and the respective modifications may be carried out in combination as necessary.
[2−1]リソース使用率の閾値
移転対象選択部405は、移転元候補のインスタンス50のリソース使用率から定まる閾値として実施例とは異なる値を用いてもよい。移転対象選択部405は、例えば、サービス移転情報記憶部407に記憶されている複数のインスタンスにおけるサービスの移転履歴に基づいて閾値を変化させる。この場合のサービス移転情報記憶部407は本発明の「記憶部」の一例である。
[2-1] Threshold value of resource usage rate The transfer
移転対象選択部405は、例えば、記憶された移転先候補のインスタンス50の移転履歴が示す移転の頻度が少ないほど、そのインスタンス50を移転先として決定するか否かを判断する際に用いる閾値を小さくする。この閾値を小さくするということは、移転先候補のインスタンスのリソース使用率が閾値以上である場合にそのインスタンスが移転先として決定されるのだから、サービスがその移転先候補に移転されやすくなることを意味する。移転対象選択部405は、例えば、移転の頻度と閾値とを対応付けた閾値テーブルを用いて閾値を決定する。
For example, the transfer
図10は閾値テーブルの一例を表す。図10の例では、「F1未満」、「F1以上F2未満」及び「F2以上」という移転の頻度の範囲に、「R1×0.5」、「R1×1.0」及び「R1×2.0」という閾値が対応付けられている。R1は、移転先候補のインスタンスのリソース使用率を表している。この閾値テーブルを用いた場合の移転先の決定結果について図11を参照して説明する。 FIG. 10 shows an example of a threshold table. In the example of FIG. 10, “R1 × 0.5”, “R1 × 1.0” and “R1 × 2” are included in the range of transfer frequency of “less than F1”, “F1 or more and less than F2” and “F2 or more”. A threshold value of ".0" is associated with it. R1 represents the resource usage rate of the instance of the transfer destination candidate. The result of determining the transfer destination when this threshold table is used will be described with reference to FIG.
図11は移転先の決定結果の例を表す。図11では、移転先候補を移転先として決定した場合を「○」、決定しなかった場合を「×」で示している。図11(a)では、インスタンス50−1においてサービス61−1、61−2、61−3が実行中であり、インスタンス50−2においてサービス62−2、62−3が実行中であり、このうちのサービス61−3が移転対象である。つまり、インスタンス50−1の移転後の使用率R1が100%でインスタンス50−2の移転後の使用率R2が66.6・・%である。 FIG. 11 shows an example of the determination result of the relocation destination. In FIG. 11, the case where the relocation destination candidate is determined as the relocation destination is indicated by “◯”, and the case where the relocation destination candidate is not determined is indicated by “x”. In FIG. 11A, services 61-1, 61-2, 61-3 are running in instance 50-1, and services 62-2, 62-3 are running in instance 50-2. Our service 61-3 is subject to relocation. That is, the usage rate R1 after the transfer of the instance 50-1 is 100%, and the usage rate R2 after the transfer of the instance 50-2 is 66.6 ...%.
この場合に、移転対象選択部405は、インスタンス50−2の移転の頻度がF1未満の場合、100%(R1)×0.5=50%<66.6・・%(R2)なのでインスタンス50−2を移転先として決定する。また、移転対象選択部405は、インスタンス50−2の移転の頻度がF1以上F2未満の場合は100%(R1)×1.0=100%>66.6・・%(R2)となり、インスタンス50−2の移転の頻度がF2以上の場合は100%(R1)×2.0=200%>66.6・・%(R2)となるので、どちらの場合もインスタンス50−2を移転先として決定しない。
In this case, when the frequency of transfer of the instance 50-2 is less than F1, the transfer
図11(b)では、図11(a)の状態からインスタンス50−1のサービス61−1が停止して空きになり、インスタンス50−1の移転後の使用率R1が66.6・・%に変わっている。この場合に、移転対象選択部405は、インスタンス50−2の移転の頻度がF1未満の場合は66.6・・%(R1)×0.5=33.3・・%<66.6・・%(R2)となり、インスタンス50−2の移転の頻度がF1以上F2未満の場合は66.6・・%(R1)×1.0=66.6・・%=66.6・・%(R2)となるのでどちらもインスタンス50−2を移転先として決定する。また、移転対象選択部405は、インスタンス50−2の移転の頻度がF2以上の場合は、66.6・・%(R1)×2.0=133.3・・%>66.6・・%(R2)なのでインスタンス50−2を移転先として決定しない。
In FIG. 11B, the service 61-1 of the instance 50-1 is stopped and becomes empty from the state of FIG. 11A, and the usage rate R1 after the transfer of the instance 50-1 is 66.6.%. It has changed to. In this case, the transfer
図11(c)では、図11(b)の状態からインスタンス50−1のサービス61−2が停止して空きになり、インスタンス50−1の移転後の使用率R1が33.3・・%に変わっている。この場合に、移転対象選択部405は、インスタンス50−2の移転の頻度がF1未満の場合は33.3・・%(R1)×0.5=16.6・・%<66.6・・%(R2)となり、インスタンス50−2の移転の頻度がF1以上F2未満の場合は33.3・・%(R1)×1.0=33.3・・%<66.6・・%(R2)となり、インスタンス50−2の移転の頻度がF2以上の場合は33.3・・%(R1)×2.0=66.6・・%=66.6・・%(R2)となるので、いずれの場合もインスタンス50−2を移転先として決定する。
In FIG. 11 (c), the service 61-2 of the instance 50-1 is stopped and becomes empty from the state of FIG. 11 (b), and the usage rate R1 after the transfer of the instance 50-1 is 33.3.%. It has changed to. In this case, the transfer
図11の例に表すように、本変形例では、移転先候補であるインスタンス50−2の移転履歴が示す移転の頻度が少ないほど、インスタンス50−2が移転先として決定されやすくなっている。なお、図11(c)の例のようにR2がR1よりも十分に大きいと移転の頻度に関わらず常に移転先として決定される場合があるし、反対にR2がR1に比べて小さすぎると、移転の頻度がいくら小さくても移転先として決定されない場合もある。 As shown in the example of FIG. 11, in this modification, the less frequently the transfer history of the instance 50-2, which is a candidate for the transfer destination, indicates, the easier it is for the instance 50-2 to be determined as the transfer destination. As in the example of FIG. 11C, if R2 is sufficiently larger than R1, it may always be determined as the transfer destination regardless of the frequency of transfer, and conversely, if R2 is too small compared to R1. , No matter how infrequent the relocation is, it may not be decided as the relocation destination.
また、移転対象選択部405は、他のサービスの移転履歴を用いてもよい。例えば、移転対象選択部405は、記憶された移転先候補のインスタンス50の移転履歴が示す移転の回数が少ないほど、そのインスタンス50を移転先として決定するか否かを判断する際に用いる閾値を小さくする。この場合、移転対象選択部405は、移転の回数と閾値とを対応付けた閾値テーブルを用いて閾値を決定する。
Further, the transfer
図12は閾値テーブルの別の一例を表す。図12の例では、「C1未満」、「C1以上C2未満」及び「C2以上」という移転の回数の範囲に、「R1×0.5」、「R1×1.0」及び「R1×2.0」という閾値が対応付けられている。この閾値テーブルを用いることで、図10に表した移転の頻度の例と同様に、移転の回数が少ないほど小さな閾値が用いられるようになる。 FIG. 12 shows another example of the threshold table. In the example of FIG. 12, “R1 × 0.5”, “R1 × 1.0” and “R1 × 2” are included in the range of the number of transfers of “less than C1”, “C1 or more and less than C2” and “C2 or more”. A threshold value of ".0" is associated with it. By using this threshold table, as in the example of the frequency of transfer shown in FIG. 10, the smaller the number of transfers, the smaller the threshold is used.
サービスの中には、第2オートスケール制御部33によるスケールアウト及びスケールインが頻繁に行われるサービス(一時的に利用が集中するサービス)と、それがあまり行われないサービス(利用数の変動が少ないサービス)とがある。前者のサービスを実行しているインスタンスは、後者のサービスを実行しているインスタンスよりも移転後の使用率が小さくなって移転が生じやすく、移転の頻度及び回数が多くなりやすい。そのため、移転の頻度及び回数が少ないインスタンスにサービスを移転すると、移転の頻度及び回数が多いインスタンスを移転先にする場合に比べて移転したサービスがそのインスタンスに定着しやすくなる。
Among the services, there are services in which scale-out and scale-in by the second
他にも、移転対象選択部405は、記憶された移転先候補のインスタンス50の移転履歴が示す最新の移転時期が古いほど、そのインスタンス50を移転先として決定するか否かを判断する際に用いる閾値を小さくしてもよい。ここでいう最新の移転時期とは、そのインスタンスにおいて現時点から遡って最後にサービスが移転した時期のことを意味する。この場合、移転対象選択部405は、最新の移転時期と閾値とを対応付けた閾値テーブルを用いて閾値を決定する。
In addition, the transfer
図13は閾値テーブルの別の一例を表す。図13の例では、「T1より前」、「T1以降T2より前」及び「T2以降」という最新の移転時期の範囲に、「R1×0.5」、「R1×1.0」及び「R1×2.0」という閾値が対応付けられている。この閾値テーブルを用いることで、図10に表した移転の頻度の例と同様に、最新の移転時期が古いほど小さな閾値が用いられるようになる。 FIG. 13 shows another example of the threshold table. In the example of FIG. 13, “R1 × 0.5”, “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” and “R1 × 1.0” A threshold value of "R1 x 2.0" is associated with it. By using this threshold table, as in the case of the transfer frequency example shown in FIG. 10, the older the latest transfer time, the smaller the threshold value will be used.
スケールアウト及びスケールインが頻繁に行われるサービスを実行しているインスタンスは、それがあまり行われないサービスを実行しているインスタンスよりも移転後の使用率が小さくなって移転が生じやすく、最新の移転時期が新しくなりやすい。そのため、最新の移転時期が古いインスタンスにサービスを移転すると、最新の移転時期が新しいインスタンスを移転先にする場合に比べて移転したサービスがそのインスタンスに定着しやすくなる。 Instances running services that are frequently scaled out and scaled in are more up-to-date with lower post-relocation utilization and more prone to relocation than instances running services that are less frequent. The relocation time is likely to be new. Therefore, when a service is transferred to an instance with the latest transfer time, the transferred service is more likely to settle in the instance than when the instance with the latest transfer time is the transfer destination.
以上のとおり、本変形例では、サービスの移転履歴に基づいて閾値を変化させることで、閾値が固定である場合に比べて、移転したサービスがそのインスタンスに定着しやすくなる。その結果、上述したサービスの実行主体の偏りが維持されやすくなり、反対にサービスの実行主体にならないインスタンスが増えやすくなって、それらのインスタンスがスケールインにより停止させられることで利用中のインスタンスの数に応じた課金が減少する。 As described above, in the present modification, by changing the threshold value based on the service transfer history, the transferred service is more likely to settle in the instance than in the case where the threshold value is fixed. As a result, it becomes easier to maintain the bias of the service execution subject described above, and conversely, the number of instances that do not become the service execution subject tends to increase, and those instances are stopped by scale-in, so that the number of instances in use The billing will be reduced accordingly.
[2−2]移転先の見直し
移転先が決定して移転準備中の状態なったサービスであっても、移転先のインスタンスで実行環境が完成するまでは停止しないので、それまでの間に移転先のインスタンスのリソース使用率が変化する場合がある。その場合に、移転対象選択部が一度決定した移転先を見直してもよい。
[2-2] Review of relocation destination Even if the relocation destination is decided and the service is in the state of being prepared for relocation, it will not be stopped until the execution environment is completed in the instance of the relocation destination, so it will be relocated in the meantime. The resource utilization of the previous instance may change. In that case, the relocation destination once decided by the relocation target selection unit may be reviewed.
本変形例では、移転対象選択部405が、移転対象のサービスが実行していた処理が終了したときに移転先のインスタンスのリソース使用率が閾値未満になっていた場合、他のインスタンスをそのサービスの移転先として決定する。この場合の移転制御部40の動作手順について図14を参照して説明する。
In this modification, if the transfer
図14は本変形例の移転処理における各装置の動作手順の一例を表す。この動作手順では、図9に表すステップS11(サービス状態の変更・サービスの停止)からステップS35(実行環境の完成の判断)までが行われる。次に、移転制御部40(移転対象選択部405)が、移転先のインスタンス(この例ではインスタンス50−1)に対してサービス状態を問い合わせる(ステップS51)。 FIG. 14 shows an example of the operation procedure of each device in the transfer process of this modified example. In this operation procedure, steps S11 (change of service state / stop of service) shown in FIG. 9 to step S35 (determination of completion of execution environment) are performed. Next, the transfer control unit 40 (transfer target selection unit 405) inquires about the service status of the transfer destination instance (instance 50-1 in this example) (step S51).
インスタンス50−1は、この問い合わせを受け取ると自インスタンスのサービスの状況を移転制御部40に通知する(ステップS52)。移転制御部40(リソース使用率算出部403)は、通知されたサービスの状態を反映してリソース使用率を算出する(ステップS53)。次に、移転制御部40(移転対象選択部405)は、インスタンス50−1、すなわち移転先のリソース使用率が閾値未満か否かを判断する(ステップS54)。
Upon receiving this inquiry, the instance 50-1 notifies the
移転制御部40(サービス停止判断部406)は、ステップS54で移転先のリソース使用率が閾値未満ではない(NO)と判断された場合は、ステップS36(サービス停止の依頼)の動作を行う。図14では図7のステップS41以降の動作を省略している。ステップS54で移転先のリソース使用率が閾値未満である(YES)と判断された場合、移転制御部40(リソース使用率算出部403)は、ステップS21(リソース使用率の算出)に戻って動作を行う。ステップS21からの動作が再び行われることで、移転先の見直しが行われる。 If it is determined in step S54 that the resource usage rate of the transfer destination is not less than the threshold value (NO), the transfer control unit 40 (service stop determination unit 406) performs the operation of step S36 (service stop request). In FIG. 14, the operations after step S41 in FIG. 7 are omitted. If it is determined in step S54 that the resource usage rate of the transfer destination is less than the threshold value (YES), the transfer control unit 40 (resource usage rate calculation unit 403) returns to step S21 (calculation of resource usage rate) and operates. I do. By performing the operation from step S21 again, the relocation destination is reviewed.
移転先が決定されてから実際に移転が完了するまではタイムラグがあるので、例えば移転が完了する前にサービスのスケールインが行われて実行されるサービスが少なくなり、移転先として適当でなくなることがある。本変形例では、上記のとおり移転先を見直すことで、移転先を見直さない場合に比べて、そのように移転先として適当でなくなったインスタンスへのサービスの移転が抑制される。 Since there is a time lag between the decision of the relocation destination and the actual completion of the relocation, for example, services are scaled in and executed less services before the relocation is completed, making it unsuitable as a relocation destination. There is. In this modification, by reviewing the relocation destination as described above, the transfer of services to the instance that is no longer suitable as the relocation destination is suppressed as compared with the case where the relocation destination is not reviewed.
[2−3]割り当てられるリソース
実施例では、説明を分かり易くするため、各インスタンスに割り当てられているリソース(第1リソース)が等しく、各サービスに割り当てられているリソースも全て第1リソースの3分の1であるものとしたが、これに限らない。例えばインスタンス毎に第1リソースが異なっていてもよいし、サービス毎にも割り当てられるリソースが異なっていてもよい。また、各インスタンスで実行されるサービスの数も異なっていてもよい。
[2-3] Allotted Resources In the embodiment, in order to make the explanation easy to understand, the resources assigned to each instance (first resource) are equal, and all the resources assigned to each service are also 3 of the first resource. It is assumed to be one-third, but it is not limited to this. For example, the first resource may be different for each instance, or the resource allocated to each service may be different. Also, the number of services executed in each instance may be different.
[2−4]複数のサービスの移転
リソースに空きのあるインスタンスには、複数のインスタンスから移転要求が送られてくることがある。実施例のように各サービスのリソースが等しければどちらの移転要求を受け付けても自インスタンスのリソース使用率が変わらないが、上記変形例のように各サービスのリソースが異なっていると、どの移転要求を受け付けるかによって、自インスタンスのリソース使用率が変化する。
[2-4] Transfer of a plurality of services A transfer request may be sent from a plurality of instances to an instance whose resources are free. If the resources of each service are equal as in the embodiment, the resource usage rate of the own instance does not change regardless of which transfer request is accepted, but if the resources of each service are different as in the above modification, which transfer request is received. The resource usage rate of your instance changes depending on whether you accept.
そこで、本変形例では、移転制御部40の移転対象選択部405が、複数の移転元候補のインスタンスからのサービスを移転先候補のインスタンスに移転させた場合に、移転先候補のリソース使用率がより大きくなるサービスを移転対象として決定する。
図15は移転対象サービスの決定例を表す。図15(a)では、空きが50%のインスタンス50−1が移転先候補として検出され、40%のリソースを使用するサービスAと、30%のリソースを使用するサービスBとが移転対象候補のサービスとして検出されている。
Therefore, in this modification, when the transfer
FIG. 15 shows an example of determining the service to be transferred. In FIG. 15A, instance 50-1 with 50% free space is detected as a transfer destination candidate, and service A using 40% of resources and service B using 30% of resources are candidates for transfer. Detected as a service.
この場合、移転対象選択部405は、移転先候補(インスタンス50−1)の移転後のリソース使用率が80%になるサービスBよりも、そのリソース使用率が90%になるサービスAを移転対象サービスとして決定する。図15(b)では、空きが50%のインスタンス50−1が移転先候補として検出され、サービスA、Bの他に、20%のリソースを使用するサービスCが移転対象候補のサービスとして検出されている。
In this case, the transfer
この場合、移転対象選択部405は、移転先候補の移転後のリソース使用率が100%になるサービスB、Cを移転対象サービスとして決定する。このように移転要求を受け付けることで、移転先候補の移転後のリソース使用率に関係なく移転対象サービスを決定する場合に比べて、移転先候補のリソース使用率が高まることになる。
In this case, the transfer
なお、移転対象選択部405は、他の方法で移転対象サービスを決定してもよい。移転対象選択部405は、移転可能なサービス(移転対象候補のサービス)が複数ある場合、実行中の処理が他のサービスに比べて早く終わるサービスの移転先を決定する、すなわちそのサービスを移転対象サービスとして決定する。この場合、インスタンス50のコンテナ実行部52が、サービス60の状態として、そのサービス60が実行している処理の終了見込み時刻をサービス状態管理部401に通知することで、サービス状態記憶部402がその終了見込み時刻を記憶する。
The transfer
移転対象選択部405は、複数の移転対象候補のサービスの各終了見込み時刻を読み出し、その時刻が最も早いサービスを移転対象サービスとして決定する。これにより、処理の終了時期に関係なくサービスを移転させる場合に比べて、サービスの移転時期が早まるので、サービスの実行主体の特定のインスタンス50への偏りもより早く進み、停止させてもよいインスタンスもより早く生じることになる。
The transfer
[2−5]サービスの冗長化
移転対象候補のサービスの中には、他のインスタンスを用いて冗長化(ホットスタンバイ型の冗長化、コールドスタンバイ型の冗長化又はレプリケーションによる冗長化等)がなされている場合がある。その場合に、移転対象選択部405は、そのように冗長化されたサービスについては移転先を決定しなくてもよい。本変形例では、インスタンス50のコンテナ実行部52が、サービス60の状態として、そのサービス60の冗長化の有無をサービス状態管理部401に通知することで、サービス状態記憶部402がその冗長化の有無を記憶する。
[2-5] Service Redundancy Some of the services that are candidates for transfer are made redundant by using other instances (hot standby type redundancy, cold standby type redundancy, replication by replication, etc.). May be. In that case, the transfer
移転対象選択部405は、複数の移転対象候補のサービスの冗長化の有無を読み出し、冗長化がなされているサービスについては、移転対象候補から外して移転先を決定せず、冗長化がなされていないサービスについて移転先を決定する。これにより、冗長化されたサービスであっても移転先を決定して移転させる場合に比べて、その冗長化されたサービスの復旧ミスが減ることになる。
The transfer
[2−6]比較するリソース使用率
移転対象選択部405は、実施例では、移転元候補及び移転先候補について比較するリソース使用率として移転後の使用率を用いたが、現時点での使用率を用いてもよい。例えば図6A(c)の例は、移転後の使用率だとインスタンス50−1よりもインスタンス50−2の方が小さいので移転が行われなかったが、現時点での使用率であれば両インスタンスとも同じ値になるので、移転が行われる。この場合でも、サービスの実行主体(インスタンス)を固定する場合に比べれば、サービスを実行するインスタンスが少なくなり、インスタンス数単位での課金が少なくなる。
[2-6] Resource usage rate to be compared In the example, the transfer
[2−7]有効な決定方法の選択
移転対象選択部405は、複数の移転先候補から実際に移転を行う移転先を決定する方法として、実施例及び変形例で述べた複数の決定方法のいずれかを用いてもよい。複数の決定方法とは、例えば、図7で述べた移転対象のサービスが移転した後のリソース使用率が他の移転元候補よりも小さくなるインスタンスを移転元として決定する第1の方法、そのリソース使用率を求めるのに移転後の使用率を用いる代わりに現時点での使用率を用いる第2の方法、第1の方法で移転先を決定した後に図14で述べた移転先の見直しを行う第3の方法、又は、第1の方法で移転先を決定した後に移転先を見直す第4の方法である。
[2-7] Selection of Effective Determination Method The transfer
その場合に、移転対象選択部405は、それらの複数の決定方法のうち、決定した移転先にサービスを移転させたことで移転元のインスタンスが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いてもよい。本変形例では、インスタンス50のコンテナ実行部52が、自インスタンスのサービスの状態として、移転対象のサービスを停止させたときに実行しているサービスの数をサービス状態管理部401に通知することで、サービス状態記憶部402がそのサービス移転時の残りのサービスの数を記憶する。
In that case, the transfer
移転対象選択部405は、例えば、一定期間は上記の複数の決定方法を均等に用いて移転先を決定し、その際に用いた決定方法をサービス状態管理部401に通知することで、サービス状態記憶部402が通知された決定方法を前述した残りのサービスの数に対応付けて記憶する。移転対象選択部405は、その期間が過ぎると、移転先を決定する際にサービス状態記憶部402を参照し、残りのサービスの数が0になった頻度を決定方法毎に算出する。
For example, the transfer
移転対象選択部405は、算出した頻度が多い決定方法ほど優先して用いて、移転先を決定する。具体的には、例えば第1、第2、第3、第4の方法における上記頻度の比率が3:1:4:2であれば、10分の3の確率で第1の方法を用いるという具合である。頻度ではなく回数を用いる場合も同様に行えばよい。これにより、移転先の決定方法を固定する場合に比べて、より移転元のインスタンスに残るサービスが0になりやすくなるので、サービスを実行する仮想マシンが少なくなりやすくなる。
The transfer
なお、複数の決定方法として、移転対象のサービスを決定する複数の決定方法が用いられてもよい。その場合に、移転対象選択部405は、それらの複数の決定方法のうち、決定した移転対象のサービスを移転させたことで移転元のインスタンスが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いてもよい。また、複数の決定方法として、移転元のインスタンスを決定する複数の決定方法が用いられてもよい。その場合に、移転対象選択部405は、それらの複数の決定方法のうち、決定した移転元のインスタンスのサービスを移転させたことでその移転元のインスタンスが実行するサービスの数が0となった頻度又は回転が多い方法ほど優先して用いてもよい。
As a plurality of determination methods, a plurality of determination methods for determining the service to be transferred may be used. In that case, the transfer
移転対象選択部405は、それらの複数の決定方法のうち、決定した移転元のインスタンスのサービスを移転させたことで移転元のインスタンスが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いてもよい。いずれの場合も、移転先の決定方法を固定する場合に比べて、より移転元のインスタンスに残るサービスが0になりやすくなるので、サービスを実行する仮想マシンが少なくなりやすくなる。
Among those plurality of determination methods, the transfer
[2−8]移転判断のタイミング
サービス移転判断部404は、実施例では、決められた時間間隔でサービス60の移転に関する判断を行ったが、これに限らず、例えば、サービス60が処理の実行を終了したときにそのサービス60について移転に関する判断を行ってもよいし、CPU使用率又はメモリ使用率が閾値を下回ったインスタンス50があったときにそのインスタンス50で実行されているサービス60について移転に関する判断を行ってもよい。
[2-8] Timing of Transfer Judgment In the embodiment, the service
[2−9]仮想化の方式
実施例では、コンテナ型の仮想化技術により仮想マシンが実現されたが、これに限らず、例えばVMWare(登録商標)等のハイパーバイザー型の仮想化技術により仮想マシンが実現されてもよい。要するに、物理的に区分された装置(物理マシン)ではなく、論理的に区分されて1台の装置のように振る舞う仮想マシンが実現されるのであれば、どのような技術が用いられてもよい。
[2-9] Virtualization Method In the embodiment, a virtual machine is realized by a container-type virtualization technology, but the virtual machine is not limited to this, and is virtualized by a hypervisor-type virtualization technology such as VMware (registered trademark). The machine may be realized. In short, any technology may be used as long as a virtual machine that is logically divided and behaves like one device is realized instead of a physically divided device (physical machine). ..
[2−10]各機能の実現方法
図4、図5に表す各機能は、2以上の機能が統合されてもよいし、1つの機能が2以上の機能に分割されてもよい。例えば、リソース使用率算出部403が、現時点での使用率を算出する算出部と、移転後の使用率を算出する算出部とに分割されてもよい。また、サービス移転判断部404、移転対象選択部405及びサービス停止判断部406が統合されてサービスの移転に関する判断をまとめて行う判断部としてもよい。
[2-10] Method for Realizing Each Function In each function shown in FIGS. 4 and 5, two or more functions may be integrated, or one function may be divided into two or more functions. For example, the resource usage
また、実施例では、インスタンス以外の機能である第1オートスケール制御部32等も仮想マシンで実現されていたが、これらについては物理マシンで実現されてもよい。要するに、リソース提供システム1の全体で図4、図5に表す各機能と同等の機能が実現されていれば、機能のまとめ方はどのようになっていてもよい。
Further, in the embodiment, the first
[2−11]発明のカテゴリ
本発明は、サーバ装置10及びリソース管理装置20という各情報処理装置の他、それらの情報処理装置を備えるリソース提供システムという情報処理システムとしても捉えられる。また、本発明は、各装置が実施する処理を実現するための情報処理方法としても捉えられるし、各装置を制御するコンピュータを機能させるためのプログラムとしても捉えられる。このプログラムは、それを記憶させた光ディスク等の記録媒体の形態で提供されてもよいし、インターネット等の通信回線を介してコンピュータにダウンロードさせ、それをインストールして利用可能にするなどの形態で提供されてもよい。
[2-11] Category of Invention The present invention can be regarded as an information processing system called a resource providing system including the information processing devices such as the
1…リソース提供システム、10…サーバ装置、20…リソース管理装置、30…仮想マシン実現部、31…インスタンス群、32…第1オートスケール制御部、33…第2オートスケール制御部、34…リクエスト・レスポンスキュー、35…サービス定義記憶部、36…サービス管理情報記憶部、40…移転制御部、50…インスタンス、60…サービス、201…サービス管理情報表示部、401…サービス状態管理部、402…サービス状態記憶部、403…リソース使用率算出部、404…サービス移転判断部、405…移転対象選択部、406…サービス停止判断部、407…サービス移転情報記憶部。 1 ... Resource providing system, 10 ... Server device, 20 ... Resource management device, 30 ... Virtual machine realization unit, 31 ... Instance group, 32 ... 1st autoscale control unit, 33 ... 2nd autoscale control unit, 34 ... Request -Response queue, 35 ... Service definition storage unit, 36 ... Service management information storage unit, 40 ... Transfer control unit, 50 ... Instance, 60 ... Service, 201 ... Service management information display unit, 401 ... Service status management unit, 402 ... Service status storage unit, 403 ... resource usage rate calculation unit, 404 ... service transfer determination unit, 405 ... transfer target selection unit, 406 ... service stop determination unit, 407 ... service transfer information storage unit.
Claims (15)
各々が自身に割り当てられた第1リソースを用いて複数のサービスを実行する複数の仮想マシンから、1以上のサービスを実行可能な空きリソースを有する第1仮想マシンを検出する検出部と、
検出された前記第1仮想マシンのリソース使用率が、前記複数の仮想マシンのうち前記空きリソースで実行可能なサービスを実行中の第2仮想マシンのリソース使用率から定まる閾値以上である場合、前記第1仮想マシンを当該サービスの移転先として決定する決定部
として機能させるためのプログラム。 Computer,
A detector that detects a first virtual machine that has free resources capable of executing one or more services from a plurality of virtual machines that each execute a plurality of services using the first resource assigned to itself.
When the detected resource usage rate of the first virtual machine is equal to or greater than a threshold value determined from the resource usage rate of the second virtual machine running a service that can be executed by the free resource among the plurality of virtual machines, the above-mentioned A program that allows the first virtual machine to function as a decision-making unit that determines the transfer destination of the service.
請求項1に記載のプログラム。 When there are a plurality of the second virtual machines that are candidates for the transfer source of the service, the determination unit determines the second virtual machine whose resource usage rate becomes smaller than that of the other candidates for the transfer source after the transfer of the service. The program according to claim 1, which determines the transfer destination of the service to be the transfer source.
請求項1又は2に記載のプログラム。 The program according to claim 1 or 2, wherein the determination unit determines a transfer destination of a service whose processing being executed finishes earlier than other services when there are a plurality of transferable services.
請求項1から3のいずれか1項に記載のプログラム。 Claims 1 to 3 do not determine the transfer destination for the service when the service that can be executed by the free resource is made redundant by using a virtual machine different from the second virtual machine. The program described in any one of the above.
実行中の1以上のサービスに割り当てられた第2リソースの前記第1リソースに対する第1割合を前記リソース使用率として前記複数の仮想マシンのそれぞれについて算出する第1算出部と、
他の仮想マシンに移転予定のサービスを除いた前記実行中のサービスに割り当てられた第3リソースの前記第1リソースに対する第2割合を前記リソース使用率として前記複数の仮想マシンのそれぞれについて算出する第2算出部として機能させ、
前記決定部は、前記第2仮想マシンの前記第2割合から定まる閾値以上の前記第2割合が算出された前記第1仮想マシンを前記空きリソースで実行可能なサービスの移転先として決定する
請求項1から4のいずれか1項に記載のプログラム。 The computer
A first calculation unit that calculates for each of the plurality of virtual machines the first ratio of the second resource assigned to one or more running services to the first resource as the resource usage rate.
The second ratio of the third resource allocated to the running service excluding the service scheduled to be transferred to another virtual machine to the first resource is calculated as the resource usage rate for each of the plurality of virtual machines. 2 Make it function as a calculation unit
The determination unit determines the first virtual machine for which the second ratio equal to or higher than the threshold value determined from the second ratio of the second virtual machine is calculated as the transfer destination of the service that can be executed by the free resource. The program according to any one of 1 to 4.
請求項5に記載のプログラム。 When there are a plurality of the second virtual machines that are candidates for the transfer source of the service, the determination unit is the second virtual machine in which the second ratio becomes smaller than the other candidates for the transfer source after the transfer of the service. The program according to claim 5, which determines the transfer destination of the service being executed.
請求項5又は6に記載のプログラム。 When there are a plurality of the first virtual machines that are candidates for the transfer destination, the determination unit determines that the second ratio after the service is transferred to the free resource is larger than that of the other candidates for the transfer destination. The program according to claim 5 or 6, wherein the transfer destination is determined.
前記複数の仮想マシンにおけるサービスの移転履歴を記憶する記憶部として機能させ、
前記決定部は、記憶された前記移転履歴に基づいて前記閾値を変化させる
請求項1から7のいずれか1項に記載のプログラム。 The computer
It functions as a storage unit for storing the transfer history of services in the plurality of virtual machines.
The program according to any one of claims 1 to 7, wherein the determination unit changes the threshold value based on the stored transfer history.
請求項8に記載のプログラム。 The program according to claim 8, wherein the determination unit reduces the threshold value as the frequency of transfer or the number of transfers indicated by the stored transfer history of the first virtual machine decreases.
請求項8に記載のプログラム。 The program according to claim 8, wherein the determination unit reduces the threshold value as the latest transfer time indicated by the stored transfer history of the first virtual machine is older.
請求項1から10のいずれか1項に記載のプログラム。 The determination unit determines the transfer destination using any of a plurality of methods, and among the plurality of methods, the service executed by the second virtual machine by transferring the service to the determined transfer destination. The program according to any one of claims 1 to 10, which is preferentially used as the method has a frequency of 0 or a large number of times.
請求項1から11のいずれか1項に記載のプログラム。 When the resource usage rate of the first virtual machine is less than the threshold value when the processing executed by the service that can be executed by the free resource is completed, the determination unit determines another virtual machine. The program according to any one of claims 1 to 11, which is determined as the transfer destination of the service.
前記複数の仮想マシンにおけるサービスの移転履歴を記憶する記憶部と、
記憶された前記移転履歴を出力する履歴出力部として機能させる
請求項1から12のいずれか1項に記載のプログラム。 The computer
A storage unit that stores the transfer history of services in the plurality of virtual machines,
The program according to any one of claims 1 to 12, which functions as a history output unit that outputs the stored transfer history.
前記複数の仮想マシンにおけるサービスの実行状態を示す情報を出力する状態出力部として機能させる
請求項1から13のいずれか1項に記載のプログラム。 The computer
The program according to any one of claims 1 to 13, which functions as a state output unit that outputs information indicating the execution state of services in the plurality of virtual machines.
検出された前記第1仮想マシンのリソース使用率が、前記複数の仮想マシンのうち前記空きリソースで実行可能なサービスを実行中の第2仮想マシンのリソース使用率から定まる閾値以上である場合、前記第1仮想マシンを当該サービスの移転先として決定する決定部と
を備える情報処理装置。 A detector that detects a first virtual machine that has free resources capable of executing one or more services from a plurality of virtual machines that each execute a plurality of services using the first resource assigned to itself.
When the detected resource usage rate of the first virtual machine is equal to or greater than the threshold value determined from the resource usage rate of the second virtual machine running a service that can be executed by the free resource among the plurality of virtual machines, the above-mentioned An information processing device including a decision unit that determines the first virtual machine as the transfer destination of the service.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017183854A JP6939327B2 (en) | 2017-09-25 | 2017-09-25 | Programs and information processing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017183854A JP6939327B2 (en) | 2017-09-25 | 2017-09-25 | Programs and information processing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019061359A JP2019061359A (en) | 2019-04-18 |
JP6939327B2 true JP6939327B2 (en) | 2021-09-22 |
Family
ID=66176668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017183854A Active JP6939327B2 (en) | 2017-09-25 | 2017-09-25 | Programs and information processing equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6939327B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7040113B2 (en) | 2018-02-23 | 2022-03-23 | 富士フイルムビジネスイノベーション株式会社 | Programs and information processing equipment |
KR102627515B1 (en) * | 2021-08-04 | 2024-01-23 | 주식회사 이노그리드 | Timeline-based cloud data migration method and system |
CN115277710A (en) * | 2022-05-31 | 2022-11-01 | 马上消费金融股份有限公司 | Resource management method, device, electronic equipment and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4800837B2 (en) * | 2006-05-22 | 2011-10-26 | 株式会社日立製作所 | Computer system, power consumption reduction method thereof, and program thereof |
JP5435399B2 (en) * | 2009-10-07 | 2014-03-05 | 日本電気株式会社 | Power saving system, power saving method, and power saving program |
JP2011197896A (en) * | 2010-03-18 | 2011-10-06 | Hitachi Ltd | Computer system and task management method |
JP5589218B2 (en) * | 2010-04-27 | 2014-09-17 | 株式会社日立製作所 | Computer system and management computer |
JP5961402B2 (en) * | 2012-02-20 | 2016-08-02 | 株式会社日立製作所 | Computer system |
-
2017
- 2017-09-25 JP JP2017183854A patent/JP6939327B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019061359A (en) | 2019-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9996388B1 (en) | Systems and methods for managing the execution of processing jobs | |
US9612874B1 (en) | Systems and methods for managing the execution of processing jobs | |
JP6963168B2 (en) | Information processing device, memory control method and memory control program | |
JP6939327B2 (en) | Programs and information processing equipment | |
US20150277956A1 (en) | Virtual machine control method, apparatus, and medium | |
CN103309731A (en) | Processing system | |
JP2012064070A (en) | Cloud computing system, cloud computing system control method and management application | |
US10728316B2 (en) | Rolling capacity upgrade control | |
US20140289205A1 (en) | Data transfer apparatus, system, and method | |
US20100251258A1 (en) | Recording medium having load balancing program recorded thereon, load balancing apparatus and method thereof | |
JP2019057213A (en) | Adjustment program, adjustment device, and adjustment method | |
US9514072B1 (en) | Management of allocation for alias devices | |
JP6631710B2 (en) | Virtualization management program, virtualization management device, and virtualization management method | |
JP2018063470A (en) | Control apparatus and control method | |
KR20200080458A (en) | Cloud multi-cluster apparatus | |
US20140089260A1 (en) | Workload transitioning in an in-memory data grid | |
CN110413369B (en) | System and method for backup in virtualized environments | |
US10936192B2 (en) | System and method for event driven storage management | |
JP2008293278A (en) | Distributed processing program, distributed processor, and the distributed processing method | |
US11892918B2 (en) | System and method for availability group database patching | |
JP7040113B2 (en) | Programs and information processing equipment | |
US11119867B1 (en) | System and method for backup storage selection | |
JP2017107486A (en) | Processing resource control program, processing resource controller, and processing resource control method | |
US20230185632A1 (en) | Management system, data rebalancing management method, and recording medium | |
US20240103885A1 (en) | Computer system, system configuration candidate output method, and storage medium storing system configuration candidate output program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200831 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210623 |
|
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: 20210803 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210816 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6939327 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |