JP6939327B2 - Programs and information processing equipment - Google Patents

Programs and information processing equipment Download PDF

Info

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
Application number
JP2017183854A
Other languages
Japanese (ja)
Other versions
JP2019061359A (en
Inventor
道明 八木
道明 八木
泰弘 丸山
泰弘 丸山
隆之 中村
隆之 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2017183854A priority Critical patent/JP6939327B2/en
Publication of JP2019061359A publication Critical patent/JP2019061359A/en
Application granted granted Critical
Publication of JP6939327B2 publication Critical patent/JP6939327B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、プログラム及び情報処理装置に関する。 The present invention relates to a program and an information processing device.

特許文献1には、複数のサーバ間における仮想マシンの負荷情報に基づいて移行元サーバと移行対象仮想マシン、移行先サーバを決定し、動的移行の準備が完了した後の移行元サーバ及び移行先サーバの負荷情報に基づいて動的移行の実行の可否を決定する技術が開示されている。 In Patent Document 1, the migration source server, the migration target virtual machine, and the migration destination server are determined based on the load information of the virtual machines between a plurality of servers, and the migration source server and migration after the preparation for dynamic migration is completed. A technique for determining whether or not dynamic migration can be executed based on the load information of the destination server is disclosed.

特許第5549189号公報Japanese Patent No. 5549189

クラウドサービスでは、ユーザが利用する各種サービス(画像処理サービス等)を複数個同時に実行可能なインスタンスと呼ばれる仮想マシンが提供され、利用中のインスタンスの数に応じて課金されることがある。例えばサービスの実行主体であるインスタンスを固定している場合、実行中のサービスが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 claim 1 of the present invention provides a computer with free resources capable of executing one or more services from a plurality of virtual machines each executing a plurality of services using a first resource assigned to the computer. The detection unit that detects the first virtual machine and the detected resource usage rate of the first virtual machine of the second virtual machine that is executing a service that can be executed by the free resource among the plurality of virtual machines. When the value is equal to or higher than the threshold value determined from the resource usage rate, the first virtual machine is made to function as a determination unit for determining the transfer destination of the service.

本発明の請求項2に係るプログラムは、請求項1に記載の構成において、前記決定部は、サービスの移転元の候補となる前記第2仮想マシンが複数ある場合、当該サービスの移転後に前記リソース使用率が他の前記移転元の候補よりも小さくなる前記第2仮想マシンを移転元とするサービスの移転先を決定することを特徴とする。 In the configuration according to claim 1, the program according to claim 2 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 resource after the transfer of the service. It is characterized in that the transfer destination of the service whose transfer source is the second virtual machine whose usage rate is smaller than that of other candidates for the transfer source is determined.

本発明の請求項3に係るプログラムは、請求項1又は2に記載の構成において、前記決定部は、移転可能なサービスが複数ある場合、実行中の処理が他のサービスに比べて早く終わるサービスの移転先を決定することを特徴とする。 In the configuration according to claim 1 or 2, the program according to claim 3 of the present invention is a service in which, when there are a plurality of transferable services, the processing being executed is completed earlier than other services. It is characterized by determining the relocation destination of.

本発明の請求項4に係るプログラムは、請求項1から3のいずれか1項に記載の構成において、前記決定部は、前記空きリソースで実行可能なサービスが前記第2仮想マシンとは別の仮想マシンを用いて冗長化されている場合、当該サービスについては前記移転先を決定しないことを特徴とする。 In the configuration according to any one of claims 1 to 3, the program according to claim 4 of the present invention has a service in which the service that can be executed by the free resource is different from that of the second virtual machine. When the service is made redundant by using a virtual machine, the transfer destination is not determined for the service.

本発明の請求項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 claims 1 to 4, wherein the computer is assigned to one or more running services. The first calculation unit that calculates each of the plurality of virtual machines with the first ratio to the resource usage rate as the resource usage rate, and the third resource allocated to the running service excluding the service scheduled to be transferred to another virtual machine. The second ratio to the first resource is used as the resource usage rate to function as a second calculation unit for calculating each of the plurality of virtual machines, and the determination unit is determined from the second ratio of the second virtual machine. It is characterized in that the first virtual machine in which the second ratio equal to or higher than the threshold value is calculated is determined as the transfer destination of the service that can be executed by the free resource.

本発明の請求項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 claims 1 to 7. The determination unit is characterized in that the threshold value is changed based on the stored transfer history.

本発明の請求項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 claim 10 of the present invention makes the threshold value smaller as the latest transfer time indicated by the stored transfer history of the first virtual machine is older. It is characterized by that.

本発明の請求項11に係るプログラムは、請求項1から10のいずれか1項に記載の構成において、前記決定部は、複数の方法のいずれかを用いて前記移転先を決定し、前記複数の方法のうち、決定した前記移転先にサービスを移転させたことで前記第2仮想マシンが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いることを特徴とする。 In the configuration according to any one of claims 1 to 10, the program according to claim 11 of the present invention determines the transfer destination by using any one of a plurality of methods, and the plurality of determination units determine the transfer destination. Among the methods described in the above, the method in which the number of services executed by the second virtual machine becomes 0 by transferring the service to the determined transfer destination or the method having a large number of times is preferentially used. ..

本発明の請求項12に係るプログラムは、請求項1から11のいずれか1項に記載の構成において、前記決定部は、前記空きリソースで実行可能なサービスが実行していた処理が終了したときに前記第1仮想マシンの前記リソース使用率が前記閾値未満になっていた場合、他の仮想マシンを当該サービスの移転先として決定することを特徴とする。 In the configuration according to any one of claims 1 to 11, the program according to claim 12 of the present invention has the determination unit when the process executed by the service that can be executed by the free resource is completed. When the resource usage rate of the first virtual machine is less than the threshold value, another virtual machine is determined as the transfer destination of the service.

本発明の請求項13に係るプログラムは、請求項1から12のいずれか1項に記載の構成において、前記コンピュータを、前記複数の仮想マシンにおけるサービスの移転履歴を記憶する記憶部と、記憶された前記移転履歴を出力する履歴出力部として機能させることを特徴とする。 The program according to claim 13 of the present invention stores the computer 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 claims 1 to 12. It is characterized in that it functions as a history output unit that outputs the transfer history.

本発明の請求項14に係るプログラムは、請求項1から13のいずれか1項に記載の構成において、前記コンピュータを、前記複数の仮想マシンにおけるサービスの実行状態を示す情報を出力する状態出力部として機能させることを特徴とする。 The program according to claim 14 of the present invention is a state output unit that outputs information indicating an execution state of a service in the plurality of virtual machines to the computer in the configuration according to any one of claims 1 to 13. It is characterized by functioning as.

本発明の請求項15に係る情報処理装置は、各々が自身に割り当てられた第1リソースを用いて複数のサービスを実行する複数の仮想マシンから、1以上のサービスを実行可能な空きリソースを有する第1仮想マシンを検出する検出部と、検出された前記第1仮想マシンのリソース使用率が、前記複数の仮想マシンのうち前記空きリソースで実行可能なサービスを実行中の第2仮想マシンのリソース使用率から定まる閾値以上である場合、前記第1仮想マシンを当該サービスの移転先として決定する決定部とを備えることを特徴とする。 The information processing device according to claim 15 of the present invention has a free resource capable of executing one or more services from a plurality of virtual machines, each of which executes a plurality of services using a first resource assigned to the device. The resource usage of the detection unit that detects the first virtual machine and the detected resource usage rate of the first virtual machine are the resources of the second virtual machine that is executing the service that can be executed by the free resource among the plurality of virtual machines. When the value is equal to or higher than the threshold value determined from the usage rate, the first virtual machine is provided with a determination unit for determining the transfer destination of the service.

請求項1、5、15に係る発明によれば、サービスの実行主体を固定する場合に比べて、サービスを実行する仮想マシンを少なくすることができる。
請求項2、6に係る発明によれば、他の仮想マシンを移転元にする場合に比べて、リソースの空きを特定の仮想マシンに偏らせることができる。
請求項3に係る発明によれば、処理の終了時期に関係なくサービスを移転させる場合に比べて、サービスの移転時期を早めることができる。
請求項4に係る発明によれば、冗長化されたサービスの移転先を決定する場合に比べて、そのサービスの復旧ミスを減らすことができる。
請求項7に係る発明によれば、他の仮想マシンを移転先にする場合に比べて、特定の仮想マシンにサービスを偏らせることができる。
請求項8に係る発明によれば、閾値が固定である場合に比べて移転したサービスが移転先に定着しやすいようにすることができる。
請求項9に係る発明によれば、移転の頻度又は回数が多い仮想マシンを移転先にする場合に比べて移転したサービスが移転先に定着しやすいようにすることができる。
請求項10に係る発明によれば、最新の移転時期が新しい仮想マシンを移転先にする場合に比べて移転したサービスが移転先に定着しやすいようにすることができる。
請求項11に係る発明によれば、移転先の決定方法を固定する場合に比べて、サービスを実行する仮想マシンを少なくすることができる。
請求項12に係る発明によれば、移転先を見直さない場合に比べて、移転先として適当でなくなったインスタンスへのサービスの移転を抑制することができる。
請求項13に係る発明によれば、各仮想マシンにおける過去の移転の経緯を把握することができる。
請求項14に係る発明によれば、サービスの実行状態から移転状況を把握することができる。
According to the inventions according to claims 1, 5 and 15, the number of virtual machines that execute the service can be reduced as compared with the case where the execution subject of the service is fixed.
According to the inventions of claims 2 and 6, the free resource can be biased to a specific virtual machine as compared with the case where another virtual machine is used as the transfer source.
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 claim 10, it is possible to make it easier for the transferred service to settle in the relocation destination as compared with the case where the latest relocation time is the new virtual machine as the relocation destination.
According to the invention of claim 11, the number of virtual machines that execute the service can be reduced as compared with the case where the method of determining the transfer destination is fixed.
According to the invention of claim 12, the transfer of the service to the instance that is no longer suitable as the transfer destination can be suppressed as compared with the case where the transfer destination is not reviewed.
According to the invention of claim 13, the history of past relocation in each virtual machine can be grasped.
According to the invention of claim 14, the transfer status can be grasped from the execution state of the service.

実施例に係るリソース提供システムの全体構成を表す図Diagram showing the overall configuration of the resource provision system according to the embodiment サーバ装置のハードウェア構成を表す図Diagram showing the hardware configuration of the server device リソース管理装置のハードウェア構成を表す図Diagram showing the hardware configuration of the resource management device リソース提供システムが実現する機能構成を表す図Diagram showing the functional configuration realized by the resource provision system リソース提供システムが実現する機能構成を表す図Diagram showing the functional configuration realized by the resource provision system 移転先の決定例を表す図Diagram showing an example of determining the relocation destination 移転先の決定例を表す図Diagram showing an example of determining the relocation destination 複数の移転元候補の例を表す図Diagram showing examples of multiple transfer source candidates 複数の移転先候補の例を表す図Diagram showing examples of multiple transfer destination candidates 移転処理における各装置の動作手順の一例を表す図The figure which shows an example of the operation procedure of each device in the transfer process. 閾値テーブルの一例を表す図Diagram showing an example of a threshold table 移転先の決定結果の例を表す図Diagram showing an example of the decision result of the relocation destination 閾値テーブルの別の一例を表す図Diagram showing another example of a threshold table 閾値テーブルの別の一例を表す図Diagram showing another example of a threshold table 変形例の移転処理における各装置の動作手順の一例を表す図The figure which shows an example of the operation procedure of each apparatus in the transfer process of a modification 移転対象サービスの決定例を表す図Diagram showing a decision example of the service to be transferred

[1]実施例
図1は実施例に係るリソース提供システム1の全体構成を表す。リソース提供システム1は、処理(情報処理)の実行に用いられるリソースをユーザに使用させるリソース提供サービスを実施するためのシステムである。ここでいうリソースには、CPU(Central Processing Unit)、メモリ、ストレージ、それらを備える物理的な装置及びそれらによって実現される仮想的な装置(いわゆる仮想マシン)等がある。
[1] Example FIG. 1 shows the overall configuration of the resource providing system 1 according to the embodiment. The resource providing system 1 is a system for implementing a resource providing service that allows a user to use resources used for executing processing (information processing). The resources referred to here include a CPU (Central Processing Unit), memory, storage, a physical device including them, and a virtual device (so-called virtual machine) realized by them.

また、リソース提供システム1においては、ユーザが利用する各種サービス(OCR(Optical Character Recognition)サービス及び文章を翻訳する翻訳サービス等)を複数個同時に実行可能なインスタンスと呼ばれる仮想マシンがリソースとして提供される。本実施例では、ユーザに対しては、利用中のインスタンスの数に応じた課金が行われるものとする。 Further, in the resource providing system 1, a virtual machine called an instance capable of simultaneously executing a plurality of various services (OCR (Optical Character Recognition) service, translation service for translating sentences, etc.) used by the user is provided as a resource. .. In this embodiment, the user is charged according to the number of instances in use.

リソース提供システム1は、通信回線2と、ユーザ端末3と、クラウドシステム4と、リソース管理装置20とを備える。通信回線2は、例えばインターネット、移動体通信網及び電話回線等を含み、自回線に接続されている装置同士の通信を仲介する。通信回線2には、ユーザ端末3及びクラウドシステム4が接続されている。 The resource providing system 1 includes a communication line 2, a user terminal 3, a cloud system 4, and a resource management device 20. The communication line 2 includes, for example, the Internet, a mobile communication network, a telephone line, and the like, and mediates communication between devices connected to the own line. The user terminal 3 and the cloud system 4 are connected to the communication line 2.

ユーザ端末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 server devices 10 that are resources for executing processing, and uses those resources to execute the service requested by the user terminal 3. Each server device 10 realizes the above-mentioned instance. The resource management device 20 is a device for the administrator of the resource providing system 1 to manage the operating status of the resource, and in this embodiment, the execution status of the service in each instance and its history are displayed.

図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 server device 10. The server device 10 is a computer including a CPU 11, a RAM (Random Access Memory) 12, a ROM (Read Only Memory) 13, a communication unit 14, and a storage 15. The CPU 11 controls the operation of each part by executing a program stored in the ROM 13 or the storage 15 using the RAM 12 which is a memory as a work area. The communication unit 14 has a communication circuit or the like, and communicates with an external device via the communication line 2. The storage 15 is a storage means such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), and a flash memory, and stores data and programs used by the CPU 11 for control.

図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 resource management device 20. The resource management device 20 is a computer including a CPU 21, a RAM 22, a ROM 23, a communication unit 24, a storage 25, and a UI unit 26 (User Interface). The CPU 21 to the storage 25 are the same hardware as the hardware of the same name shown in FIG. The UI unit 26 includes display means such as a liquid crystal display, and displays a menu screen or the like for operating the own device. In addition, the UI unit 26 includes input means such as a keyboard and a mouse.

リソース提供システム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 resource providing system 1 executing a program to control each unit.
4 and 5 show the functional configuration realized by the resource providing system 1. Although only one server device 10 is shown in FIG. 4, each server device 10 has a virtual machine realization unit 30, an instance group 31, a first autoscale control unit 32, and a second autoscale control. A unit 33, a request / response queue 34, a service definition storage unit 35, a service management information storage unit 36, and a transfer control unit 40 are provided.

図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 transfer control unit 40 includes a service status management unit 401, a service status storage unit 402, a resource usage rate calculation unit 403, a service transfer determination unit 404, a transfer target selection unit 405, and a service. It includes a stop determination unit 406 and a service transfer information storage unit 407. The resource management device 20 includes a service management information display unit 201. The instance group 31 includes a plurality of instances such as instance 50-1, instance 50-2, and instance 50-3. Hereinafter, when they are not distinguished, they are referred to as "instance 50".

インスタンス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 machine realization unit 30 is a function of realizing a virtual machine, and in this embodiment, a virtual machine using a container-type virtualization technology is realized. The virtual machine realization unit 30 is realized by, for example, Docker (registered trademark), but is not limited to this, and may be realized by other container-type virtualization programs. In the example of FIG. 4, the virtual machine realization unit 30 also realizes the first autoscale control unit 32, the transfer control unit 40, and the like, which are functions other than the instances, in addition to each instance such as the instance 50-1.

コンテナ制御要求受付部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 resource providing system 1, each instance 50 and each service 60 are identified by their respective identification information (instance ID (Identification), service ID). In the following, it is assumed that the information regarding each instance 50 and each service 60 is always given the identification information thereof, so that the information of which instance 50 and service 60 can be known.

リクエスト・レスポンスキュー34は、図1に表すユーザ端末3からのサービス60へのリクエスト及びそのリクエストに対するサービス60からのレスポンスをキュー(先入れ先出しのデータ)として取り扱う。サービス60は、リクエスト・レスポンスキュー34からリクエストを示すメッセージを受け取り、そのメッセージで指定された処理を実行し、処理結果を示すメッセージをレスポンスとしてリクエスト・レスポンスキュー34に格納する。 The request / response queue 34 handles a request to the service 60 from the user terminal 3 shown in FIG. 1 and a response from the service 60 to the request as a queue (first-in first-out data). The service 60 receives a message indicating a request from the request / response queue 34, executes the process specified by the message, and stores the message indicating the process result as a response in the request / response queue 34.

コンテナ制御部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 definition storage unit 35. The service definition information is information indicating programs, data, parameters, resources used, and the like used in the service 60.

移転制御部40は、サービス60の移転に関する動作を制御する機能であり、各インスタンス50とは独立して動作する。インスタンス群31においては、インスタンス間でサービス60が移転される。サービス60の移転とは、本実施例では、移転元のインスタンスで実行されているサービス60を移転先のインスタンスで実行させ、移転元のインスタンスで実行されていたサービス60を停止させることをいう。 The transfer control unit 40 is a function of controlling the operation related to the transfer of the service 60, and operates independently of each instance 50. In the instance group 31, the service 60 is transferred between the instances. In the present embodiment, the transfer of the service 60 means that the service 60 executed in the transfer source instance is executed in the transfer destination instance, and the service 60 executed in the transfer source instance is stopped.

移転制御部40のサービス状態管理部401は、各インスタンス50のコンテナ実行部52におけるサービス60の状態を取得して管理する。サービス60の状態には、作成中、実行中、移転準備中の3つの状態が含まれる。「作成中」は、コンテナ実行部52がサービス60の実行環境を作成している途中であることを意味し、作成中のサービス60は処理を実行することができない状態である。 The service status management unit 401 of the transfer control unit 40 acquires and manages the status of the service 60 in the container execution unit 52 of each instance 50. The state of service 60 includes three states of being created, being executed, and being prepared for relocation. “Creating” means that the container execution unit 52 is in the process of creating the execution environment of the service 60, and the service 60 being created cannot execute the process.

「実行中」は、サービス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 transfer control unit 40 stops the service 60 at the transfer source as will be described later. In this way, the transfer is completed when the service 60 of the transfer source is stopped.

「移転準備中」は、他のインスタンスに移転予定であり、その移転先のインスタンスで同一のサービス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 status management unit 401 is notified to that effect via the container control unit 53 and the container control request reception unit 51. Upon receiving this notification, the service status management unit 401 stores the status of the service 60 in the service status storage unit 402, and updates the status if the status of the service 60 is already stored. In this way, the service state storage unit 402 stores the state of the service 60 of each instance 50.

リソース使用率算出部403は、各インスタンス50のリソース使用率を算出する。インスタンス50のリソース使用率とは、そのインスタンス50に割り当てられているリソースのうち、そのインスタンス50で実行されているサービス60に割り当てられているリソースの割合をいう。リソース使用率算出部403は、現時点での使用率と、移転後の使用率とをリソース使用率として算出する。 The resource usage rate calculation unit 403 calculates the resource usage rate of each instance 50. The resource usage rate of the instance 50 means the ratio of the resources allocated to the service 60 running on the instance 50 among the resources allocated to the instance 50. The resource usage rate calculation unit 403 calculates the current usage rate and the usage rate after the transfer as the resource usage rate.

現時点での使用率は、インスタンス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 rate calculation unit 403 acquires information indicating the status of the service 60 in each instance 50 from the service status management unit 401.

リソース使用率算出部403は、これら3つの状態のサービス60に割り当てられたリソース(以下「第2リソース」という)の、インスタンス50に割り当てられたリソース(以下「第1リソース」という)に対する割合(以下「第1割合」という)を現時点での使用率として、複数のインスタンス50のそれぞれについて算出する。この第1割合を算出するリソース使用率算出部403は本発明の「第1算出部」の一例である。 The resource usage rate calculation unit 403 determines the ratio (hereinafter referred to as “first resource”) of the resources allocated to the service 60 in these three states (hereinafter referred to as “second resource”) to the resources allocated to the instance 50 (hereinafter referred to as “first resource”). (Hereinafter referred to as "first ratio") is used as the current usage rate, and is calculated for each of the plurality of instances 50. The resource usage rate calculation unit 403 for calculating the first ratio is an example of the “first calculation unit” of the present invention.

インスタンス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 rate calculation unit 403 determines the ratio (hereinafter referred to as “third resource”) of the resource allocated to the service 60 that is expected to be executed after the transfer to the first resource (resource allocated to the instance). (Hereinafter referred to as "second ratio") is used as the usage rate after the transfer, and is calculated for each of the plurality of instances 50. The resource usage rate calculation unit 403 for calculating the second ratio is an example of the “second calculation unit” of the present invention.

リソース使用率算出部403は、サービス移転判断部404からリソース使用率の算出を指示されたときに、サービス状態記憶部402から各インスタンス50のサービスの状態を読み出してリソース使用率を算出する。リソース使用率算出部403は、算出したインスタンス50のリソース使用率をサービス移転判断部404に供給する。 When the service transfer determination unit 404 instructs the resource usage rate calculation unit 403 to calculate the resource usage rate, the resource usage rate calculation unit 403 reads the service status of each instance 50 from the service status storage unit 402 and calculates the resource usage rate. The resource usage rate calculation unit 403 supplies the calculated resource usage rate of the instance 50 to the service transfer determination unit 404.

サービス移転判断部404は、サービス60の移転に関する判断を行う。サービス移転判断部404は、本実施例では、決められた時間間隔でこの判断を行う。サービス移転判断部404は、この時間間隔が経過すると、前述したようにリソース使用率算出部403にリソース使用率の算出を指示して各インスタンス50のリソース使用率(現時点での使用率及び移転後の使用率)を取得する。 The service transfer determination unit 404 makes a determination regarding the transfer of the service 60. In this embodiment, the service transfer determination unit 404 makes this determination at a predetermined time interval. When this time interval elapses, the service transfer determination unit 404 instructs the resource usage rate calculation unit 403 to calculate the resource usage rate as described above, and the resource usage rate of each instance 50 (current usage rate and after transfer). Usage rate).

サービス移転判断部404は、取得したリソース使用率に基づいて、まず、複数のインスタンス50(各々が自身に割り当てられたリソースを用いて複数のサービスを実行する複数の仮想マシン)から、1以上のサービスを実行可能な空きリソースを有するインスタンス50を、移転先候補として検出する。サービス移転判断部404は本発明の「検出部」の一例である。 Based on the acquired resource usage rate, the service transfer determination unit 404 first, from a plurality of instances 50 (a plurality of virtual machines each executing a plurality of services using the resources assigned to itself), one or more. Instance 50 having free resources that can execute the service is detected as a transfer destination candidate. The service transfer determination unit 404 is an example of the "detection unit" of the present invention.

以下では、説明を分かり易くするため、各インスタンス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 transfer determination unit 404 uses, for example, at least one service 60 when the acquired current usage rate is the usage rate when executing two or less services 60 (that is, 66.6% or less). Since there are enough free resources to execute, the instance 50 is detected as a transfer destination candidate.

また、サービス移転判断部404は、サービス状態記憶部402から各インスタンス50のサービス60の状態を取得して、取得した状態に基づいて移転対象候補となるサービス60(実際に移転させる対象となるサービス60の候補)を検出する。サービス移転判断部404は、本実施例では、「実行中」の状態になっているサービス60のうち、処理を実行していないサービス60(つまり処理を終了した状態になっているサービス60)を移転対象候補として検出する。 Further, the service transfer determination unit 404 acquires the status of the service 60 of each instance 50 from the service status storage unit 402, and based on the acquired status, the service 60 that is a candidate for transfer (the service that is actually transferred). 60 candidates) are detected. In this embodiment, the service transfer determination unit 404 selects the service 60 that has not executed the process (that is, the service 60 that has finished the process) among the services 60 that are in the “executing” state. Detect as a candidate for transfer.

また、サービス移転判断部404は、検出した移転対象候補のサービス60を実行しているインスタンス50を移転元候補として検出する。サービス移転判断部404は、こうして検出した移転対象候補、移転元候補及び移転先候補を示す識別情報を、取得したリソース使用率(現時点での使用率及び移転後の使用率)を移転対象選択部405に供給する。移転対象選択部405は、供給された識別情報が示す移転対象候補、移転元候補及び移転先候補から、実際に移転させる対象となるものを選択する。 Further, the service transfer determination unit 404 detects the instance 50 executing the detected service 60 of the transfer target candidate as the transfer source candidate. The service transfer determination unit 404 uses the resource usage rate (current usage rate and post-relocation usage rate) obtained from the identification information indicating the transfer target candidate, transfer source candidate, and transfer destination candidate detected in this way as the transfer target selection unit. Supply to 405. The transfer target selection unit 405 selects the transfer target candidate, the transfer source candidate, and the transfer destination candidate indicated by the supplied identification information to be actually transferred.

移転対象選択部405は、検出されたインスタンス50(移転先候補)のリソース使用率が、複数のインスタンス50のうちその移転先候補の空きリソースで実行可能なサービス60(移転対象候補)を実行中のインスタンス50(移転元候補)のリソース使用率から定まる閾値以上である場合、その移転先候補をその移転対象候補の移転先として決定する。移転対象選択部405は本発明の「決定部」の一例である。 The transfer target selection unit 405 is executing the service 60 (transfer target candidate) whose resource usage rate of the detected instance 50 (transfer destination candidate) can be executed by the free resource of the transfer destination candidate among the plurality of instances 50. If it is equal to or more than the threshold value determined from the resource usage rate of the instance 50 (transfer source candidate) of the above, the transfer destination candidate is determined as the transfer destination of the transfer target candidate. The transfer target selection unit 405 is an example of the “decision unit” of the present invention.

本実施例では、サービス移転判断部404は、比較するリソース使用率として移転後の使用率を用い、閾値として移転元候補の移転後の使用率を用いる。つまり、サービス移転判断部404は、移転元候補の移転後の使用率(本実施例における閾値)以上の移転後の使用率が算出された移転先候補を移転先として決定する。移転先の決定方法について図6A、図6Bを参照して説明する。 In this embodiment, the service transfer determination unit 404 uses the usage rate after transfer as the resource usage rate to be compared, and uses the usage rate after transfer of the transfer source candidate as the threshold value. That is, the service transfer determination unit 404 determines the transfer destination candidate for which the usage rate after the transfer (threshold value in this embodiment) or more after the transfer of the transfer source candidate is calculated is calculated as the transfer destination. The method of determining the relocation destination will be described with reference to FIGS. 6A and 6B.

図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 transfer determination unit 404 detects the service 61-3 in the processed end state as a transfer target candidate, and detects the instance 50-1 that executes the service 61-3 as a transfer source candidate, but the instance 50. -2 does not detect instance 50-2 as a transfer destination candidate because there is no free resource capable of executing service 61-3. Therefore, service 61-3 is not transferred to instance 50-2.

図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 transfer determination unit 404 detects as a transfer destination candidate because the instance 50-2 has a free resource capable of executing the service 61-3. In the transfer target selection unit 405, the usage rate (66.6.%) After the transfer of the transfer destination candidate (instance 50-2) is the post-relocation usage rate (66.6) of the transfer source candidate (instance 50-1). ..%) or more, so instance 50-2 is decided as the transfer destination.

このように、本実施例では、移転後の使用率が同じインスタンス同士でもどちらかにサービスが寄せられることになる。こうしてサービスの実行主体を特定のインスタンス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 transfer determination unit 404 detects the instance 50-2 as a transfer destination candidate because the current usage rate of the instance 50-2 indicates a vacancy for executing the service 61-3. However, the post-relocation usage rate (33.3%) of the transfer destination candidate (instance 50-2) is less than the post-relocation usage rate (66.6 ...%) of the transfer source candidate (instance 50-1). Therefore, the transfer target selection unit 405 does not determine the instance 50-2 as the transfer destination.

図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 target selection unit 405 determines the instance 50-2, which is the transfer destination candidate, as the transfer destination.

図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 target selection unit 405 does not determine the transfer destination candidate instance 50-2 as the transfer destination.

図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 transfer determination unit 404 does not detect the instance 50-2 as a transfer destination candidate.

なお、図6B(f)の場合にも移転が行われるように、サービス移転判断部404は、移転後の使用率が示す空きリソースで移転対象候補のサービス60を実行可能なインスタンス50−2を移転先候補として検出するようにしてもよい。そうすれば、図6B(f)の場合でも、サービス移転判断部404がインスタンス50−2を移転先候補として検出し、移転対象選択部405がインスタンス50−2を移転先として決定することになる。 As in the case of FIG. 6B (f), the service transfer determination unit 404 provides an instance 50-2 capable of executing the service 60 of the transfer target candidate with the free resources indicated by the usage rate after the transfer. It may be detected as a relocation destination candidate. Then, even in the case of FIG. 6B (f), the service transfer determination unit 404 detects the instance 50-2 as the transfer destination candidate, and the transfer target selection unit 405 determines the instance 50-2 as the transfer destination. ..

移転元候補及び移転先候補はそれぞれ複数検出される場合がある。それらの場合の移転先の決定方法について説明する。まず、移転対象選択部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 target selection unit 405, when there are a plurality of instances 50 as transfer source candidates, the resource usage rate after the transfer target service 60 is transferred is smaller than that of other transfer source candidates (that is, the resource usage rate). The instance 50 (which is the smallest) is determined as the transfer source, and the transfer destination of the service 60 to be transferred with the instance 50 as the transfer source is determined.

図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 target selection unit 405 determines the value obtained by subtracting the resource usage rate by the transfer target service 60 from the post-relocation usage rate calculated by the resource usage rate calculation unit 403, and the resource after the transfer target service 60 is transferred. Used as usage rate. In the example of FIG. 7A, the resource usage rate of the instance 50-1 is 33.3 ...%, and the resource usage rate of the instance 50-2 is 66.6 ...%. Therefore, the transfer target selection unit 405 Determines the instance 50-1 with the smaller resource utilization as the transfer source.

図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 target selection unit 405 has a higher resource usage rate. Determine the smaller instance 50-2 as the transfer source. By determining the transfer source in this way, the free space of resources is biased to the specific instance 50 as compared with the case where another instance 50 is determined as the transfer source. As a result, the instance 50 in which the service to be executed becomes 0 is likely to occur, and the instance 50 is likely to be stopped.

移転対象選択部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 target selection unit 405 determines that the resource usage rate after the service 60 to be transferred is transferred to the free resources is another candidate for the transfer destination. Instance 50, which is larger than (that is, has the highest resource utilization), is determined as the transfer destination.
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 target selection unit 405 adds the value obtained by adding the resource usage rate by the transfer target service 60 to the post-relocation usage rate calculated by the resource usage rate calculation unit 403, and the resource after the transfer target service 60 is transferred. Used as usage rate. In the example of FIG. 8A, the resource usage rate of instance 50-1 is 33.3 ...% (utilization rate after relocation) + 33.3 ...% (resource usage rate by service 60) = 66.6.・ ・%, And the resource usage rate of instance 50-2 is 66.6 ・ ・% (utilization rate after relocation) + 33.3 ・ ・% (resource usage rate by service 60) = 100%, so relocation The target selection unit 405 determines the instance 50-2 having the larger resource usage rate as the transfer destination.

図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 target selection unit 405 uses the instance 50-1 with the larger resource usage rate as the transfer destination. decide.

このように移転先を決定することで、他のインスタンス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 target selection unit 405 determines the transfer destination of the service 60, the transfer target selection unit 405 requests the placement of the service 60 to be transferred to the container control request reception unit 51 of the instance of the transfer destination. By this request, the execution environment of the same service 60 as the service 60 to be transferred is created in the instance 50 of the transfer destination as described above (for example, if the transfer target is an OCR service, the execution environment of the OCR service is also created at the transfer destination). Further, the transfer target selection unit 405 supplies the identification information of the determined transfer destination instance 50, the transfer source instance 50, and the transfer target service 60 to the service stop determination unit 406.

サービス停止判断部406は、受け取った識別情報が示す移転先のインスタンス50のコンテナ制御要求受付部51に移転対象のサービス60の状態を問い合わせる。サービス停止判断部406は、移転対象のサービス60の状態が作成中から実行中になった場合、受け取った識別情報が示す移転元のインスタンス50のコンテナ制御要求受付部51にその移転対象のサービス60の停止を依頼する。移転元のコンテナ制御部53がこの依頼に基づきサービス60を停止すると、移転が完了する。 The service stop determination unit 406 inquires the container control request reception unit 51 of the transfer destination instance 50 indicated by the received identification information about the status of the service 60 to be transferred. When the status of the service 60 to be transferred changes from being created to being executed, the service stop determination unit 406 sends the service 60 to be transferred to the container control request receiving unit 51 of the instance 50 of the transfer source indicated by the received identification information. Request to stop. When the container control unit 53 of the transfer source stops the service 60 based on this request, the transfer is completed.

サービス停止判断部406は、移転が完了すると、サービス60の移転に関する情報(サービス移転情報)として、例えば供給された移転先のインスタンス50、移転元のインスタンス50及び移転対象のサービス60の識別情報と、移転が完了した時刻を示す時刻情報とをサービス移転情報記憶部407に供給する。サービス移転情報記憶部407は、サービス停止判断部406から供給されたサービス移転情報を記憶する。サービス移転情報記憶部407は、記憶したサービス移転情報をサービス管理情報記憶部36に供給する。 When the transfer is completed, the service suspension determination unit 406 provides information regarding the transfer of the service 60 (service transfer information), for example, the supplied instance 50 of the transfer destination, the instance 50 of the transfer source, and the identification information of the service 60 to be transferred. , The time information indicating the time when the transfer is completed is supplied to the service transfer information storage unit 407. The service transfer information storage unit 407 stores the service transfer information supplied from the service stop determination unit 406. The service transfer information storage unit 407 supplies the stored service transfer information to the service management information storage unit 36.

サービス管理情報記憶部36は、供給されたサービス移転情報を蓄積して、複数のインスタンス50におけるサービス60の移転履歴として記憶する。また、サービス管理情報記憶部36は、サービス状態記憶部402から、複数のインスタンス50におけるサービス60の実行状態(作成中、実行中、移転準備中)を示す実行状態情報を取得して記憶する。 The service management information storage unit 36 accumulates the supplied service transfer information and stores it as a transfer history of the service 60 in the plurality of instances 50. Further, the service management information storage unit 36 acquires and stores execution status information indicating the execution status (creating, executing, relocation preparation) of the service 60 in the plurality of instances 50 from the service status storage unit 402.

また、サービス管理情報記憶部36は、リソース使用率算出部403から、複数のインスタンス50におけるリソース使用率(現時点での使用率及び移転後の使用率)を示す使用率情報を取得して記憶する。サービス管理情報記憶部36は本発明の「記憶部」の一例である。なお、サービス管理情報記憶部36への移転履歴、実行状態情報及び使用率情報の供給は、サービス管理情報記憶部36から要求するプル型で行われてもよいし、供給元が能動的に供給してくるプッシュ型で行われてもよい。 Further, the service management information storage unit 36 acquires and stores usage rate information indicating the resource usage rate (current usage rate and usage rate after transfer) in the plurality of instances 50 from the resource usage rate calculation unit 403. .. The service management information storage unit 36 is an example of the "storage unit" of the present invention. The transfer history, execution status information, and usage rate information to the service management information storage unit 36 may be supplied by the pull type requested by the service management information storage unit 36, or the supply source actively supplies the information. It may be done by the push type that comes.

リソース管理装置20のサービス管理情報表示部201は、サービス管理情報記憶部36に記憶されたサービス管理情報を表示する。例えば、リソース提供システム1の管理者がサービス60の移転履歴を表示させる操作を行うと、サービス管理情報表示部201は、サービス管理情報記憶部36からサービス60の移転履歴を取得して表示する。この場合のサービス管理情報記憶部36は、記憶している複数のインスタンス50におけるサービス60の移転履歴を表示手段であるサービス管理情報表示部201に出力する機能であり、本発明の「履歴出力部」の一例である。このように複数のインスタンスにおけるサービスの移転履歴が出力されることで、各インスタンスにおける過去の移転の経緯が把握される。 The service management information display unit 201 of the resource management device 20 displays the service management information stored in the service management information storage unit 36. For example, when the administrator of the resource providing system 1 performs an operation to display the transfer history of the service 60, the service management information display unit 201 acquires and displays the transfer history of the service 60 from the service management information storage unit 36. In this case, the service management information storage unit 36 is a function of outputting the transfer history of the service 60 in the plurality of stored instances 50 to the service management information display unit 201, which is a display means, and is the "history output unit" of the present invention. Is an example. By outputting the service transfer history in a plurality of instances in this way, the history of past transfer in each instance can be grasped.

また、管理者が全て又は一部のインスタンス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 information display unit 201 is designated by the service management information storage unit 36. Acquires and displays the execution status information of the instance 50. In this case, the service management information storage unit 36 is a function of outputting the execution status information of the plurality of stored instances 50 to the service management information display unit 201 which is a display means, and is a function of the "state output unit" of the present invention. This is an example.

実行状態情報が出力されることで、サービスの実行状態から移転状況が把握されることになる。例えばサービスの状態が実行中から変化しないインスタンスは移転で出入りするサービスが少なく、移転準備中の状態が多いインスタンスは移転で出入りするサービスが多いことが把握される。 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 information display unit 201 changes to the service management information storage unit. The usage rate information of the instance 50 specified from 36 is acquired, and the resource usage rate indicated by the usage rate information is displayed. As a result, the transfer status can be grasped from the resource usage rate. For example, it can be seen that an instance whose resource usage rate is maintained at a high value has few services that go in and out due to relocation, and an instance whose resource usage rate changes at a low value has many services that go in and out due to relocation.

第1オートスケール制御部32は、定められたルールに則り、インスタンスのスケールイン及びスケールアウトを制御する。スケールインとは仮想マシンの台数を減らすことをいい、スケールアウトとは仮想マシンの台数を増やすことをいう。本実施例では、例えばインスタンス50−1のサービス停止判断部406が、コンテナ実行部52−1が実行していたサービス60を全て停止すると、その旨を第1オートスケール制御部32に通知する。 The first autoscale control unit 32 controls the scale-in and scale-out of the instance according to the defined rule. Scale-in means reducing the number of virtual machines, and scale-out means increasing the number of virtual machines. In this embodiment, for example, when the service stop determination unit 406 of the instance 50-1 stops all the services 60 executed by the container execution unit 52-1, the first autoscale control unit 32 is notified to that effect.

第1オートスケール制御部32は、コンテナ実行部52−1により実行されるサービス60の数が0になった(実行していたサービス60が全て停止された)インスタンス50をスケールインの対象と判定して停止させる制御を行う。こうしてインスタンス50が停止すると、本実施例における課金(利用中のインスタンスの数に応じた課金)の対象ではなくなる。 The first autoscale control unit 32 determines that the instance 50 in which the number of services 60 executed by the container execution unit 52-1 has become 0 (all the services 60 that have been executed have been stopped) is the target of scale-in. And control to stop. When the instance 50 is stopped in this way, it is no longer subject to billing (billing according to the number of instances in use) in this embodiment.

なお、第1オートスケール制御部32は、これ以外にも、例えばリクエスト・レスポンスキュー34に格納されたキューの状況に基づいてスケールイン及びスケールアウトの判定を行ってもよい。第2オートスケール制御部33は、定められたルールに則り、サービス60のスケールイン及びスケールアウトを制御する。第2オートスケール制御部33は、コンテナ制御要求受付部51に対して、スケールインを行う際はサービス60の停止を依頼し、スケールアウトを行う際はサービス60の配置を依頼する。 In addition to this, the first autoscale control unit 32 may determine scale-in and scale-out based on, for example, the status of the queue stored in the request / response queue 34. The second autoscale control unit 33 controls the scale-in and scale-out of the service 60 according to a predetermined rule. The second autoscale control unit 33 requests the container control request reception unit 51 to stop the service 60 when performing scale-in, and requests the placement of service 60 when performing scale-out.

リソース提供システム1が備える各装置は、上記の構成に基づいて、インスタンス間でサービスを移転させる移転処理を行う。
図9は移転処理における各装置の動作手順の一例を表す。図9では、インスタンス50−1及び50−2だけを表しているが、他にもインスタンス50が存在するものとする。まず、インスタンス50が、サービス状態の変更又はサービスの停止を行うと(ステップS11、S12)、その旨を移転制御部40に通知し(ステップS13、S14)、第1オートスケール制御部32にも通知する(ステップS15、S16)。
Each device included in the resource providing system 1 performs a transfer process for transferring services between instances based on the above configuration.
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 transfer control unit 40 is notified to that effect (steps S13 and S14), and the first autoscale control unit 32 is also notified. Notify (steps S15, S16).

移転制御部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 transfer control unit 40 of the status of the inquired service (step S34). The transfer control unit 40 (service stop determination unit 406) determines whether or not the execution environment is completed (step S35), and if it determines that the execution environment is not completed (NO), returns to step S33 (inquiry) and operates. I do.

移転制御部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 autoscale control unit 32 to that effect (step S41) in the same manner as in step S16.

第1オートスケール制御部32は、ステップS16、S41での通知内容に基づいてインスタンス50−2で実行されるサービスが0になったか否かを判断し(ステップS42)、なっていない(NO)と判断した場合はこの動作手順を終了する。第1オートスケール制御部32は、ステップS42でサービスが0になった(YES)と判断した場合は、インスタンス50−2に対してスケールイン、すなわち停止を指示する(ステップS43)。インスタンス50−2は、この指示を受け取ると、自インスタンスを停止して(ステップS44)、この動作手順を終了する。 The first autoscale control unit 32 determines whether or not the service executed in the instance 50-2 has become 0 based on the notification contents in steps S16 and S41 (step S42), and has not (NO). If it is determined, this operation procedure is terminated. When the first autoscale control unit 32 determines that the service has become 0 (YES) in step S42, the first autoscale control unit 32 instructs the instance 50-2 to scale in, that is, to stop (step S43). Upon receiving this instruction, the instance 50-2 stops its own instance (step S44) and ends this operation procedure.

本実施例では、上記のとおりサービスの実行主体であるインスタンスがリソース使用率の状況によって変化する(図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 target selection unit 405 may use a value different from that of the embodiment as a threshold value determined from the resource usage rate of the instance 50 of the transfer source candidate. The transfer target selection unit 405 changes the threshold value based on, for example, the service transfer history in a plurality of instances stored in the service transfer information storage unit 407. The service transfer information storage unit 407 in this case is an example of the "storage unit" of the present invention.

移転対象選択部405は、例えば、記憶された移転先候補のインスタンス50の移転履歴が示す移転の頻度が少ないほど、そのインスタンス50を移転先として決定するか否かを判断する際に用いる閾値を小さくする。この閾値を小さくするということは、移転先候補のインスタンスのリソース使用率が閾値以上である場合にそのインスタンスが移転先として決定されるのだから、サービスがその移転先候補に移転されやすくなることを意味する。移転対象選択部405は、例えば、移転の頻度と閾値とを対応付けた閾値テーブルを用いて閾値を決定する。 For example, the transfer target selection unit 405 sets a threshold value to be used when determining whether or not to determine the instance 50 as the transfer destination as the frequency of the transfer indicated by the transfer history of the stored transfer destination candidate instance 50 decreases. Make it smaller. Decreasing this threshold means that if the resource usage rate of the instance of the transfer destination candidate is equal to or higher than the threshold value, the instance is determined as the transfer destination, so that the service can be easily transferred to the transfer destination candidate. means. The transfer target selection unit 405 determines the threshold value using, for example, a threshold value table in which the frequency of transfer and the threshold value are associated with each other.

図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 target selection unit 405 is 100% (R1) × 0.5 = 50% <66.6 ...% (R2), so the instance 50 -2 is decided as the relocation destination. In addition, when the frequency of transfer of the instance 50-2 is F1 or more and less than F2, the transfer target selection unit 405 becomes 100% (R1) × 1.0 = 100%> 66.6% (R2), and the instance. If the frequency of transfer of 50-2 is F2 or higher, it will be 100% (R1) x 2.0 = 200%> 66.6 ...% (R2), so in both cases, instance 50-2 will be transferred to the destination. Do not decide as.

図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 target selection unit 405 transfers 66.6.% (R1) x 0.5 = 33.3.% <66.6. When the frequency of transfer of the instance 50-2 is less than F1.・% (R2), and if the frequency of instance 50-2 transfer is F1 or more and less than F2, 66.6 ・ ・% (R1) × 1.0 = 66.6 ・ ・% = 66.6 ・ ・% Since it becomes (R2), instance 50-2 is determined as the transfer destination in both cases. In addition, the transfer target selection unit 405 transfers 66.6.% (R1) x 2.0 = 133.3.%> 66.6 when the frequency of transfer of the instance 50-2 is F2 or more. % (R2), so instance 50-2 is not determined as the transfer destination.

図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 target selection unit 405 transfers 33.3 ..% (R1) x 0.5 = 16.6 ..% <66.6. When the frequency of transfer of the instance 50-2 is less than F1.・% (R2), and if the frequency of instance 50-2 transfer is F1 or more and less than F2, 33.3 ・ ・% (R1) × 1.0 = 33.3 ・ ・% <66.6 ・ ・% (R2), and if the frequency of instance 50-2 transfer is F2 or higher, 33.3% (R1) x 2.0 = 66.6% = 66.6% (R2). Therefore, in either case, instance 50-2 is determined as the transfer destination.

図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 target selection unit 405 may use the transfer history of other services. For example, the transfer target selection unit 405 sets a threshold value to be used when determining whether or not to determine the instance 50 as the transfer destination as the number of transfers indicated by the transfer history of the stored transfer destination candidate instance 50 decreases. Make it smaller. In this case, the transfer target selection unit 405 determines the threshold value using the threshold value table in which the number of transfers and the threshold value are associated with each other.

図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 autoscale control unit 33 are frequently performed (services in which usage is temporarily concentrated) and services in which they are rarely performed (changes in the number of usage). There are few services). Instances running the former service tend to have lower usage rates after relocation than instances running the latter service, and are more likely to relocate, and the frequency and frequency of relocations are more likely to increase. Therefore, when a service is transferred to an instance with a low frequency and frequency of transfer, the transferred service is more likely to settle in the instance as compared with the case where the instance with a high frequency and frequency of transfer is set as the transfer destination.

他にも、移転対象選択部405は、記憶された移転先候補のインスタンス50の移転履歴が示す最新の移転時期が古いほど、そのインスタンス50を移転先として決定するか否かを判断する際に用いる閾値を小さくしてもよい。ここでいう最新の移転時期とは、そのインスタンスにおいて現時点から遡って最後にサービスが移転した時期のことを意味する。この場合、移転対象選択部405は、最新の移転時期と閾値とを対応付けた閾値テーブルを用いて閾値を決定する。 In addition, the transfer target selection unit 405 determines whether or not to determine the instance 50 as the transfer destination as the latest transfer time indicated by the transfer history of the stored transfer destination candidate instance 50 is older. The threshold used may be reduced. The latest relocation time here means the time when the service was last relocated in the instance retroactively from the present time. In this case, the transfer target selection unit 405 determines the threshold value using the threshold value table in which the latest transfer time and the threshold value are associated with each other.

図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 target selection unit 405 determines that the resource usage rate of the transfer destination instance is less than the threshold value when the processing executed by the transfer target service is completed, the other instance is used as the service. Will be decided as the relocation destination. The operation procedure of the transfer control unit 40 in this case will be described with reference to FIG.

図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 transfer control unit 40 of the service status of its own instance (step S52). The transfer control unit 40 (resource usage rate calculation unit 403) calculates the resource usage rate by reflecting the notified service status (step S53). Next, the transfer control unit 40 (transfer target selection unit 405) determines whether or not the resource usage rate of the instance 50-1, that is, the transfer destination is less than the threshold value (step S54).

移転制御部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 target selection unit 405 of the transfer control unit 40 transfers services from a plurality of transfer source candidate instances to the transfer destination candidate instance, the resource usage rate of the transfer destination candidate is increased. Determine larger services for relocation.
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 target selection unit 405 transfers the service A whose resource usage rate is 90% rather than the service B whose resource usage rate after the transfer of the transfer destination candidate (instance 50-1) is 80%. Determined as a service. In FIG. 15B, instance 50-1 with 50% free space is detected as a transfer destination candidate, and in addition to services A and B, service C using 20% of resources is detected as a transfer target candidate service. ing.

この場合、移転対象選択部405は、移転先候補の移転後のリソース使用率が100%になるサービスB、Cを移転対象サービスとして決定する。このように移転要求を受け付けることで、移転先候補の移転後のリソース使用率に関係なく移転対象サービスを決定する場合に比べて、移転先候補のリソース使用率が高まることになる。 In this case, the transfer target selection unit 405 determines the services B and C whose resource usage rate after the transfer of the transfer destination candidate is 100% as the transfer target services. By accepting the transfer request in this way, the resource usage rate of the transfer destination candidate is increased as compared with the case where the transfer target service is determined regardless of the resource usage rate after the transfer of the transfer destination candidate.

なお、移転対象選択部405は、他の方法で移転対象サービスを決定してもよい。移転対象選択部405は、移転可能なサービス(移転対象候補のサービス)が複数ある場合、実行中の処理が他のサービスに比べて早く終わるサービスの移転先を決定する、すなわちそのサービスを移転対象サービスとして決定する。この場合、インスタンス50のコンテナ実行部52が、サービス60の状態として、そのサービス60が実行している処理の終了見込み時刻をサービス状態管理部401に通知することで、サービス状態記憶部402がその終了見込み時刻を記憶する。 The transfer target selection unit 405 may determine the transfer target service by another method. When there are a plurality of services that can be transferred (services that are candidates for transfer), the transfer target selection unit 405 determines the transfer destination of the service whose processing being executed finishes earlier than other services, that is, the service is transferred. Determined as a service. In this case, the container execution unit 52 of the instance 50 notifies the service state management unit 401 of the estimated end time of the process being executed by the service 60 as the state of the service 60, so that the service state storage unit 402 performs the status. Memorize the expected end time.

移転対象選択部405は、複数の移転対象候補のサービスの各終了見込み時刻を読み出し、その時刻が最も早いサービスを移転対象サービスとして決定する。これにより、処理の終了時期に関係なくサービスを移転させる場合に比べて、サービスの移転時期が早まるので、サービスの実行主体の特定のインスタンス50への偏りもより早く進み、停止させてもよいインスタンスもより早く生じることになる。 The transfer target selection unit 405 reads out each estimated end time of the services of the plurality of transfer target candidates, and determines the service having the earliest time as the transfer target service. As a result, the service transfer time is earlier than in the case of transferring the service regardless of the processing end time, so that the bias of the service executing subject to the specific instance 50 progresses faster and the instance may be stopped. Will occur sooner.

[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 target selection unit 405 does not have to determine the transfer destination for such redundant services. In this modification, the container execution unit 52 of the instance 50 notifies the service state management unit 401 of the presence or absence of redundancy of the service 60 as the state of the service 60, so that the service state storage unit 402 performs the redundancy. Remember the presence or absence.

移転対象選択部405は、複数の移転対象候補のサービスの冗長化の有無を読み出し、冗長化がなされているサービスについては、移転対象候補から外して移転先を決定せず、冗長化がなされていないサービスについて移転先を決定する。これにより、冗長化されたサービスであっても移転先を決定して移転させる場合に比べて、その冗長化されたサービスの復旧ミスが減ることになる。 The transfer target selection unit 405 reads out whether or not the services of the plurality of transfer target candidates are redundant, and for the services that have been made redundant, the transfer destination is not determined by excluding them from the transfer target candidates, and the services are made redundant. Decide where to relocate for services that are not available. As a result, even if the service is redundant, the recovery error of the redundant service is reduced as compared with the case where the relocation destination is determined and relocated.

[2−6]比較するリソース使用率
移転対象選択部405は、実施例では、移転元候補及び移転先候補について比較するリソース使用率として移転後の使用率を用いたが、現時点での使用率を用いてもよい。例えば図6A(c)の例は、移転後の使用率だとインスタンス50−1よりもインスタンス50−2の方が小さいので移転が行われなかったが、現時点での使用率であれば両インスタンスとも同じ値になるので、移転が行われる。この場合でも、サービスの実行主体(インスタンス)を固定する場合に比べれば、サービスを実行するインスタンスが少なくなり、インスタンス数単位での課金が少なくなる。
[2-6] Resource usage rate to be compared In the example, the transfer target selection unit 405 used the usage rate after the transfer as the resource usage rate to be compared between the transfer source candidate and the transfer destination candidate, but the current usage rate. May be used. For example, in the example of FIG. 6A (c), the usage rate after relocation was smaller for instance 50-2 than for instance 50-1, so the relocation was not performed, but at the current usage rate, both instances. Since both will be the same value, the relocation will be carried out. Even in this case, the number of instances that execute the service is reduced and the charge for each number of instances is reduced as compared with the case where the execution subject (instance) of the service is fixed.

[2−7]有効な決定方法の選択
移転対象選択部405は、複数の移転先候補から実際に移転を行う移転先を決定する方法として、実施例及び変形例で述べた複数の決定方法のいずれかを用いてもよい。複数の決定方法とは、例えば、図7で述べた移転対象のサービスが移転した後のリソース使用率が他の移転元候補よりも小さくなるインスタンスを移転元として決定する第1の方法、そのリソース使用率を求めるのに移転後の使用率を用いる代わりに現時点での使用率を用いる第2の方法、第1の方法で移転先を決定した後に図14で述べた移転先の見直しを行う第3の方法、又は、第1の方法で移転先を決定した後に移転先を見直す第4の方法である。
[2-7] Selection of Effective Determination Method The transfer target selection unit 405 uses the plurality of determination methods described in the examples and modifications as a method of determining a transfer destination to actually transfer from a plurality of transfer destination candidates. Either may be used. The plurality of determination methods are, for example, a first method of determining an instance whose resource usage rate after the transfer target service described in FIG. 7 is smaller than that of other transfer source candidates as a transfer source, and its resources. The second method of using the current usage rate instead of using the usage rate after relocation to obtain the usage rate, and the second method of determining the relocation destination by the first method, and then reviewing the relocation destination described in FIG. This is the third method or the fourth method of reviewing the relocation destination after determining the relocation destination by the first method.

その場合に、移転対象選択部405は、それらの複数の決定方法のうち、決定した移転先にサービスを移転させたことで移転元のインスタンスが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いてもよい。本変形例では、インスタンス50のコンテナ実行部52が、自インスタンスのサービスの状態として、移転対象のサービスを停止させたときに実行しているサービスの数をサービス状態管理部401に通知することで、サービス状態記憶部402がそのサービス移転時の残りのサービスの数を記憶する。 In that case, the transfer target selection unit 405 determines the frequency or number of times that the number of services executed by the transfer source instance becomes 0 by transferring the service to the determined transfer destination among the plurality of determination methods. The method with more is may be used with priority. In this modification, the container execution unit 52 of the instance 50 notifies the service status management unit 401 of the number of services being executed when the service to be transferred is stopped as the service status of the own instance. , The service status storage unit 402 stores the number of remaining services at the time of the service transfer.

移転対象選択部405は、例えば、一定期間は上記の複数の決定方法を均等に用いて移転先を決定し、その際に用いた決定方法をサービス状態管理部401に通知することで、サービス状態記憶部402が通知された決定方法を前述した残りのサービスの数に対応付けて記憶する。移転対象選択部405は、その期間が過ぎると、移転先を決定する際にサービス状態記憶部402を参照し、残りのサービスの数が0になった頻度を決定方法毎に算出する。 For example, the transfer target selection unit 405 determines the transfer destination by evenly using the above-mentioned plurality of determination methods for a certain period of time, and notifies the service status management unit 401 of the determination method used at that time to notify the service status. The storage unit 402 stores the notified determination method in association with the number of remaining services described above. After the period has passed, the transfer target selection unit 405 refers to the service state storage unit 402 when determining the transfer destination, and calculates the frequency with which the number of remaining services becomes 0 for each determination method.

移転対象選択部405は、算出した頻度が多い決定方法ほど優先して用いて、移転先を決定する。具体的には、例えば第1、第2、第3、第4の方法における上記頻度の比率が3:1:4:2であれば、10分の3の確率で第1の方法を用いるという具合である。頻度ではなく回数を用いる場合も同様に行えばよい。これにより、移転先の決定方法を固定する場合に比べて、より移転元のインスタンスに残るサービスが0になりやすくなるので、サービスを実行する仮想マシンが少なくなりやすくなる。 The transfer target selection unit 405 determines the transfer destination by preferentially using the calculated determination method with higher frequency. Specifically, for example, if the frequency ratio in the first, second, third, and fourth methods is 3: 1: 4: 2, the first method is used with a probability of three-tenths. It is in good condition. The same may be applied when the number of times is used instead of the frequency. As a result, the number of services remaining in the transfer source instance is likely to be 0, as compared with the case where the transfer destination determination method is fixed, so that the number of virtual machines executing the services is likely to decrease.

なお、複数の決定方法として、移転対象のサービスを決定する複数の決定方法が用いられてもよい。その場合に、移転対象選択部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 target selection unit 405 determines the frequency or number of times that the number of services executed by the transfer source instance becomes 0 by transferring the determined transfer target service among the plurality of determination methods. The method with more is may be used with priority. Further, as a plurality of determination methods, a plurality of determination methods for determining the transfer source instance may be used. In that case, the transfer target selection unit 405 transfers the services of the determined transfer source instance among the plurality of determination methods, so that the number of services executed by the transfer source instance becomes 0. The method with more frequency or rotation may be used with priority.

移転対象選択部405は、それらの複数の決定方法のうち、決定した移転元のインスタンスのサービスを移転させたことで移転元のインスタンスが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いてもよい。いずれの場合も、移転先の決定方法を固定する場合に比べて、より移転元のインスタンスに残るサービスが0になりやすくなるので、サービスを実行する仮想マシンが少なくなりやすくなる。 Among those plurality of determination methods, the transfer target selection unit 405 has a high frequency or number of times that the number of services executed by the transfer source instance becomes 0 by transferring the services of the determined transfer source instance. The method may be used with priority. In either case, compared to the case where the method of determining the transfer destination is fixed, the number of services remaining in the transfer source instance is likely to be 0, so that the number of virtual machines executing the services is likely to decrease.

[2−8]移転判断のタイミング
サービス移転判断部404は、実施例では、決められた時間間隔でサービス60の移転に関する判断を行ったが、これに限らず、例えば、サービス60が処理の実行を終了したときにそのサービス60について移転に関する判断を行ってもよいし、CPU使用率又はメモリ使用率が閾値を下回ったインスタンス50があったときにそのインスタンス50で実行されているサービス60について移転に関する判断を行ってもよい。
[2-8] Timing of Transfer Judgment In the embodiment, the service transfer determination unit 404 makes a determination regarding the transfer of the service 60 at a predetermined time interval, but the present invention is not limited to this, and for example, the service 60 executes the process. You may make a decision regarding the transfer of the service 60 when the service 60 is terminated, or when there is an instance 50 whose CPU usage rate or memory usage rate is below the threshold value, the service 60 running on the instance 50 is transferred. You may make a judgment about.

[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 rate calculation unit 403 may be divided into a calculation unit that calculates the current usage rate and a calculation unit that calculates the usage rate after the transfer. Further, the service transfer determination unit 404, the transfer target selection unit 405, and the service stop determination unit 406 may be integrated to form a determination unit that collectively determines the service transfer.

また、実施例では、インスタンス以外の機能である第1オートスケール制御部32等も仮想マシンで実現されていたが、これらについては物理マシンで実現されてもよい。要するに、リソース提供システム1の全体で図4、図5に表す各機能と同等の機能が実現されていれば、機能のまとめ方はどのようになっていてもよい。 Further, in the embodiment, the first autoscale control unit 32 and the like, which are functions other than the instance, are also realized by the virtual machine, but these may be realized by the physical machine. In short, as long as the functions equivalent to the functions shown in FIGS. 4 and 5 are realized in the entire resource providing system 1, the functions may be organized in any way.

[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 server device 10 and the resource management device 20. Further, the present invention can be regarded as an information processing method for realizing the processing performed by each device, and also as a program for operating a computer that controls each device. This program may be provided in the form of a recording medium such as an optical disk that stores it, or may be downloaded to a computer via a communication line such as the Internet, and installed and made available. May be provided.

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.
前記決定部は、サービスの移転元の候補となる前記第2仮想マシンが複数ある場合、当該サービスの移転後に前記リソース使用率が他の前記移転元の候補よりも小さくなる前記第2仮想マシンを移転元とするサービスの移転先を決定する
請求項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.
前記決定部は、前記空きリソースで実行可能なサービスが前記第2仮想マシンとは別の仮想マシンを用いて冗長化されている場合、当該サービスについては前記移転先を決定しない
請求項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.
前記決定部は、サービスの移転元の候補となる前記第2仮想マシンが複数ある場合、当該サービスの移転後に前記第2割合が他の前記移転元の候補よりも小さくなる前記第2仮想マシンで実行されているサービスの前記移転先を決定する
請求項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.
前記決定部は、移転先の候補の前記第1仮想マシンが複数ある場合、前記空きリソースにサービスが移転した後の前記第2割合が他の前記移転先の候補よりも大きい前記第1仮想マシンを前記移転先として決定する
請求項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.
前記決定部は、記憶された前記第1仮想マシンの移転履歴が示す移転の頻度又は移転の回数が少ないほど前記閾値を小さくする
請求項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.
前記決定部は、記憶された前記第1仮想マシンの移転履歴が示す最新の移転時期が古いほど前記閾値を小さくする
請求項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.
前記決定部は、複数の方法のいずれかを用いて前記移転先を決定し、前記複数の方法のうち、決定した前記移転先にサービスを移転させたことで前記第2仮想マシンが実行するサービスの数が0となった頻度又は回数が多い方法ほど優先して用いる
請求項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仮想マシンの前記リソース使用率が前記閾値未満になっていた場合、他の仮想マシンを当該サービスの移転先として決定する
請求項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リソースを用いて複数のサービスを実行する複数の仮想マシンから、1以上のサービスを実行可能な空きリソースを有する第1仮想マシンを検出する検出部と、
検出された前記第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.
JP2017183854A 2017-09-25 2017-09-25 Programs and information processing equipment Active JP6939327B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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