JP2012238084A - Data load distribution arrangement system and data load distribution arrangement method - Google Patents

Data load distribution arrangement system and data load distribution arrangement method Download PDF

Info

Publication number
JP2012238084A
JP2012238084A JP2011105225A JP2011105225A JP2012238084A JP 2012238084 A JP2012238084 A JP 2012238084A JP 2011105225 A JP2011105225 A JP 2011105225A JP 2011105225 A JP2011105225 A JP 2011105225A JP 2012238084 A JP2012238084 A JP 2012238084A
Authority
JP
Japan
Prior art keywords
server
data
load
virtual
threshold
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.)
Granted
Application number
JP2011105225A
Other languages
Japanese (ja)
Other versions
JP5540269B2 (en
Inventor
Hikotoshi Nakazato
彦俊 中里
Manabu Nishio
学 西尾
Masafumi Shimizu
雅史 清水
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2011105225A priority Critical patent/JP5540269B2/en
Publication of JP2012238084A publication Critical patent/JP2012238084A/en
Application granted granted Critical
Publication of JP5540269B2 publication Critical patent/JP5540269B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve throughput of an entire system by realizing load distribution, while inhibiting a number of arranged virtual servers.SOLUTION: In a data load distribution arrangement system 1 comprising a virtual server arrangement device 10 which is communicably connected to a plurality of DB servers 20, the virtual server arrangement device 10 calculates an absolute value of a difference between a load and a server threshold for each DB server 20 and generates aggregation of servers Swhose loads are equal to or less than the server threshold and aggregation of servers Swhose loads are more than the server threshold. Then the virtual server arrangement device 10 generates data information for server in charge 100 by arranging the virtual servers of the servers Sagainst an excess of an area of which the servers Sare in charge on a hash space, sequentially from the DB server 20 with the largest absolute value among the servers S. Each DB server 20 exchanges data stored by itself with another DB server 20 on the basis of the data information for server in charge 100 generated by the virtual server arrangement device 10.

Description

本発明は、大量のデータを分散して格納する分散データベースの技術分野において、データを格納する各サーバ間の負荷分散性を維持するための仮想サーバを用いたデータ負荷分散配置システムおよびデータ負荷分散配置方法に関する。   The present invention relates to a distributed database system for storing a large amount of data in a distributed manner, and a data load distribution arrangement system and a data load distribution using a virtual server for maintaining load distribution among servers storing data It relates to the arrangement method.

データを複数のサーバ間に分散して格納する技術として、データとサーバとをハッシュ関数にかけてリング状のハッシュ空間に配置し、ハッシュ空間上のデータとサーバの位置関係から、各サーバが担当すべきデータを決定するコンシステントハッシュ法がある(非特許文献1参照)。図19(a)に示すように、リング状のハッシュ空間にデータとサーバとが配置され、あるサーバ(例えば、「S」)が配置された位置から、その1つ前に配置されたサーバ「S」の配置位置の前までの領域(担当領域)に配置されたデータを、時計回りに、そのサーバ「S」が格納する。このコンシステントハッシュ法によるデータの分散格納方法では、サーバ数の増減に対して格納先のサーバが変更となるデータが限られるため、拡張性に富むという特徴がある。 As a technology for storing data distributed among multiple servers, the data and server should be assigned to a ring-shaped hash space by applying a hash function, and each server should be responsible for the positional relationship between the data on the hash space and the server. There is a consistent hash method for determining data (see Non-Patent Document 1). As shown in FIG. 19A, data and a server are arranged in a ring-shaped hash space, and a server arranged immediately before a certain server (for example, “S 1 ”) is arranged. The server “S 1 ” stores the data arranged in the area (area in charge) before the arrangement position of “S 5 ” clockwise. This distributed storage method of data by the consistent hash method has a feature that it is highly extensible because data for which the storage destination server is changed is limited as the number of servers increases or decreases.

しかし、このコンシステントハッシュ法を用いたデータ配置方法では、ハッシュ空間におけるサーバとデータのハッシュ値の配置が一様にならず、各サーバの担当するデータ数に偏りが生じやすい。この問題を解決するため、一つのサーバから複数のハッシュ値を算出することにより、ハッシュ空間上に仮想サーバを配置する手法がある(非特許文献2参照)。例えば、図19(b)に示すように、ハッシュ空間上にサーバ「S」の仮想サーバ「VS」を、例えば、サーバ「S」の担当領域にハッシュ値に基づき配置する。そして、この仮想サーバ「VS」を設けることで、サーバ「S」の担当領域の一部のデータを、仮想サーバ「VS」の基のサーバ「S」に格納させることで、サーバ「S」の負荷を減らし、負荷分散性を向上させる。
この仮想サーバを用いた方法によれば、各サーバの仮想サーバをハッシュ空間上に増やすことで、担当領域を細かく分割し各サーバが格納するデータ数を、より均一にすることができる。
However, in the data arrangement method using the consistent hash method, the arrangement of the hash values of the server and the data in the hash space is not uniform, and the number of data handled by each server tends to be biased. In order to solve this problem, there is a method of arranging a virtual server on a hash space by calculating a plurality of hash values from one server (see Non-Patent Document 2). For example, as shown in FIG. 19B, the virtual server “VS 3 ” of the server “S 3 ” is arranged on the hash space based on the hash value, for example, in the assigned area of the server “S 1 ”. Then, by providing the virtual server "VS 3", a part of the data area of responsibility of the server "S 1", by storing in the server "S 3" groups of virtual servers "VS 3", the server The load of “S 1 ” is reduced to improve load distribution.
According to this method using virtual servers, the number of data stored in each server can be made more uniform by increasing the number of virtual servers of each server on the hash space and finely dividing the assigned area.

D.Karger,E.Lehman, T.Leighton, R.Panigraphy, M.Levine, and D.Lewin, “Consistent hashing and random trees,” Proc. Twenty-Ninth Annual ACM Symposium on Theory of Computing, pp.654-663, Elpaso, Texas, 1997D. Karger, E. Lehman, T. Leighton, R. Panigraphy, M. Levine, and D. Lewin, “Consistent hashing and random trees,” Proc. Twenty-Ninth Annual ACM Symposium on Theory of Computing, pp.654- 663, Elpaso, Texas, 1997 Rajesh Swaminathan,“Web Caching with Consistet Hashing,”University of Waterloo, pp.11-13, San Francisco, CA, 2009, [online]、[平成23年4月22日検索]、インターネット<http://rajesh.rapidtech.ca/publications/work_reports/report5.pdf>Rajesh Swaminathan, “Web Caching with Consistet Hashing,” University of Waterloo, pp.11-13, San Francisco, CA, 2009, [online], [searched April 22, 2011], Internet <http: // rajesh .rapidtech.ca / publications / work_reports / report5.pdf>

しかしながら、従来のコンシステントハッシュ法による仮想サーバの配置方法では、サーバにハッシュ関数を繰り返し適用するなどして複数のハッシュ値を算出し、仮想サーバをハッシュ空間に配置する。従って、適用するハッシュ関数に応じて負荷分散効果が異なると同時に、分散効果を高めるためには大量の仮想サーバをハッシュ空間上に配置する必要がある。その結果、仮想サーバ保持のための記述量が増加し、クライアントからデータの問い合わせを受けた際に、そのデータを格納している担当サーバの検索に要する時間が増加してしまう。   However, in the conventional virtual server arrangement method using the consistent hash method, a plurality of hash values are calculated by repeatedly applying a hash function to the server, and the virtual server is arranged in the hash space. Accordingly, the load distribution effect varies depending on the hash function to be applied, and at the same time, in order to increase the distribution effect, it is necessary to arrange a large number of virtual servers on the hash space. As a result, the amount of description for holding a virtual server increases, and when a data inquiry is received from a client, the time required to search for a responsible server storing the data increases.

また、従来の仮想サーバを用いた負荷分散方法では、各サーバに設ける仮想サーバ数は同一に設定されることが多く、各サーバの性能を考慮したものではない。さらに、システム稼動後、時間経過に伴う担当データ数の増減や各データへの実アクセス数に応じて変動するサーバの実負荷の変化に対応できず、負荷分散効果を継続して維持するには問題があった。   Also, in the conventional load balancing method using virtual servers, the number of virtual servers provided in each server is often set to be the same, and the performance of each server is not considered. Furthermore, after the system is running, it is impossible to respond to changes in the actual load on the server that fluctuate depending on the increase or decrease in the number of data in charge over time or the actual number of accesses to each data, and to maintain the load balancing effect continuously There was a problem.

このような背景に鑑みて本発明がなされたのであり、本発明は、仮想サーバの配置数を抑えた上で、サーバ間の負荷分散を実現し、システム全体としてスループットを向上させることができる、仮想サーバを用いたデータ負荷分散配置システムおよびデータ負荷分散配置方法を提供することを課題とする。   The present invention has been made in view of such a background, and the present invention can achieve load distribution between servers while suppressing the number of virtual servers arranged, and improve the throughput of the entire system. It is an object of the present invention to provide a data load distribution and arrangement system and a data load distribution and arrangement method using a virtual server.

前記した課題を解決するため、請求項1に記載の発明は、相互に通信可能に接続される複数のDBサーバと、前記複数のDBサーバそれぞれと通信可能に接続される仮想サーバ配置装置とを備えるデータ負荷分散配置システムであって、前記DBサーバが、(1)クライアントからの検索対象となるデータ、およびそのデータそれぞれに対応付けられるデータキー、(2)前記DBサーバ自身のサーバ性能、並びに、(3)前記データそれぞれの保存先の前記DBサーバを示すサーバ担当データ情報が保存される記憶部と、前記データキーおよび前記サーバ性能を、前記仮想サーバ配置装置に送信するデータ管理部と、前記仮想サーバ配置装置から、新たな前記サーバ担当データ情報を受信し、前記保存していたサーバ担当データ情報と比較することにより、自身の前記DBサーバの前記記憶部に保存していないデータおよびそのデータの保存先となる他のDBサーバを抽出し、前記抽出した他のDBサーバにデータ交換要求を送信することにより、前記自身が保存していないデータを取得し、前記保存していたサーバ担当データ情報を前記新たなサーバ担当データ情報に更新するデータ交換部と、を備え、前記仮想サーバ配置装置が、前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれに設定する負荷の閾値を示す負荷閾値定数が保存される記憶部と、前記DBサーバそれぞれから取得した、前記サーバ性能と、前記負荷閾値定数とを用いて、前記DBサーバそれぞれの負荷の閾値であるサーバ閾値を計算し、前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれから取得した前記データキーの数の合計であるシステム全体のデータ数とに基づき、前記データへのアクセス回数が均等であると仮定して、前記DBサーバそれぞれの負荷を計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し、前記負荷が前記サーバ閾値以下のサーバSの集合と、前記負荷が前記サーバ閾値を超えるサーバSの集合とを生成するサーバ負荷計算部と、前記DBサーバおよび前記データそれぞれについて、所定のハッシュ関数を用いてハッシュ値を算出することにより、ハッシュ空間上に、前記データの保存を担当する前記DBサーバの担当領域を設定し、前記サーバSの集合うち、前記負荷と前記サーバ閾値との差の絶対値が大きいDBサーバから順に、前記ハッシュ空間上の前記サーバSの担当領域において、担当できるデータ数が自身のDBサーバのサーバ閾値を超える超過分に対して、前記サーバSの集合のうち、前記絶対値が大きいDBサーバから順に仮想サーバを配置し、前記超過分のデータの前記ハッシュ空間上での担当領域を前記仮想サーバに変更し、前記変更したハッシュ空間上での担当領域に基づき、前記DBサーバそれぞれが担当するデータの保存先を示す前記新たなサーバ担当データ情報を生成し、前記生成した新たなサーバ担当データ情報を、前記DBサーバそれぞれに送信する配置処理部と、を備えることを特徴とするデータ負荷分散配置システムとした。 In order to solve the above-described problem, the invention according to claim 1 includes a plurality of DB servers that are communicably connected to each other, and a virtual server arrangement device that is communicably connected to each of the plurality of DB servers. A data load distribution arrangement system comprising: (1) data to be searched from a client and a data key associated with each of the data; (2) server performance of the DB server itself; (3) a storage unit storing server charge data information indicating the DB server that stores each of the data; a data management unit that transmits the data key and the server performance to the virtual server placement device; Receives the new server charge data information from the virtual server placement device and compares it with the stored server charge data information To extract data not stored in the storage unit of the DB server and another DB server as a storage destination of the data, and transmit a data exchange request to the extracted other DB server. A data exchanging unit that obtains data that is not stored by itself and updates the stored server charge data information to the new server charge data information. The processing performance required for the entire data load distribution and arrangement system, a storage unit storing a load threshold constant indicating a load threshold set for each of the DB servers, the server performance acquired from each of the DB servers, A server threshold value that is a load threshold value for each of the DB servers is calculated using a load threshold constant, and the data load distribution and arrangement system Assuming that the number of accesses to the data is equal based on the overall required processing performance and the number of data in the entire system, which is the total number of the data keys acquired from each of the DB servers, The load of each server is calculated, the absolute value of the difference between the load and the server threshold is calculated for each DB server, the set of servers S whose load is equal to or less than the server threshold, and the load is the server A server load calculation unit that generates a set of servers S + exceeding a threshold value, and for each of the DB server and the data, by calculating a hash value using a predetermined hash function, An area in charge of the DB server in charge of storage is set, and the absolute value of the difference between the load and the server threshold value in the set of the servers S + is In descending order DB server, at the server S + in charge area on the hash space for excess of charge can number data exceeds the server threshold own DB server, the server S - of the set of the A virtual server is arranged in order from a DB server having a larger absolute value, and a responsible area on the hash space of the excess data is changed to the virtual server, based on the changed responsible area on the hash space, An arrangement processing unit that generates the new server charge data information indicating a storage location of data handled by each DB server, and transmits the generated new server charge data information to each DB server. A featured data load distribution and arrangement system was adopted.

また、請求項3に記載の発明は、相互に通信可能に接続される複数のDBサーバと、前記複数のDBサーバそれぞれと通信可能に接続される仮想サーバ配置装置とを備えるデータ負荷分散配置システムのデータ負荷分散配置方法であって、前記DBサーバが、(1)クライアントからの検索対象となるデータ、およびそのデータそれぞれに対応付けられるデータキー、(2)前記DBサーバ自身のサーバ性能、並びに、(3)前記データそれぞれの保存先の前記DBサーバを示すサーバ担当データ情報が保存されている記憶部を備えており、前記データキーおよび前記サーバ性能を、前記仮想サーバ配置装置に送信するステップを実行し、前記仮想サーバ配置装置が、前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれに設定する負荷の閾値を示す負荷閾値定数が保存されている記憶部を備えており、前記DBサーバそれぞれから取得した、前記サーバ性能と、前記負荷閾値定数とを用いて、前記DBサーバそれぞれの負荷の閾値であるサーバ閾値を計算し、前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれから取得した前記データキーの数の合計であるシステム全体のデータ数とに基づき、前記データへのアクセス回数が均等であると仮定して、前記DBサーバそれぞれの負荷を計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し、前記負荷が前記サーバ閾値以下のサーバSの集合と、前記負荷が前記サーバ閾値を超えるサーバSの集合とを生成するステップと、前記DBサーバおよび前記データそれぞれについて、所定のハッシュ関数を用いてハッシュ値を算出することにより、ハッシュ空間上に、前記データの保存を担当する前記DBサーバの担当領域を設定し、前記サーバSの集合うち、前記負荷と前記サーバ閾値との差の絶対値が大きいDBサーバから順に、前記ハッシュ空間上の前記サーバSの担当領域において、担当できるデータ数が自身のDBサーバのサーバ閾値を超える超過分に対して、前記サーバSの集合のうち、前記絶対値が大きいDBサーバから順に仮想サーバを配置し、前記超過分のデータの前記ハッシュ空間上での担当領域を前記仮想サーバに変更し、前記変更したハッシュ空間上での担当領域に基づき、前記DBサーバそれぞれが担当するデータの保存先を示す新たなサーバ担当データ情報を生成し、前記生成した新たなサーバ担当データ情報を、前記DBサーバそれぞれに送信するステップと、を実行し、前記DBサーバが、前記仮想サーバ配置装置から、前記新たなサーバ担当データ情報を受信し、前記保存していたサーバ担当データ情報と比較することにより、自身の前記DBサーバの前記記憶部に保存していないデータおよびそのデータの保存先となる他のDBサーバを抽出し、前記抽出した他のDBサーバにデータ交換要求を送信することにより、前記自身が保存していないデータを取得し、前記保存していたサーバ担当データ情報を前記新たなサーバ担当データ情報に更新するステップを実行することを特徴とするデータ負荷分散配置方法とした。 According to a third aspect of the present invention, there is provided a data load distribution arrangement system comprising a plurality of DB servers that are communicably connected to each other and a virtual server arrangement apparatus that is communicably connected to each of the plurality of DB servers. In this data load distribution and arrangement method, the DB server is (1) data to be searched from a client and a data key associated with each of the data, (2) server performance of the DB server itself, and (3) a step of transmitting the data key and the server performance to the virtual server placement device, comprising a storage unit in which server-in-charge data information indicating the DB server of the storage destination of each of the data is stored; And the virtual server placement apparatus performs processing performance required for the entire data load distribution placement system, and the DB A storage unit storing a load threshold constant indicating a load threshold to be set for each server, and using the server performance and the load threshold constant acquired from each DB server, the DB A server threshold that is a load threshold of each server is calculated, the processing performance required for the entire data load distribution and arrangement system, and the total number of data that is the total number of the data keys acquired from each of the DB servers, Based on the above, assuming that the number of accesses to the data is equal, calculate the load of each DB server, and for each DB server, calculate the absolute value of the difference between the load and the server threshold, Generating a set of servers S where the load is less than or equal to the server threshold and a set of servers S + where the load exceeds the server threshold; For each of the DB server and the data, by calculating a hash value using a predetermined hash function, an area in charge of the DB server responsible for storing the data is set on the hash space, and the server S + From the DB server in which the absolute value of the difference between the load and the server threshold is large, the number of data that can be handled in the server S + in the hash space is the server threshold of the own DB server. relative excess of greater than, the server S - of the set of the virtual server absolute value from large DB server in order to place, the coverage area in said hash space data of the excess to the virtual server And a new storage location indicating the data storage location of each of the DB servers based on the changed area in the hash space. Generating new server charge data information, and transmitting the generated new server charge data information to each of the DB servers, wherein the DB server receives the new server from the virtual server placement device. By receiving the charge data information and comparing it with the stored server charge data information, the data not saved in the storage unit of the DB server and the other DB server that is the save destination of the data can be obtained. By extracting and sending a data exchange request to the other extracted DB server, the data not stored by itself is acquired, and the stored server charge data information is used as the new server charge data information. The data load distribution and placement method is characterized by executing the updating step.

このようにすることで、本実施形態に係るデータ負荷分散配置システムおよびデータ負荷分散配置方法によれば、各DB(DataBase)サーバのサーバ性能を考慮した上でサーバ閾値を計算し、ハッシュ空間上で、負荷がサーバ閾値を超えるサーバSのDBサーバの負荷の超過分の領域を、負荷がサーバ閾値以下のサーバSのDBサーバが、仮想サーバを設けることにより、その領域のデータを、サーバSのDBサーバが担当する。よって、DBサーバ間の負荷分散を実現し、さらに、各サーバの担当領域に配置する仮想サーバの数が同一に設定される従来技術に比べ、仮想サーバの数を減らすことができる。また、仮想サーバを大量に配置する必要がなくなるため、仮想サーバ保持のための記述量の増加を抑え、クライアントからデータの問い合わせを受けた際に、そのデータを格納している担当サーバの検索に要する時間の増加を抑えることができる。よって、システム全体としてのスループットを向上させることができる。 In this way, according to the data load distribution and arrangement system and the data load distribution and arrangement method according to this embodiment, the server threshold value is calculated in consideration of the server performance of each DB (DataBase) server, in, load a region of excess load of the server S + DB server exceeding server threshold, load server S follows the server threshold - the DB server, by providing the virtual server, the data of the area, server S - DB server is in charge of. Therefore, load distribution among DB servers can be realized, and the number of virtual servers can be reduced as compared with the conventional technology in which the number of virtual servers arranged in the assigned area of each server is set to be the same. Also, since there is no need to place a large number of virtual servers, the increase in the amount of description for holding virtual servers is suppressed, and when a data inquiry is received from a client, the server in charge that stores the data is searched. An increase in time required can be suppressed. Therefore, the throughput of the entire system can be improved.

請求項2に記載の発明は、前記DBサーバが、自身が保存する前記データの増減と、前記クライアントからの前記データに対するアクセス数とを監視し、前記データそれぞれへの前記アクセス数を示すアクセス回数情報を生成するアクセス監視部を、さらに備え、前記データ管理部が、所定間隔ごとに、前記記憶部に保存されている前記データの前記データキーと、前記アクセス回数情報とを、前記仮想サーバ配置装置に送信し、前記仮想サーバ配置装置が、仮想サーバ再配置計算部を、さらに備えており、前記サーバ負荷計算部が、前記所定間隔ごとに前記DBサーバそれぞれから取得した前記アクセス回数情報に含まれる、前記データキーの数であるデータ数と、前記データへのアクセス数とを用いて、前記所定間隔ごとの前記DBサーバそれぞれの前記負荷を計算することにより、前記サーバSの集合と、前記サーバSの集合とを生成し、前記仮想サーバ再配置計算部が、前記サーバSの集合のうち、前記ハッシュ空間上に前記仮想サーバが配置されている前記DBサーバについて、前記絶対値が大きいDBサーバから順に、前記仮想サーバの担当領域を前記変更前に担当していた前記DBサーバの担当領域に戻したときに、当該DBサーバの負荷が当該DBサーバのサーバ閾値を超えない場合に、前記仮想サーバの担当領域を前記ハッシュ空間上から取り除き、前記DBサーバそれぞれの前記負荷を再計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し直すことにより、前記サーバSの集合と、前記サーバSの集合とを再度生成して、前記配置処理部に引き渡すこと、を特徴とする請求項1に記載のデータ負荷分散配置システムとした。 In the invention according to claim 2, the DB server monitors the increase / decrease of the data stored by itself and the number of accesses to the data from the client, and indicates the number of accesses to each of the data. An access monitoring unit that generates information, and the data management unit is configured to allocate the data key of the data stored in the storage unit and the access count information to the virtual server arrangement at predetermined intervals. The virtual server placement device further includes a virtual server relocation calculation unit, and the server load calculation unit is included in the access count information acquired from each of the DB servers at each predetermined interval. Using the number of data that is the number of the data keys and the number of accesses to the data, By calculating each of the load, the server S - a set of said generates a set of servers S +, the virtual server rearrangement calculation unit, the server S - of the set of the hash space Regarding the DB server on which the virtual server is arranged, when the area in charge of the virtual server is returned to the area in charge of the DB server that was in charge before the change in order from the DB server having the largest absolute value When the load of the DB server does not exceed the server threshold of the DB server, the responsible area of the virtual server is removed from the hash space, the load of each DB server is recalculated, to, by re-calculating the absolute value of the difference between the load and the server threshold value, the server S - life and collection of, and collection of the server S + again The data load distribution and placement system according to claim 1, wherein the data is distributed to the placement processing unit.

また、請求項4に記載の発明は、前記DBサーバが、自身が保存する前記データの増減と、前記クライアントからの前記データに対するアクセス数とを監視し、前記データそれぞれへの前記アクセス数を示すアクセス回数情報を生成するステップと、所定間隔ごとに、前記記憶部に保存されている前記データの前記データキーと、前記アクセス回数情報とを、前記仮想サーバ配置装置に送信するステップとを、さらに実行し、前記仮想サーバ配置装置が、前記所定間隔ごとに前記DBサーバそれぞれから取得した前記アクセス回数情報に含まれる、前記データキーの数であるデータ数と、前記データへのアクセス数とを用いて、前記所定間隔ごとの前記DBサーバそれぞれの前記負荷を計算することにより、前記サーバSの集合と、前記サーバSの集合とを生成するステップと、前記サーバSの集合のうち、前記ハッシュ空間上に前記仮想サーバが配置されている前記DBサーバについて、前記絶対値が大きいDBサーバから順に、前記仮想サーバの担当領域を前記変更前に担当していた前記DBサーバの担当領域に戻したときに、当該DBサーバの負荷が当該DBサーバのサーバ閾値を超えない場合に、前記仮想サーバの担当領域を前記ハッシュ空間上から取り除き、前記DBサーバそれぞれの前記負荷を再計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し直すことにより、前記サーバSの集合と、前記サーバSの集合とを再度生成するステップとを、実行すること、を特徴とする請求項3に記載のデータ負荷分散配置方法とした。 According to a fourth aspect of the present invention, the DB server monitors the increase / decrease of the data stored by itself and the number of accesses to the data from the client, and indicates the number of accesses to each of the data. Generating the access count information; and transmitting the data key of the data stored in the storage unit and the access count information to the virtual server placement device at predetermined intervals; And the virtual server placement device uses the number of data that is the number of the data keys and the number of accesses to the data included in the access count information acquired from each of the DB servers at the predetermined intervals. Then, by calculating the load of each of the DB servers at each predetermined interval, the set of servers S − and the server And generating a set of over server S +, the server S - of a set of, for the DB server where the virtual server is located on the hash space, in order from the large absolute value DB server, If the load of the DB server does not exceed the server threshold of the DB server when the charge area of the virtual server is returned to the DB server responsible area that was in charge before the change, the virtual server charge By removing the area from the hash space, recalculating the load of each DB server, and recalculating the absolute value of the difference between the load and the server threshold for each DB server, the server S The data load distribution and placement method according to claim 3, wherein the step of regenerating the set of and the set of the server S + is executed. .

このようにすることで、本実施形態に係るデータ負荷分散配置システムおよびデータ負荷分散配置方法によれば、所定間隔ごとに、負荷がサーバ閾値以下のサーバSに含まれることになったDBサーバのハッシュ空間上での担当領域に、仮想サーバが配置されている場合に、その仮想サーバの担当領域を、元のDBサーバの担当領域に戻すことができる。そして、負荷とサーバ閾値との差の絶対値を計算し直すことにより、負荷がサーバ閾値以下のサーバSの集合と、負荷がサーバ閾値を超えるサーバSの集合とを生成して、再度、ハッシュ空間上での仮想サーバの配置を計算する。これにより、各DBサーバの負荷を均一化させるとともに、ハッシュ空間上に配置する仮想サーバの数を減らすことができる。 By doing in this way, according to the data load distribution and arrangement system and the data load distribution and arrangement method according to the present embodiment, the DB server whose load is included in the server S having a server threshold value or less at every predetermined interval. When the virtual server is arranged in the assigned area in the hash space, the assigned area of the virtual server can be returned to the assigned area of the original DB server. Then, by recalculating the absolute value of the difference between the load and the server threshold, a set of servers S whose load is less than or equal to the server threshold and a set of servers S + whose load exceeds the server threshold are generated again. Calculate the placement of the virtual server on the hash space. As a result, the load on each DB server can be made uniform, and the number of virtual servers arranged in the hash space can be reduced.

本発明によれば、仮想サーバの配置数を抑えた上で、サーバ間の負荷分散を実現し、システム全体としてスループットを向上させる、仮想サーバを用いたデータ負荷分散配置システムおよびデータ負荷分散配置方法を提供することができる。   According to the present invention, a data load distribution and arrangement system using a virtual server and a data load distribution and arrangement method for realizing load distribution among servers and improving throughput as a whole system while suppressing the number of arrangement of virtual servers. Can be provided.

本実施形態に係るデータ負荷分散配置システムの構成例を示すブロック図である。It is a block diagram which shows the structural example of the data load distribution arrangement system which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による、ハッシュ空間上での仮想サーバの初期配置の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the initial arrangement | positioning of the virtual server on the hash space by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による、ハッシュ空間上での仮想サーバの初期配置の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the initial arrangement | positioning of the virtual server on the hash space by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による、ハッシュ空間上での仮想サーバの初期配置の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the initial arrangement | positioning of the virtual server on the hash space by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による、ハッシュ空間上での仮想サーバの初期配置の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the initial arrangement | positioning of the virtual server on the hash space by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係るサーバ担当データ情報のデータ構成の一例を示す図である。It is a figure which shows an example of a data structure of the server charge data information which concerns on this embodiment. 本実施形態に係るアクセス回数情報のデータ構成の一例を示す図である。It is a figure which shows an example of a data structure of the access frequency information which concerns on this embodiment. 本実施形態に係るデータ負荷分散配置処理(仮想サーバの初期配置)の全体の処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the whole process of the data load distribution arrangement | positioning process (initial arrangement | positioning of a virtual server) which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置の仮想サーバ配置処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the virtual server arrangement | positioning process of the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置の仮想サーバ配置処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the virtual server arrangement | positioning process of the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係るデータ負荷分散配置処理(仮想サーバの再配置)の全体の処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the whole process of the data load distribution arrangement | positioning process (virtual server rearrangement) concerning this embodiment. 本実施形態に係る仮想サーバ配置装置による仮想サーバ再配置計算の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the virtual server rearrangement calculation by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による仮想サーバ再配置計算の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the virtual server rearrangement calculation by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による仮想サーバ再配置計算の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the virtual server rearrangement calculation by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による仮想サーバ再配置計算の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the virtual server rearrangement calculation by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による仮想サーバ再配置計算の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the virtual server rearrangement calculation by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置による仮想サーバ再配置計算の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the virtual server rearrangement calculation by the virtual server arrangement | positioning apparatus which concerns on this embodiment. 本実施形態に係る仮想サーバ配置装置の仮想サーバ再配置計算の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the virtual server rearrangement calculation of the virtual server arrangement | positioning apparatus which concerns on this embodiment. 従来技術におけるコンシステントハッシュ法による仮想サーバの配置方法を説明するための図である。It is a figure for demonstrating the arrangement | positioning method of the virtual server by the consistent hash method in a prior art.

次に、本発明を実施するための形態(以下、「実施形態」という)について、適宜図面を参照しながら詳細に説明する。   Next, modes for carrying out the present invention (hereinafter referred to as “embodiments”) will be described in detail with reference to the drawings as appropriate.

本実施形態に係る仮想サーバを用いたデータ負荷分散配置システム1およびデータ負荷分散配置方法では、(1)各DBサーバ20のサーバ性能を考慮した仮想サーバの初期配置によるデータ負荷分散配置処理と、(2)システム稼動後の時間経過に伴うデータ数やデータへのアクセス回数の増減に対応した動的な仮想サーバの再配置と、を実現する。まず、本実施形態に係るデータ負荷分散配置システム1の概要について説明する。   In the data load distribution and arrangement system 1 and data load distribution and arrangement method using virtual servers according to the present embodiment, (1) data load distribution and arrangement processing by initial arrangement of virtual servers in consideration of server performance of each DB server 20; (2) Realization of dynamic virtual server relocation corresponding to increase / decrease in the number of data and the number of accesses to data with the passage of time after system operation. First, an outline of the data load distribution arrangement system 1 according to the present embodiment will be described.

図1は、本実施形態に係るデータ負荷分散配置システム1の構成を示すブロック図である。
図1に示すように、本実施形態に係るデータ負荷分散配置システム1は、各データを保存する複数のDBサーバ20と、ハッシュ空間上での仮想サーバの配置による各データの保存先となるDBサーバ20の決定や、そのデータの保存先の変更等を管理する仮想サーバ配置装置10とが、通信可能に接続されて構成される。この仮想サーバ配置装置10と各DBサーバ20それぞれとが通信可能に接続されるとともに、各DBサーバ20同士も、通信可能に接続される。
FIG. 1 is a block diagram showing a configuration of a data load distribution and arrangement system 1 according to the present embodiment.
As shown in FIG. 1, the data load distribution and arrangement system 1 according to the present embodiment includes a plurality of DB servers 20 that store each data and a DB that is a storage destination of each data by arrangement of virtual servers on a hash space. The server 20 is configured to be communicably connected to the virtual server placement apparatus 10 that manages the determination of the server 20 and the change of the storage destination of the data. The virtual server placement device 10 and each DB server 20 are connected to be communicable, and the DB servers 20 are also connected to be communicable.

また、仮想サーバ配置装置10は、管理者サーバ5と通信可能に接続されており、仮想サーバをハッシュ空間上に配置するために必要となる、設定情報(後記参照)を管理者サーバ5から受信する。そして、仮想サーバ配置装置10は、仮想サーバの配置処理の結果、DBサーバ20が不足する場合には、リソース不足通知を管理者サーバ5へ送信する。   The virtual server placement apparatus 10 is communicably connected to the administrator server 5 and receives setting information (see below) from the administrator server 5 necessary for placing the virtual server on the hash space. To do. The virtual server placement apparatus 10 transmits a resource shortage notification to the administrator server 5 when the DB server 20 is short as a result of the virtual server placement processing.

DBサーバ20は、クライアント6とも通信可能に接続されている。DBサーバ20は、クライアント6からのデータ要求を受け付けると、そのデータを保存するDBサーバ20を、後記する記憶部24内のサーバ担当データ情報100(図6参照)を参照して検索し、その検索結果を担当サーバ通知として、クライアント6に送信する。そして、クライアント6は、その担当サーバ通知に示されるデータの保存先のDBサーバ20に対して、データ取得要求を送信し、そのデータを取得する。   The DB server 20 is also communicably connected to the client 6. Upon receiving a data request from the client 6, the DB server 20 searches for the DB server 20 that stores the data with reference to server charge data information 100 (see FIG. 6) in the storage unit 24 described later. The search result is transmitted to the client 6 as a server notification in charge. Then, the client 6 transmits a data acquisition request to the DB server 20 that stores the data indicated in the notification of the server in charge, and acquires the data.

次に、本実施形態に係るデータ負荷分散配置システム1の仮想サーバの初期配置の概要について説明する。その後に、データ負荷分散配置システム1の具体的な構成と、データ負荷分散配置方法の具体的な処理の流れについて説明する。   Next, an outline of the initial arrangement of the virtual server of the data load distribution arrangement system 1 according to the present embodiment will be described. After that, a specific configuration of the data load distribution and arrangement system 1 and a specific processing flow of the data load distribution and arrangement method will be described.

(仮想サーバの初期配置の概要)
まず、本実施形態に係るデータ負荷分散配置システム1が仮想サーバの初期配置を行う際の前提となる条件および処理の概要について説明する。
(Outline of initial placement of virtual servers)
First, a description will be given of conditions and an outline of processing that are preconditions when the data load distribution and placement system 1 according to the present embodiment performs initial placement of virtual servers.

本実施形態に係るデータ負荷分散配置システム1では、初期状態として、N台のDBサーバ(物理サーバ)20にH個のデータが保存されているものとする。この場合に、初期状態でのシステム性能要件は、以下の(A)(B)ようになる。   In the data load distribution and arrangement system 1 according to the present embodiment, it is assumed that H pieces of data are stored in N DB servers (physical servers) 20 as an initial state. In this case, the system performance requirements in the initial state are as follows (A) and (B).

(A)各サーバSにかかる負荷Wは、そのサーバ性能T以下である。 (A) The load W m applied to each server S m is equal to or less than the server performance T m .

Figure 2012238084
Figure 2012238084

(B)各サーバSにかかる負荷Wの合計が、システム全体に求める処理性能R以下である。 (B) The total load W m applied to each server S m is equal to or less than the processing performance R required for the entire system.

Figure 2012238084
Figure 2012238084

この(A)および(B)のシステム性能条件を満たす限り、クライアント6は、正常なアクセス応答時間内でシステム内のデータへのアクセスが可能である。   As long as the system performance conditions (A) and (B) are satisfied, the client 6 can access data in the system within a normal access response time.

本実施形態に係る仮想サーバの初期配置では、システム全体に対して1秒当たりのシステム最大性能であるR回のアクセスがあり、各データへのアクセス回数は均等であるとして、1つのデータ当たりR/H回のアクセスがあると仮定する。   In the initial arrangement of the virtual server according to the present embodiment, there are R accesses that are the system maximum performance per second for the entire system, and it is assumed that the number of accesses to each data is equal, and R per data. Assume that there are / H accesses.

そして、システム性能条件(A)および(B)を満たしながら、さらに次のシステム性能条件(C)を満たすように、仮想サーバを配置する。   Then, the virtual server is arranged so as to satisfy the following system performance condition (C) while satisfying the system performance conditions (A) and (B).

(C)各サーバSにかかる負荷Wは、そのサーバ閾値α以下である。 (C) The load W m applied to each server S m is the server threshold value α m or less.

Figure 2012238084
Figure 2012238084

なお、このサーバ閾値αは、以下の(式1)により計算される。 The server threshold value α m is calculated by the following (Equation 1).

Figure 2012238084
Figure 2012238084

ここで、cは、負荷閾値定数であり、例えば、サーバ性能Tの7割をサーバ閾値αとして設定する場合には、システムの管理者等により「0.7」が、負荷閾値定数cとして設定される。
また、負荷Wは、以下の(式2)により計算される。
Here, c is the load threshold constant setting, for example, 70% of the server performance T m in the case of setting as a server threshold value alpha m is the "0.7" by the administrator of the system, as the load threshold constant c Is done.
Further, the load W m is calculated by the following (Equation 2).

Figure 2012238084
Figure 2012238084

ここで、Dは、サーバSに保存されるデータ数であり、αS(i)は、サーバSが保存するデータdS(i)へのアクセス回数である。 Here, D m is the number of data stored in the server S m , and αS m (i) is the number of accesses to the data dS m (i) stored in the server S m .

本実施形態に係る仮想サーバ配置装置10は、ハッシュ空間における各サーバS(DBサーバ20)の担当領域に、仮想サーバを配置し、サーバS(物理サーバ)の担当領域の一部を仮想サーバに担当させる。これにより、そのサーバS(物理サーバ)の担当データ(DBサーバ20が保存するデータ)の一部を、仮想サーバの基となる他の物理サーバ(DBサーバ20)に変更すること、つまり、他のDBサーバ20にそのデータを移して保存させることが可能となる。そして、仮想サーバ配置装置10は、この仮想サーバを用いて、ハッシュ空間における負荷の大きい物理サーバ(DBサーバ20)の担当領域内に、負荷の小さい物理サーバ(DBサーバ20)の仮想サーバを割り当てることで、システム全体の負荷分散を行う。なお、本実施形態において、DBサーバ20をハッシュ空間に配置した場合に、DBサーバ20を、仮想サーバに対応させる意味において物理サーバということがある。 The virtual server placement apparatus 10 according to the present embodiment places a virtual server in the area in charge of each server S m (DB server 20) in the hash space, and virtualizes a part of the area in charge of the server S m (physical server). Let the server take charge. Thereby, a part of the data in charge of the server S m (physical server) (data stored by the DB server 20) is changed to another physical server (DB server 20) that is the basis of the virtual server, that is, The data can be moved and stored in another DB server 20. Then, the virtual server placement apparatus 10 uses this virtual server to allocate the virtual server of the physical server (DB server 20) with a low load in the area in charge of the physical server (DB server 20) with a high load in the hash space. By doing so, load distribution of the entire system is performed. In the present embodiment, when the DB server 20 is arranged in a hash space, the DB server 20 may be referred to as a physical server in the sense of corresponding to a virtual server.

仮想サーバ配置装置10は、各DBサーバ20からサーバ性能Tを取得し、管理者サーバ5から負荷閾値定数cを取得するなどして、(式1)を用いて、サーバ閾値αを計算する。そして、仮想サーバ配置装置10は、負荷Wがかかっている物理サーバSに対し、Oを以下のように定義する。 The virtual server placement apparatus 10 calculates the server threshold value α m using (Equation 1) by acquiring the server performance T m from each DB server 20 and the load threshold constant c from the administrator server 5. To do. Then, the virtual server placement apparatus 10 defines O m for the physical server S m on which the load W m is applied as follows.

Figure 2012238084
Figure 2012238084

ここで、Oは、物理サーバSの負荷Wとサーバ閾値αとの差の絶対値である。 Here, O m is the absolute value of the difference between the load W m and the server threshold value alpha m of physical server S m.

そして、仮想サーバ配置装置10は、物理サーバの集合Sを、以下のようにS,Sの2つの集合に分割する。 Then, the virtual server placement apparatus 10 divides the set S of physical servers into two sets S and S + as follows.

ここで、負荷がサーバ閾値以下の物理サーバの集合を、Sとする。そして、Sに含まれる物理サーバSをOの大きい順に並べたものを以下のように記述する。 Here, the load is a set of the following physical server servers threshold, S - to. Then, S - described as follows an ordered physical servers S m included in the descending order of O m.

Figure 2012238084
Figure 2012238084

一方、負荷がサーバ閾値を超える物理サーバの集合を、Sとする。そして、Sに含まれる物理サーバSをOの大きい順に並べたものを以下のように記述する。 On the other hand, a set of physical servers whose load exceeds the server threshold is defined as S + . Then, the physical servers S m included in S + arranged in order of increasing O m are described as follows.

Figure 2012238084
Figure 2012238084

また、負荷がサーバ閾値以下のサーバSの絶対値O kj、負荷がサーバ閾値を超えるサーバSの絶対値O liを、以下のように定義する。 Further, the absolute value O kj of the server S whose load is equal to or less than the server threshold and the absolute value O + li of the server S + whose load exceeds the server threshold are defined as follows.

Figure 2012238084
Figure 2012238084

次に、仮想サーバ配置装置10による、ハッシュ空間上での仮想サーバの初期配置の概要について説明する。図2〜図5は、本実施形態に係る仮想サーバ配置装置10による、ハッシュ空間上での仮想サーバの初期配置の概要を説明するための図である。   Next, an outline of the initial placement of the virtual server on the hash space by the virtual server placement device 10 will be described. 2-5 is a figure for demonstrating the outline | summary of the initial arrangement | positioning of the virtual server on the hash space by the virtual server arrangement | positioning apparatus 10 which concerns on this embodiment.

ここでは、図2(b)に示すように、仮想サーバ配置装置10により、負荷がサーバ閾値以下のサーバSが、S,S,Sのように、負荷とサーバ閾値との差の絶対値Oの大きい順に並べられ、負荷がサーバ閾値を超えるサーバSが、S,Sのように、負荷とサーバ閾値との差の絶対値Oの大きい順に並べられているものとする。そして、この各サーバS〜Sとその担当データとが、仮想サーバ配置装置10により、図2(a)に示すように、ハッシュ空間上に配置されるとする。 Here, as shown in FIG. 2B, the virtual server placement apparatus 10 causes the server S whose load is equal to or less than the server threshold to be the difference between the load and the server threshold, as in S 3 , S 4 , S 5. Are arranged in descending order of the absolute value O , and servers S + whose loads exceed the server threshold are arranged in descending order of the absolute value O + of the difference between the load and the server threshold as S 1 and S 2 . Shall. Then, it is assumed that the servers S 1 to S 5 and the data in charge thereof are arranged on the hash space by the virtual server arrangement device 10 as shown in FIG.

図2(a)に示すような状態から、仮想サーバ配置装置10は、負荷とサーバ閾値との差の絶対値が大きい順に、負荷がサーバ閾値を超えるサーバSの負荷の超過分の領域に、負荷がサーバ閾値以下のサーバSの仮想サーバを配置することで、負荷がサーバ閾値を超えるサーバSの負荷の超過分のデータの担当を、負荷がサーバ閾値以下のサーバSに変更する。 From the state shown in FIG. 2A, the virtual server placement apparatus 10 increases the load of the server S + in which the load exceeds the server threshold in the descending order of the absolute value of the difference between the load and the server threshold. By placing a virtual server of the server S whose load is below the server threshold, the responsibility for the excess data of the server S + whose load exceeds the server threshold is changed to the server S whose load is below the server threshold To do.

具体的には、図3に示すように、まず、負荷がサーバ閾値を超えるサーバSのうち、絶対値Oが一番大きいSのサーバの負荷の超過分の領域に、負荷がサーバ閾値以下のサーバSのうち、絶対値Oが一番大きいサーバSの仮想サーバVSを配置し、その領域のデータをサーバSが担当する。 Specifically, as shown in FIG. 3, first, the load of the servers S + exceeding server threshold, the area of the excess of the absolute value O + server load largest S 1, the load server The virtual server VS 3 of the server S 3 having the largest absolute value O among the servers S below the threshold is arranged, and the server S 3 takes charge of the data in the area.

次に、図4に示すように、サーバSの残りの負荷の超過分の領域に、負荷がサーバ閾値以下の次のサーバであるサーバSの仮想サーバVSを配置し、その領域のデータをサーバSが担当する。これによって、サーバSの負荷の超過分が解消される。続いて、負荷がサーバ閾値を超える次のサーバであるサーバSの負荷の超過分の領域に、負荷がサーバ閾値以下のサーバSの残りの余剰分を、仮想サーバVSとして配置し、その領域のデータをサーバSが担当する。 Next, as shown in FIG. 4, the virtual server VS 4 of the server S 4 , which is the next server whose load is equal to or less than the server threshold, is arranged in the area where the remaining load of the server S 1 is exceeded. the data server S 4 is in charge. Thus, excess of load on the server S 1 is being eliminated. Subsequently, the remaining surplus portion of the server S 4 whose load is equal to or less than the server threshold is arranged as a virtual server VS 4 in the region where the load of the server S 2 which is the next server whose load exceeds the server threshold value. the data of the area server S 4 is in charge.

続いて、図5に示すように、サーバSの残りの負荷の超過分の領域に、負荷がサーバ閾値以下の次のサーバであるサーバSの仮想サーバVSを配置し、その領域のデータをサーバSが担当する。これによって、サーバSの負荷の超過分が解消される。なお、仮想サーバ配置装置10は、この仮想サーバの配置処理の結果、負荷がサーバ閾値以下のサーバSが不足する場合には、リソース不足通知を管理者サーバ5へ送信する。 Subsequently, as shown in FIG. 5, the virtual server VS 5 of the server S 5 , which is the next server whose load is equal to or less than the server threshold, is arranged in the region where the remaining load of the server S 2 is exceeded. the data server S 5 in charge. Thus, excess of load on the server S 2 is eliminated. Note that the virtual server placement apparatus 10 transmits a resource shortage notification to the administrator server 5 when the server S whose load is equal to or less than the server threshold is insufficient as a result of the virtual server placement processing.

本実施形態に係る仮想サーバ配置装置10は、このように、ハッシュ空間上で、負荷がサーバ閾値を超えるサーバSの負荷の超過分の領域を、負荷がサーバ閾値以下のサーバSが、仮想サーバを設けることにより、その領域のデータを、負荷がサーバ閾値以下のサーバSのサーバが担当する。よって、サーバ間の負荷分散を実現し、仮想サーバの数を減らすことができる。 As described above, the virtual server arrangement device 10 according to the present embodiment has an excess load area of the server S + whose load exceeds the server threshold on the hash space, and the server S whose load is equal to or less than the server threshold. by providing the virtual server, the data of the region, the load is less than the server threshold value server S - server is responsible for. Therefore, load distribution among servers can be realized and the number of virtual servers can be reduced.

(データ負荷分散配置システムの構成)
次に、本実施形態に係るデータ負荷分散配置システム1を構成するDBサーバ20および仮想サーバ配置装置10の構成例について詳細に説明する。
(Data load distribution system configuration)
Next, a configuration example of the DB server 20 and the virtual server arrangement device 10 configuring the data load distribution arrangement system 1 according to the present embodiment will be described in detail.

<DBサーバの構成>
まず、本実施形態に係るDBサーバ20の構成例について、図1を参照して説明する。
DBサーバ20は、データを自身が備える記憶手段(後記する記憶部24)に保存しておき、クライアント6からのデータ取得要求に応じて、その要求のあったデータをクライアント6へ送信する。また、DBサーバ20は、仮想サーバ配置装置10から、各データの保存先となるDBサーバ20を示すサーバ担当データ情報100(詳細は後記する図6参照)を受信すると、そのサーバ担当データ情報100を参照して、自身が担当すべきデータを記憶する他のDBサーバ20から、そのデータを取得し保存する処理を行う。
このDBサーバ20は、図1に示すように、処理部21と、通信部22と、メモリ部23と、記憶部24とを備える。
<DB server configuration>
First, a configuration example of the DB server 20 according to the present embodiment will be described with reference to FIG.
The DB server 20 stores the data in a storage means (storage unit 24 described later) provided in the DB server 20 and transmits the requested data to the client 6 in response to a data acquisition request from the client 6. Further, when the DB server 20 receives from the virtual server placement apparatus 10 the server charge data information 100 (see FIG. 6 to be described later in detail) indicating the DB server 20 that is the storage destination of each data, the server charge data information 100 Referring to FIG. 4, a process of acquiring and storing the data from the other DB server 20 storing the data to be handled by itself is performed.
As illustrated in FIG. 1, the DB server 20 includes a processing unit 21, a communication unit 22, a memory unit 23, and a storage unit 24.

通信部22は、クライアント6、自身以外の他のDBサーバ20および仮想サーバ配置装置10との間の通信を司る、通信インタフェースにより構成される。   The communication unit 22 includes a communication interface that controls communication between the client 6, the DB server 20 other than itself, and the virtual server placement apparatus 10.

処理部21は、DBサーバ20全体の制御を司り、情報受信部211と、データ管理部212と、アクセス監視部214と、データ交換部215と、情報送信部216とを含んで構成される。なお、この処理部21は、例えば、DBサーバ20の記憶部24に格納されたプログラムをCPU(Central Processing Unit)が、メモリ部23であるRAM(Random Access Memory)に展開し実行することで実現される。   The processing unit 21 controls the entire DB server 20 and includes an information receiving unit 211, a data management unit 212, an access monitoring unit 214, a data exchange unit 215, and an information transmission unit 216. The processing unit 21 is realized by, for example, a CPU (Central Processing Unit) developing and executing a program stored in the storage unit 24 of the DB server 20 in a RAM (Random Access Memory) that is the memory unit 23. Is done.

情報受信部211は、通信部22を介して、クライアント6からのデータ要求や、仮想サーバ配置装置10からのサーバ担当データ情報100(図6参照)、他のDBサーバ20から送信されたデータ等を取得する。   The information receiving unit 211 receives a data request from the client 6, server data information 100 (see FIG. 6) from the virtual server placement apparatus 10, data transmitted from another DB server 20, etc. via the communication unit 22. To get.

データ管理部212は、記憶部24に記憶されたデータの管理全般を司る。具体的には、データ管理部212は、クライアント6からのデータ要求を、情報受信部211を介して受け付けると、記憶部24内のサーバ担当データ情報100を参照し、そのデータを記憶するDBサーバ20を検索する。そして、その検索結果を、担当サーバ通知として、情報送信部216を介して、クライアント6に送信する。   The data management unit 212 manages the overall management of data stored in the storage unit 24. Specifically, when the data management unit 212 receives a data request from the client 6 via the information reception unit 211, the data management unit 212 refers to the server charge data information 100 in the storage unit 24 and stores the data. 20 is searched. Then, the search result is transmitted to the client 6 via the information transmission unit 216 as a server notification in charge.

図6は、本実施形態に係るサーバ担当データ情報100のデータ構成の一例を示す図である。
図6に示すように、サーバ担当データ情報100は、各DBサーバ(サーバS)20ごとに、そのサーバSが保存する担当データが記憶される。例えば、サーバSは、「d1〜d3,d6」のデータを保存することを示している。なお、この担当データには、各データのデータキーが「d1」「d2」…、等として記憶される。なお、このサーバ担当データ情報100には、仮想サーバ配置装置10による仮想サーバの初期配置の処理の初期値として、現時点においてDBサーバ20ごとに保存される各データの情報が記憶されているものとする。
FIG. 6 is a diagram illustrating an example of a data configuration of the server charge data information 100 according to the present embodiment.
As shown in FIG. 6, the server handled data information 100, the DB server for each (server S m) 20, charge data that the server S m is saved is stored. For example, the server S 1 indicates that data “d1 to d3, d6” is stored. Note that the data key of each data is stored as “d1,” “d2,”. The server charge data information 100 stores information on each data stored for each DB server 20 at the present time as an initial value of the virtual server initial placement processing by the virtual server placement device 10. To do.

また、データ管理部212は、図1に示すように、ハッシュ値計算部213を備えている。そして、データ管理部212は、通信部22や、不図示の入力部を介して、新たなデータを取得すると、そのデータのデータキーに対して、ハッシュ値計算部213が、所定のハッシュ関数によりハッシュ値を計算する。データ管理部212は、そのデータのデータキーと、そのハッシュ値と、そのデータ(データ値)とを対応付けて、記憶部24内の後記するデータ格納部200に記憶する。   The data management unit 212 includes a hash value calculation unit 213 as shown in FIG. When the data management unit 212 acquires new data via the communication unit 22 or an input unit (not shown), the hash value calculation unit 213 performs a predetermined hash function on the data key of the data. Calculate the hash value. The data management unit 212 associates the data key of the data, the hash value, and the data (data value), and stores them in the data storage unit 200 described later in the storage unit 24.

そして、データ管理部212は、クライアント6から自身が保存するデータに対するデータ取得要求を受け付けると、そのデータ取得要求に付されたデータキーについて、ハッシュ値計算部213がハッシュ値を計算する。次に、データ管理部212は、そのデータキーのハッシュ値を用いて、データ格納部200に記憶されたデータ(データ値)を検索し、検索したデータを、情報送信部216を介して、クライアント6へ送信する。   When the data management unit 212 receives a data acquisition request for data stored by itself from the client 6, the hash value calculation unit 213 calculates a hash value for the data key attached to the data acquisition request. Next, the data management unit 212 searches for the data (data value) stored in the data storage unit 200 using the hash value of the data key, and the searched data is sent to the client via the information transmission unit 216. 6 to send.

また、データ管理部212は、仮想サーバ配置装置10による仮想サーバの初期配置の処理に際して、記憶部24内のデータ格納部200を参照し、自身が保存するすべてのデータのデータキーと、予め記憶部24等に保存されている自身のサーバ性能Tとを、自身のDBサーバ20に固有な番号と共に、情報送信部216を介して仮想サーバ配置装置10に送信する。なお、自身のDBサーバ20に固有な番号とは、例えば、そのDBサーバ20のIPアドレス等であるが、これに限定されず、他のDBサーバ20等と識別可能な番号であればよい。 In addition, the data management unit 212 refers to the data storage unit 200 in the storage unit 24 when the virtual server placement apparatus 10 performs the initial placement processing of the virtual server, and stores in advance the data keys of all the data stored by itself. The server performance T m stored in the unit 24 and the like is transmitted to the virtual server placement apparatus 10 via the information transmitting unit 216 together with a number unique to the own DB server 20. The number unique to the own DB server 20 is, for example, the IP address of the DB server 20, but is not limited thereto, and may be any number that can be distinguished from other DB servers 20.

また、データ管理部212は、システム稼働後、所定間隔Zごとに、自身がその時点で保存するすべてのデータのデータキーと、アクセス監視部214が生成したアクセス回数情報300(後記する図7参照)とを、自身のDBサーバ20に固有な番号と共に、情報送信部216を介して仮想サーバ配置装置10に送信する。
さらに、データ管理部212は、仮想サーバ配置装置10から、新たなサーバ担当データ情報100を取得すると、記憶部24内のサーバ担当データ情報100を更新する処理を行う。
Further, the data management unit 212, after the system operation, at every predetermined interval Z, the data key of all data stored at that time and the access count information 300 generated by the access monitoring unit 214 (see FIG. 7 described later). ) Together with a number unique to its own DB server 20, to the virtual server placement apparatus 10 via the information transmission unit 216.
Furthermore, when the data management unit 212 obtains new server handling data information 100 from the virtual server placement apparatus 10, the data management unit 212 performs a process of updating the server handling data information 100 in the storage unit 24.

アクセス監視部214は、データ管理部212を監視し、クライアント6からのデータ取得要求を受け付けるごとに、データ格納部200に記憶された各データへのアクセス回数をカウントし、その結果を、アクセス回数情報300として記憶する。   The access monitoring unit 214 monitors the data management unit 212 and counts the number of accesses to each data stored in the data storage unit 200 every time a data acquisition request from the client 6 is received. Store as information 300.

図7は、本実施形態に係るアクセス回数情報300のデータ構成の一例を示す図である。
図7に示すように、アクセス回数情報300には、各DBサーバ20自身が記憶するデータごとに、クライアント6からアクセスが何回あったかを示す情報であり、各データのデータキーと、そのデータのアクセス回数が記憶される。なお、このアクセス回数情報300は、データ管理部212により、仮想サーバ配置装置10へ所定間隔Zごとに送信される。
FIG. 7 is a diagram illustrating an example of a data configuration of the access count information 300 according to the present embodiment.
As shown in FIG. 7, the access count information 300 is information indicating the number of accesses from the client 6 for each data stored in each DB server 20 itself, the data key of each data, and the data The number of accesses is stored. The access count information 300 is transmitted by the data management unit 212 to the virtual server placement apparatus 10 at predetermined intervals Z.

データ交換部215は、データ管理部212が仮想サーバ配置装置10から新たなサーバ担当データ情報100を受信したことを契機として、その新たなサーバ担当データ情報100と記憶部24に保存していたサーバ担当データ情報100と比較することにより、自身が保存していないデータおよびそのデータの保存先となる他のDBサーバ20を抽出する。そして、データ交換部215は、その抽出した自身が担当すべきデータを記憶している他のDBサーバ20に対して、データ交換要求を送信することにより、そのデータの送信を依頼し、担当すべきデータを取得する。続いて、データ交換部215は、記憶部24に保存していたサーバ担当データ情報100を、データ管理部212を介して、受信した新たなサーバ担当データ情報100に更新させる。   The data exchange unit 215 receives the server management data information 100 from the virtual server placement apparatus 10 by the data management unit 212 as a trigger, and the server stored in the new server management data information 100 and the storage unit 24. By comparing with the responsible data information 100, data that is not stored by itself and another DB server 20 that is the storage destination of the data are extracted. Then, the data exchange unit 215 requests the transmission of the data by sending a data exchange request to the other DB server 20 storing the data to be handled by the extracted data 215, and is in charge of it. Get power data. Subsequently, the data exchange unit 215 updates the server charge data information 100 stored in the storage unit 24 to the received new server charge data information 100 via the data management unit 212.

情報送信部216は、通信部22を介して、クライアント6への担当サーバ通知や、仮想サーバ配置装置10への自身が保存するデータに関する情報、他のDBサーバ20へのデータ交換要求等を送信する。   The information transmission unit 216 transmits, via the communication unit 22, notification of the server in charge to the client 6, information regarding data stored by itself to the virtual server placement apparatus 10, data exchange requests to other DB servers 20, and the like. To do.

次に、記憶部24は、ハードディスクやフラッシュメモリ等の記憶装置からなり、サーバ担当データ情報100、データ格納部200、アクセス回数情報300を記憶している。   Next, the storage unit 24 includes a storage device such as a hard disk or a flash memory, and stores server-in-charge data information 100, a data storage unit 200, and access count information 300.

メモリ部23は、RAM等の一次記憶装置からなり、処理部21によるデータ処理に必要な情報を一次的に記憶している。   The memory unit 23 includes a primary storage device such as a RAM, and temporarily stores information necessary for data processing by the processing unit 21.

<仮想サーバ配置装置の構成>
次に、本実施形態に係る仮想サーバ配置装置10の構成について、図1を参照して説明する。
仮想サーバ配置装置10は、データを複数のDBサーバ20に分散して保存させるために、データ(データキー)とDBサーバ(固有の番号)20とをハッシュ関数にかけてリング状のハッシュ空間に配置する。そして、仮想サーバ配置装置10は、各DBサーバ20のサーバ性能Tや、時間経過に伴うサーバ負荷の変動を考慮した上で、仮想サーバをハッシュ空間上に配置する。仮想サーバ配置装置10は、仮想サーバの配置により決定した各DBサーバ20が保存すべきデータの情報(サーバ担当データ情報100)を、各DBサーバ20それぞれに送信する。
<Configuration of virtual server placement device>
Next, the configuration of the virtual server placement apparatus 10 according to the present embodiment will be described with reference to FIG.
The virtual server arrangement device 10 arranges data (data key) and DB server (unique number) 20 in a ring-shaped hash space by applying a hash function in order to distribute and store the data in a plurality of DB servers 20. . Then, the virtual server placement device 10 and server performance the T m of each of the DB server 20, in consideration of variations in the server load over time, placing the virtual server on the hash space. The virtual server placement apparatus 10 transmits information on data to be stored by each DB server 20 determined by the placement of the virtual server (server-in-charge data information 100) to each DB server 20.

この仮想サーバ配置装置10は、図1に示すように、制御部11と、通信部12と、メモリ部13と、記憶部14とを備える。   As illustrated in FIG. 1, the virtual server arrangement device 10 includes a control unit 11, a communication unit 12, a memory unit 13, and a storage unit 14.

通信部12は、各DBサーバ20および管理者サーバ5との間の通信を司る、通信インタフェースにより構成される。   The communication unit 12 includes a communication interface that manages communication between each DB server 20 and the administrator server 5.

制御部11は、仮想サーバ配置装置10全体の制御を司り、情報受信部111と、サーバ負荷計算部112と、配置処理部113と、仮想サーバ再配置計算部115と、情報送信部116とを含んで構成される。なお、この制御部11は、例えば、仮想サーバ配置装置10の記憶部14に格納されたプログラムをCPUが、メモリ部13であるRAMに展開し実行することで実現される。   The control unit 11 controls the entire virtual server placement apparatus 10, and includes an information reception unit 111, a server load calculation unit 112, a placement processing unit 113, a virtual server relocation calculation unit 115, and an information transmission unit 116. Consists of including. The control unit 11 is realized, for example, when the CPU stores the program stored in the storage unit 14 of the virtual server placement apparatus 10 in the RAM that is the memory unit 13 and executes the program.

情報受信部111は、通信部12を介して、DBサーバ20それぞれから、各DBサーバ20に記憶されたデータ等に関する情報を受信したり、管理者サーバ5から、仮想サーバの配置に必要となる設定情報等を取得する。   The information receiving unit 111 receives information related to data stored in each DB server 20 from each DB server 20 via the communication unit 12, or is necessary for placement of the virtual server from the administrator server 5. Get setting information.

サーバ負荷計算部112は、各DBサーバ20のサーバ閾値αおよび負荷Wを計算する。
具体的には、サーバ負荷計算部112は、仮想サーバの初期配置の処理において、管理者サーバ5等から、システム全体に求める処理性能Rおよび負荷閾値定数cを取得し、DBサーバ20から各DBサーバ20のサーバ性能Tおよびデータキーを取得する。そして、サーバ負荷計算部112は、各DBサーバ20のサーバ性能Tと負荷閾値定数cにより、(式1)を用いて、各DBサーバ20のサーバ閾値αを計算する。また、サーバ負荷計算部112は、各DBサーバ20から取得したデータキーの数を合計し、システム全体のデータ数Hを計算する。そして、各データへのアクセス回数が均等であると仮定し、1つのデータへのアクセス回数をR/H回として、(式2)を用いて、各DBサーバ20の負荷Wを計算する。
The server load calculation unit 112 calculates the server threshold value α m and the load W m of each DB server 20.
Specifically, the server load calculation unit 112 acquires the processing performance R and the load threshold constant c required for the entire system from the administrator server 5 or the like in the process of initial placement of the virtual server, and each DB from the DB server 20. The server performance T m and the data key of the server 20 are acquired. Then, the server load calculation unit 112 calculates the server threshold value α m of each DB server 20 using (Equation 1) based on the server performance T m of each DB server 20 and the load threshold constant c. Further, the server load calculation unit 112 sums the number of data keys acquired from each DB server 20 and calculates the number of data H of the entire system. Then, assuming that the number of accesses to each data is equal, the number of accesses to one data is R / H times, and the load W m of each DB server 20 is calculated using (Equation 2).

そして、サーバ負荷計算部112は、計算したDBサーバ20ごとの負荷Wとサーバ閾値αとを比較し、負荷がサーバ閾値以下のサーバSの集合と、負荷がサーバ閾値を超えるサーバSの集合とを生成して、その集合ごとに、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列する処理を行う。 Then, the server load calculation unit 112 compares the calculated load W m for each DB server 20 with the server threshold value α m, and the set of servers S whose load is equal to or less than the server threshold value and the server S whose load exceeds the server threshold value. A set of + is generated, and for each set, the servers are arranged in descending order of the absolute value of the difference between the load W m and the server threshold value α m .

また、サーバ負荷計算部112は、仮想サーバの再配置の処理において、所定間隔Zごとに各DBサーバ20が記憶するデータのデータキーと、そのデータに対するアクセス回数を記録したアクセス回数情報300を、各DBサーバ20から取得する。そして、(式2)を用いて、各DBサーバ20の負荷Wを計算する。
また、サーバ負荷計算部112は、計算した所定間隔Z経過後のDBサーバ20ごとの負荷Wとサーバ閾値αとを比較し、負荷がサーバ閾値以下のサーバSの集合と、負荷がサーバ閾値を超えるサーバSの集合とを生成して、その集合ごとに、所定間隔Z経過時点における、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列する処理を行う。
Further, the server load calculation unit 112, in the virtual server rearrangement process, obtains the data key of the data stored in each DB server 20 for each predetermined interval Z and the access count information 300 that records the access count for the data. Obtained from each DB server 20. Then, using the equation (2), calculates the load W m of the DB server 20.
Further, the server load calculation unit 112 compares the calculated load W m for each DB server 20 after the elapse of the predetermined interval Z with the server threshold value α m, and the set of servers S whose load is equal to or less than the server threshold value and the load A process of generating a set of servers S + exceeding the server threshold and arranging the servers in the descending order of the absolute value of the difference between the load W m and the server threshold α m when the predetermined interval Z elapses. Do.

次に、配置処理部113は、ハッシュ値計算部114を備えており、コンシステントハッシュ法(時計回り方式)を用いて、各DBサーバ(固有の番号)20およびデータ(データキー)のハッシュ値を計算し、ハッシュ空間上に各DBサーバ20およびデータを配置する。
そして、配置処理部113は、負荷がサーバ閾値を超えるサーバSのうち、絶対値Oが大きいDBサーバ20から順に、ハッシュ空間上の担当領域の超過分に対して、負荷がサーバ閾値以下のサーバSのうち、絶対値Oが大きいDBサーバ20から順に仮想サーバを配置することで、負荷がサーバ閾値を超えるサーバSの超過分を解消する処理(仮想サーバ配置処理)を行う。なお、この仮想サーバ配置処理の詳細については、図9および図10を用いて説明する。
Next, the arrangement processing unit 113 includes a hash value calculation unit 114, and uses a consistent hash method (clockwise method) to hash values of each DB server (unique number) 20 and data (data key). And each DB server 20 and data are arranged on the hash space.
The placement processing unit 113 then loads the server S + with the load exceeding the server threshold, in order from the DB server 20 with the largest absolute value O + , the load is less than the server threshold with respect to the excess of the assigned area in the hash space. Among the servers S , the virtual server is arranged in order from the DB server 20 having the largest absolute value O −, thereby performing a process (virtual server arrangement process) for eliminating the excess of the server S + whose load exceeds the server threshold. . Details of the virtual server arrangement processing will be described with reference to FIGS. 9 and 10.

配置処理部113は、負荷がサーバ閾値を超えるサーバSのすべての超過分について、仮想サーバを配置することにより決定した、各DBサーバ20が担当するデータについての新たなサーバ担当データ情報100を生成する。そして、配置処理部113は、情報送信部116を介して、各DBサーバ20それぞれに、新たなサーバ担当データ情報100を送信する。 The placement processing unit 113 obtains new server charge data information 100 for data handled by each DB server 20 determined by placing virtual servers for all excesses of the server S + whose load exceeds the server threshold. Generate. Then, the arrangement processing unit 113 transmits the new server charge data information 100 to each DB server 20 via the information transmission unit 116.

また、配置処理部113は、仮想サーバを配置しても、負荷がサーバ閾値を超えるサーバSの超過分を解消できない場合には、情報送信部116を介して、管理者サーバ5に、DBサーバ20のリソースが足りないことを示すリソース不足通知を送信する。 Further, if the placement processing unit 113 cannot solve the excess of the server S + whose load exceeds the server threshold even if the virtual server is placed, the placement processing unit 113 sends the DB to the administrator server 5 via the information transmission unit 116. A resource shortage notification indicating that the resources of the server 20 are insufficient is transmitted.

次に、仮想サーバ再配置計算部115は、仮想サーバの再配置の処理において、サーバ負荷計算部112が、所定間隔Z経過時点における、負荷がサーバ閾値以下のサーバSと、負荷がサーバ閾値を超えるサーバSとについて、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列する処理が行ったことを契機として、所定間隔Z経過時点において、負荷がサーバ閾値以下のサーバSに、ハッシュ空間上で仮想サーバが配置されていた場合に、その仮想サーバを取り除く処理(仮想サーバ再配置計算)を行う。つまり、元々そのDBサーバ20自身が担当すべきハッシュ空間の担当領域を、そのDBサーバ20の負荷Wがサーバ閾値αより大きいため、他のDBサーバ20が仮想サーバを配置することにより、データの保存先を変更してもらっていたものを、時間の経過により、サーバの負荷が変化し、負荷に余裕が生じたため、仮想サーバが担当していたデータ分を、元々のDBサーバ20の担当領域に戻す処理を行う。なお、この仮想サーバ再配置計算の詳細は、後記する図12〜図18を参照して説明する。 Next, in the virtual server relocation processing, the virtual server relocation calculation unit 115 determines that the server load calculation unit 112 has a server S whose load is equal to or less than the server threshold when the predetermined interval Z has elapsed, and the load is the server threshold. For the server S + exceeding the load, the load is less than or equal to the server threshold at the time when the predetermined interval Z has elapsed, as a result of performing the process of arranging the servers in descending order of the absolute value of the difference between the load W m and the server threshold α m. server S - to, if the virtual server has been arranged on the hash space, performs processing (virtual server relocation calculation) to remove the virtual server. In other words, since the load W m of the DB server 20 is larger than the server threshold value α m , the area of the hash space that the DB server 20 should originally be responsible for is allocated to another DB server 20 by placing a virtual server. As the data storage destination was changed, the load on the server changed over time, and there was a margin in the load, so the data that was handled by the virtual server was handled by the original DB server 20 Perform processing to return to the area. Details of the virtual server relocation calculation will be described with reference to FIGS.

情報送信部116は、通信部12を介して、各DBサーバ20それぞれに、配置処理部113が生成したサーバ担当データ情報100を送信する。また、情報送信部116は、管理者サーバ5に対し、リソース不足通知を送信する。   The information transmission unit 116 transmits the server handling data information 100 generated by the arrangement processing unit 113 to each DB server 20 via the communication unit 12. Further, the information transmission unit 116 transmits a resource shortage notification to the administrator server 5.

次に、記憶部14は、ハードディスクやフラッシュメモリ等の記憶装置からなり、配置処理部113が生成したサーバ担当データ情報100を記憶している。   Next, the storage unit 14 includes a storage device such as a hard disk or a flash memory, and stores server-in-charge data information 100 generated by the arrangement processing unit 113.

メモリ部13は、RAM等の一次記憶装置からなり、制御部11によるデータ処理に必要な情報を一次的に記憶している。   The memory unit 13 includes a primary storage device such as a RAM, and temporarily stores information necessary for data processing by the control unit 11.

次に、本実施形態に係るデータ負荷分散配置システム1が行う、(1)各DBサーバ20のサーバ性能を考慮した仮想サーバの初期配置によるデータ負荷分散配置処理と、(2)システム稼動後の時間経過に伴うデータ数やデータアクセス回数の増減に対応した動的な仮想サーバの再配置と、について具体的に説明する。   Next, the data load distribution arrangement system 1 according to this embodiment performs (1) data load distribution arrangement processing by initial arrangement of virtual servers in consideration of server performance of each DB server 20, and (2) after system operation The dynamic virtual server relocation corresponding to the increase / decrease in the number of data and the number of data accesses over time will be specifically described.

(データ負荷分散配置処理―仮想サーバの初期配置)
まず、図8を参照して、データ負荷分散配置システム1が行う、仮想サーバの初期配置における全体の処理の流れについて説明する。図8は、本実施形態に係るデータ負荷分散配置処理(仮想サーバの初期配置)の全体の処理の流れを示すシーケンス図である。
(Data load distribution placement processing-virtual server initial placement)
First, the overall processing flow in the initial placement of the virtual server performed by the data load distribution and placement system 1 will be described with reference to FIG. FIG. 8 is a sequence diagram showing an overall processing flow of the data load distribution arrangement processing (initial arrangement of virtual servers) according to the present embodiment.

まず、管理者サーバ5から、仮想サーバ配置装置10が、システム全体に求める処理性能Rと、各サーバのサーバ閾値を決定するための負荷閾値定数cとを、設定情報として取得する(ステップS11)。なお、この処理は、予め、仮想サーバ配置装置10の記憶部14に、設定情報として記憶するようにしてもよい。   First, the processing performance R required for the entire system and the load threshold constant c for determining the server threshold value of each server are acquired as setting information from the administrator server 5 (step S11). . This process may be stored in advance as setting information in the storage unit 14 of the virtual server placement apparatus 10.

次に、各DBサーバ20は、自身が保存しているデータのデータキー、および自サーバのサーバ性能Tを、自身に固有な番号とともに、仮想サーバ配置装置10に送信する(ステップS12)。 Then, the DB server 20, the data key of the data itself is stored, and a server performance T m of a local server with a unique number to it, and transmits to the virtual server placement device 10 (step S12).

続いて、仮想サーバ配置装置10のサーバ負荷計算部112は、サーバ負荷計算処理を行う(ステップS13)。
具体的には、サーバ負荷計算部112は、管理者サーバ5から受信した設定情報に含まれる負荷閾値定数cと、各DBサーバ20から受信したサーバ性能Tとに基づき、(式1)を用いて、各サーバのサーバ閾値αを計算する。そして、サーバ負荷計算部112は、管理者サーバ5から受信したシステム全体に求める処理性能Rと、各サーバから受信したデータキーの数の合計から得られるデータ数Hとに基づき、(式2)を用いて、DBサーバ20ごとの負荷Wを計算する。なお、この仮想サーバの初期配置では、システム全体に対して1秒当たりシステム最大性能であるR回のアクセスがあり、各データへのアクセス回数は均等であるR/H回と想定する。
そして、サーバ負荷計算部112は、計算したDBサーバ20ごとの負荷Wとサーバ閾値αとを比較し、負荷がサーバ閾値以下のサーバSの集合と、負荷がサーバ閾値を超えるサーバSの集合とを生成して、その集合ごとに、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列する処理を行う。
Subsequently, the server load calculation unit 112 of the virtual server arrangement device 10 performs a server load calculation process (step S13).
Specifically, the server load calculation unit 112 calculates (Equation 1) based on the load threshold constant c included in the setting information received from the administrator server 5 and the server performance T m received from each DB server 20. And calculate the server threshold α m for each server. Then, the server load calculation unit 112 is based on the processing performance R required for the entire system received from the administrator server 5 and the number of data H obtained from the total number of data keys received from each server (Formula 2). Is used to calculate the load W m for each DB server 20. In this initial placement of the virtual server, it is assumed that there are R accesses that are the maximum system performance per second for the entire system, and the number of accesses to each data is equal R / H times.
Then, the server load calculation unit 112 compares the calculated load W m for each DB server 20 with the server threshold value α m, and the set of servers S whose load is equal to or less than the server threshold value and the server S whose load exceeds the server threshold value. A set of + is generated, and for each set, the servers are arranged in descending order of the absolute value of the difference between the load W m and the server threshold value α m .

そして、仮想サーバ配置装置10の配置処理部113が、ハッシュ空間上での仮想サーバの配置処理(「仮想サーバ配置処理」)を行うことにより、サーバ担当データ情報100を生成する(ステップS14)。ここで、配置処理部113は、この仮想サーバ配置処理において、リソース不足と判定した場合には、サーバ担当データ情報100を生成せずに、そのリソース不足通知を、管理者サーバ5に送信し(ステップS15)、物理サーバ(DBサーバ20)の追加を促して(ステップS16)、処理を終える。   Then, the placement processing unit 113 of the virtual server placement device 10 performs the placement processing of the virtual server on the hash space (“virtual server placement processing”), thereby generating the server handling data information 100 (step S14). Here, if the placement processing unit 113 determines that the resource is insufficient in this virtual server placement processing, the placement processing unit 113 transmits the resource shortage notification to the administrator server 5 without generating the server charge data information 100 ( Step S15) prompts the addition of a physical server (DB server 20) (Step S16), and ends the process.

一方、仮想サーバ配置装置10が、サーバ担当データ情報100を生成した場合には、そのサーバ担当データ情報100を、各DBサーバ20それぞれに送信する(ステップS17)。   On the other hand, when the virtual server placement apparatus 10 generates the server charge data information 100, the server charge data information 100 is transmitted to each DB server 20 (step S17).

そして、各DBサーバ20同士で担当データの交換処理を行う(ステップS18)。具体的には、各DBサーバ20のデータ交換部215は、仮想サーバ配置装置10から受信した新たなサーバ担当データ情報100と、記憶部24に保存していたサーバ担当データ情報100とを比較し、自身のDBサーバ20が、追加して記憶すべきデータを、そのデータを保存するDBサーバ20に問い合わせる。そして、問い合わせを受けたDBサーバ20は、そのデータを問い合わせ元のDBサーバ20に送信し、その送信確認後に自身のサーバからそのデータを削除する処理を行う。また、データ交換部215は、記憶部24に保存していたサーバ担当データ情報100を、データ管理部212を介して、受信した新たなサーバ担当データ情報100に更新させる。   Then, each DB server 20 exchanges responsible data (step S18). Specifically, the data exchange unit 215 of each DB server 20 compares the new server charge data information 100 received from the virtual server placement apparatus 10 with the server charge data information 100 stored in the storage unit 24. The own DB server 20 inquires the DB server 20 that stores the data to be additionally stored. Then, the DB server 20 that has received the inquiry transmits the data to the inquiring DB server 20, and performs processing to delete the data from its own server after confirming the transmission. In addition, the data exchange unit 215 updates the server charge data information 100 stored in the storage unit 24 to the received new server charge data information 100 via the data management unit 212.

<仮想サーバ配置処理>
次に、図9および図10を参照して、仮想サーバ配置装置10(配置処理部113)による仮想サーバ配置処理(図8のステップS14)について詳細に説明する。図9および図10は、本実施形態に係る仮想サーバ配置装置10の配置処理部113による仮想サーバ配置処理の流れを示すフローチャートである(適宜図1参照)。
<Virtual server placement processing>
Next, with reference to FIG. 9 and FIG. 10, the virtual server placement process (step S14 in FIG. 8) by the virtual server placement apparatus 10 (placement processing unit 113) will be described in detail. 9 and 10 are flowcharts showing the flow of the virtual server placement processing by the placement processing unit 113 of the virtual server placement device 10 according to the present embodiment (see FIG. 1 as appropriate).

なお、この配置処理部113による仮想サーバ配置処理は、図8のステップS13において、仮想サーバ配置装置10のサーバ負荷計算部112により、各DBサーバ20の負荷Wが計算され、負荷がサーバ閾値以下のサーバSと、負荷がサーバ閾値を超えるサーバSとについて、負荷Wとサーバ閾値αとの差の絶対値が大きい順に、サーバがすでに整列されているものとして説明する。
そして、配置処理部113は、図2〜図5において説明したように、負荷Wとサーバ閾値αとの差の絶対値が大きい順に、負荷がサーバ閾値を超えるサーバSの負荷の超過分の領域に、負荷がサーバ閾値以下のサーバSの仮想サーバを配置することで、負荷がサーバ閾値を超えるサーバSの負荷の超過分の担当データを、負荷がサーバ閾値以下のサーバSに変更する処理を行う。以下、具体的に説明する。
Note that in the virtual server placement processing by the placement processing unit 113, the load W m of each DB server 20 is calculated by the server load calculation unit 112 of the virtual server placement device 10 in step S13 of FIG. the following server S - a, the server S + capital the load exceeds the server threshold value, in order the larger the absolute value of the difference between the load W m and the server threshold value alpha m, be described as the server is already aligned.
Then, as described with reference to FIGS. 2 to 5, the arrangement processing unit 113 exceeds the load of the server S + whose load exceeds the server threshold in descending order of the absolute value of the difference between the load W m and the server threshold α m. By placing the virtual server of the server S whose load is less than the server threshold in the area of the minute, the responsible data for the excess load of the server S + whose load exceeds the server threshold, and the server S whose load is less than the server threshold - carry out the process of changing to. This will be specifically described below.

まず、配置処理部113は、負荷がサーバ閾値を超えるサーバS、負荷がサーバ閾値以下のサーバSそれぞれについて、初期値として、絶対値(O li,O kj)が大きい順に1番目のサーバを選択し(「i←1」「j←1」)、初期値のFlagとして「True」を設定する(ステップS101)。なお、ここで、「i」は、(式5)で示したように、0<i≦qを満たし、「j」は、(式4)で示したように、0<j≦pを満たす値である。また、このFlagは、以後のステップS113,S117,S119(図10参照)で設定されるものであり、負荷がサーバ閾値を超えるサーバSの負荷の超過分を解消するために、負荷がサーバ閾値以下のサーバSが仮想サーバの割当てを行った場合に、さらに、まだ仮想サーバを割り当てる負荷の余裕分があるか否かを示すFlagである。そして、次に割り当てる負荷の余裕分がない場合に「True」、次に割り当てる負荷の余裕分がある場合に「false」のFlagが設定される。 First, the placement processing unit 113 is the first in descending order of the absolute value (O + li , O kj ) as an initial value for each of the server S + whose load exceeds the server threshold and the server S whose load is equal to or less than the server threshold. Are selected (“i ← 1” and “j ← 1”), and “True” is set as the initial value Flag (step S101). Here, “i” satisfies 0 <i ≦ q as shown in (Expression 5), and “j” satisfies 0 <j ≦ p as shown in (Expression 4). Value. In addition, this Flag is set in subsequent steps S113, S117, and S119 (see FIG. 10). In order to eliminate the excess load of the server S + whose load exceeds the server threshold, subthreshold server S - if the performed assignment of virtual servers, further a Flag still indicates whether there is a margin in the load allocating a virtual server. Then, “True” is set when there is no margin for the next load to be allocated, and “false” is set when there is a margin for the next load to be allocated.

次に、配置処理部113は、負荷がサーバ閾値を超えるサーバS liのうち、まだ処理していないサーバがあるか否かを判定する(i<q+1)(ステップS102)。ここで、まだ処理していない、負荷がサーバ閾値を超えるサーバS liがない、つまり、すべての負荷がサーバ閾値を超えるサーバS liの処理を終えている場合には(ステップS102→No)、処理を終了する。一方、まだ、処理していない、負荷がサーバ閾値を超えるサーバS liがある場合には(ステップS102→Yes)、次のステップS103へ進む。 Next, the arrangement processing unit 113 determines whether there is a server that has not yet been processed among the servers S + li whose load exceeds the server threshold (i <q + 1) (step S102). Here, not yet processed, the load is no server S + li exceeding server threshold, that is, when all the load is finished with the server S + li exceeding the server threshold value (step S102 → No ), The process is terminated. On the other hand, if there is a server S + li that has not yet been processed and the load exceeds the server threshold (step S102 → Yes), the process proceeds to the next step S103.

ステップS103において、配置処理部113は、負荷がサーバ閾値を超えるサーバS liが、どのくらいサーバ閾値を超えているかの絶対値(O li:超過分)を計算する(O li ← Wli−αli)。 In step S103, the arrangement processing unit 113 calculates the absolute value (O + li : excess) of how much the server S + li whose load exceeds the server threshold exceeds the server threshold (O + li ← W li −α li ).

次に、配置処理部113は、その負荷がサーバ閾値を超えるサーバS liが、そのサーバのサーバ閾値αli以下でそのサーバが担当可能な最大個数のデータのハッシュ空間上での値xを計算する(ステップS104)。このxは、負荷がサーバ閾値を超えるサーバS liの担当領域内のデータのハッシュ値をその負荷がサーバ閾値を超えるサーバS liのハッシュ値に近い順に並べたときに、負荷がサーバ閾値α以下で最大となるh番目のデータのハッシュ値となる(x ← max{ x ;Σ h=1,…,x bli (h)≦ αli })。ここで、bli (h)は、サーバS liの担当領域のうちのデータのハッシュ値をサーバS liのハッシュ値に近い順に並べたときに、h番目のデータにかかる負荷を示す。なお、この処理は、後記するステップS109において、仮想サーバの配置位置を決定する際に利用される。 Next, the placement processing unit 113 calculates the value x on the hash space of the maximum number of data that can be handled by the server S + li whose load exceeds the server threshold value and is below the server threshold value α li of the server. Calculate (step S104). This x indicates that when the hash values of the data in the area in charge of the server S + li whose load exceeds the server threshold are arranged in the order close to the hash value of the server S + li whose load exceeds the server threshold, This is the hash value of the h-th data that is the maximum at α m or less (x ← max {x; Σh = 1,..., x b li (h) ≦ α li }). Here, b li (h), when arranged a hash value of data in the coverage area of the server S + li sequentially closer to the hash value of the server S + li, showing the load on the h-th data. This process is used when determining the placement position of the virtual server in step S109 described later.

続いて、配置処理部113は、負荷がサーバ閾値以下のサーバS kjがあるか否かを判定する(j<p+1)(ステップS105)。ここで、負荷がサーバ閾値以下のサーバS kjがない場合には(ステップS105→No)、ステップS122(図10参照)に進み、管理者サーバ5に、物理サーバ(DBサーバ20)の追加依頼を送信し、処理を終える。一方、負荷がサーバ閾値以下のサーバS kjがある場合には(ステップS105→Yes)、次のステップS106へ進む。 Subsequently, the placement processing unit 113 determines whether there is a server S kj whose load is equal to or less than the server threshold (j <p + 1) (step S105). Here, when there is no server S - kj whose load is equal to or less than the server threshold (step S105 → No), the process proceeds to step S122 (see FIG. 10), and a physical server (DB server 20) is added to the administrator server 5. Send the request and finish the process. On the other hand, if there is a server S - kj whose load is equal to or less than the server threshold (step S105 → Yes), the process proceeds to the next step S106.

ステップS106において、配置処理部113は、Flagが「true」か否かを判定する。つまり、直前の負荷解消のために割り当てた、負荷がサーバ閾値以下のサーバS kjの負荷の余裕分が使えるか否かを判定する。具体的には、負荷を解消するために、自身の負荷の余裕分をすべて使って仮想サーバの割り当てを行ったか(Flag=true)、仮想サーバの割り当てを行ってもなお負荷の余裕分が残っているか(Flag=false)を判定する。なお、負荷がサーバ閾値を超えるサーバS liの絶対値O liの大きい順で1番目のサーバ(i=1)については、ステップS101で初期値のFlagとして「True」が設定されている。 In step S <b> 106, the arrangement processing unit 113 determines whether or not Flag is “true”. That is, it is determined whether or not the load margin of the server S - kj , which is assigned to eliminate the previous load and the load is equal to or less than the server threshold, can be used. Specifically, in order to eliminate the load, the virtual server was allocated using all of its own load margin (Flag = true), or the load margin still remained after the virtual server allocation. (Flag = false) is determined. For the first server (i = 1) in the descending order of the absolute value O + li of the server S + li whose load exceeds the server threshold, “True” is set as the initial value Flag in step S101. .

ここで、Flag=trueの場合は(ステップS106→Yes)、次のステップS107において、配置処理部113が、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値を計算し(O kj← αkj−Wkj)、ステップS109へ進む。一方、Flag=falseの場合は(ステップS106→No)、次のステップS108において、直前に負荷を割り当てた、負荷がサーバ閾値以下のサーバS kjの負荷の余裕分「Rest」を取得し(O kj← Rest)、ステップS109へ進む。なお、この負荷の余裕分「Rest」は、後記するステップS116(図10参照)において、計算されるものである。 Here, if Flag = true (step S106 → Yes), in the next step S107, the placement processing unit 113 calculates the absolute value of the load of the server S - kj whose load is equal to or less than the server threshold (O - kj). ← α kj −W kj ), the process proceeds to step S109. On the other hand, when Flag = false (step S106 → No), in the next step S108, the load “Rest” of the load of the server S kj whose load is assigned immediately before and whose load is equal to or less than the server threshold is acquired ( O kj ← Rest), the process proceeds to step S109. Note that this load margin “Rest” is calculated in step S116 (see FIG. 10) described later.

そして、配置処理部113は、ステップS109において、サーバS liの担当領域のx+1の位置に、サーバS kjの仮想サーバを割り当てる。この仮想サーバの配置位置は、ステップS104において計算した、負荷がサーバ閾値を超えるサーバが、サーバ閾値以下でそのサーバが担当可能な最大個数のデータのハッシュ空間上での値xの次のハッシュ値であるx+1に設定される。 In step S109, the arrangement processing unit 113 assigns the virtual server of the server S kj to the position of x + 1 in the area in charge of the server S + li . The placement position of this virtual server is the hash value next to the value x in the hash space of the maximum number of data that can be handled by the server whose load exceeds the server threshold value and is below the server threshold value calculated in step S104. Is set to x + 1.

図10に進み、ステップS110において、配置処理部113は、ステップS109(図9参照)で決定した配置位置に、仮想サーバを配置した場合に、負荷がサーバ閾値を超えるサーバS liの負荷が解消されるか否かを判定する。具体的には、配置処理部113は、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値(O li:超過分)と、仮想サーバを設定する負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)とを比較し、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値O liの方が大きいか否かを判定する(O li> O kj)。 Proceeding to FIG. 10, in step S110, when the placement processing unit 113 places a virtual server at the placement position determined in step S109 (see FIG. 9), the load of the server S + li whose load exceeds the server threshold is detected . It is determined whether or not it is resolved. Specifically, the arrangement processing unit 113, the absolute value of the load of the server S + li the load exceeds the server threshold: and (O + li excess), the load of setting the virtual server is less server threshold server S - the absolute value of the load kj -: compare (O kj margin) and the load determines whether towards the absolute value O + li of the load of the server S + li exceeding the server threshold value is large (O + li > O - kj ).

ここで、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値O liの方が大きい場合(ステップS110→Yes)、つまり、仮想サーバを割り当てても、まだ、負荷がサーバ閾値を超えている場合(超過分が残っている場合)には、次のステップS111へ進む。 Here, when the absolute value O + li of the load of the server S + li whose load exceeds the server threshold is larger (step S110 → Yes), that is, even if a virtual server is allocated, the load still exceeds the server threshold If there is an excess (if there is an excess), the process proceeds to the next step S111.

ステップS111において、配置処理部113は、ステップS109(図9参照)で設定した、ハッシュ空間上の仮想サーバの配置位置から、その仮想サーバの担当可能な最大個数のデータのハッシュ空間上での値xを計算する(x ← max{ x ;Σ h=1,…,x bli (h)≦ αli })。なお、このハッシュ空間上での値xは、絶対値O kjの大きさ順が次の負荷がサーバ閾値以下のサーバS kjの仮想サーバを、ハッシュ空間上に割り当てる際(再び、ステップS109の処理を行う際)に、その仮想サーバの配置位置を決定するときに利用される。 In step S111, the placement processing unit 113 sets the value on the hash space of the maximum number of data that can be handled by the virtual server from the placement position of the virtual server on the hash space set in step S109 (see FIG. 9). x is calculated (x ← max {x; Σh = 1,..., xb li (h) ≦ α li }). The value x on the hash space is assigned to the virtual server of the server S - kj whose absolute load O - kj in the order of magnitude is the server load below the server threshold value on the hash space (again, step S109). This is used when determining the placement position of the virtual server.

次に、配置処理部113は、仮想サーバを割り当てた後の負荷がサーバ閾値を超えるサーバS liについて、サーバ閾値を超える負荷の絶対値O liを計算する(O li ← O li−O kj)(ステップS112)。 Next, the placement processing unit 113 calculates the absolute value O + li of the load exceeding the server threshold for the server S + li whose load after the allocation of the virtual server exceeds the server threshold (O + li ← O + li -O - kj ) (step S112).

そして、配置処理部113は、負荷解消のために、負荷がサーバ閾値以下のサーバS kjの余裕部のすべてを割り当てたことを示す、Flagを「true」に設定する(ステップS113)。 Then, the placement processing unit 113 sets Flag to “true” indicating that all of the surplus portions of the server S - kj whose load is equal to or less than the server threshold value has been allocated in order to eliminate the load (step S113).

続いて、配置処理部113は、サーバ負荷計算部112が計算し整列した後の、負荷がサーバ閾値以下のサーバS kjのうち、次に絶対値O kjが大きいサーバを選択し(j←j+1)(ステップS114)、ステップS105(図9参照)へ戻る。 Subsequently, the placement processing section 113, after alignment calculated by the server load calculation unit 112, the load server S follows the server threshold value - of kj, then the absolute value O - kj select the server is large (j ← j + 1) (step S114), the process returns to step S105 (see FIG. 9).

一方、ステップS110において、配置処理部113は、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値(O li:超過分)と、仮想サーバを設定する負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)とを比較し、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値O liの方が大きい場合でないとき(ステップS110→No)、つまり、負荷がサーバ閾値以下のサーバS kjの負荷の余裕の絶対値O kjが、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値O liと同じか、それを超える場合には、ステップS115へ進む。 On the other hand, in step S110, the placement processing unit 113 determines the absolute value (O + li : excess) of the server S + li whose load exceeds the server threshold and the server S whose load for setting the virtual server is equal to or less than the server threshold. - the absolute value of the load of kj -: compare (O kj margin) and, when the load is not the case is larger absolute value O + li of the load of the server S + li exceeding the server threshold value (step S110 → no ), i.e., the load is less than the server threshold value server S - absolute value O of the load kj margin - kj is, the load is equal to or absolute value O + li of the load of the server S + li exceeding server threshold, it When exceeding, it progresses to step S115.

そして、ステップS115において、配置処理部113は、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)が、負荷がサーバ閾値を超えるサーバSの負荷の絶対値(O li:超過分)を超えるか否かを判定する(O li < O kj)。そして、負荷がサーバ閾値以下のサーバSの負荷の絶対値(O kj:余裕分)が、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値(O li:超過分)を超える場合には(ステップS115→Yes)、つまり、仮想サーバの割当てによって、負荷がサーバ閾値を超えるサーバS liの超過分が解消され、さらに、仮想サーバを割り当てたサーバS kjにまだ余裕分が残っている場合には、次のステップS116へ進む。 Then, in step S115, the placement processing section 113, the load server threshold following servers S - absolute value of the load of kj (O - kj: margin) is loaded absolute server S + load exceeding the server threshold value It is determined whether or not the value (O + li : excess) is exceeded (O + li <O kj ). Then, the absolute value (O kj : margin) of the load of the server S whose load is equal to or less than the server threshold is the absolute value (O + li : excess) of the load of the server S + li whose load exceeds the server threshold. In the case of exceeding (step S115 → Yes), that is, the excess of the server S + li whose load exceeds the server threshold is eliminated by the allocation of the virtual server, and further, the server S - kj to which the virtual server is allocated still has a margin. If the minute remains, the process proceeds to the next step S116.

次に、配置処理部113は、仮想サーバを割り当てた負荷がサーバ閾値以下のサーバS kjの負荷の余裕分(Rest)を計算する(Rest ← O kj − O li)(ステップS116)。そして、配置処理部113は、その負荷の余裕分(Rest)を記憶する。 Next, the placement processing unit 113 calculates a load margin (Rest) of the server S kj whose load assigned to the virtual server is equal to or less than the server threshold (Rest ← O kj −O + li ) (step S116). . Then, the placement processing unit 113 stores the load margin (Rest).

次に、配置処理部113は、負荷解消のために、負荷がサーバ閾値以下のサーバS kjに、まだ余裕分があること(次に割り当てる負荷の余裕分があること)を示す、Flagを「false」に設定する(ステップS117)。 Next, in order to eliminate the load, the placement processing unit 113 sets a Flag indicating that the server S - kj whose load is equal to or less than the server threshold still has a margin (there is a margin for the next load to be allocated). “False” is set (step S117).

そして、配置処理部113は、サーバ負荷計算部112が計算し整列した後の、負荷がサーバ閾値を超えるサーバS liのうち、次に絶対値O liの大きいサーバを選択し(i←i+1)(ステップS118)、次のステップS121へ進む。 Then, the arrangement processing unit 113 selects the server having the next largest absolute value O + li from the servers S + li whose loads exceed the server threshold after the server load calculation unit 112 calculates and arranges (i ← i + 1) (step S118), the process proceeds to the next step S121.

一方、ステップS115において、配置処理部113は、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)が、負荷がサーバ閾値を超えるサーバS liの負荷の絶対値(O li:超過分)と同じ場合は(ステップS115→No)、次のステップS119へ進む。そして、配置処理部113は、負荷解消のために、負荷がサーバ閾値以下のサーバS kjの余裕分のすべてを割り当てたことを示す、Flagを「true」に設定する(ステップS119)。 On the other hand, in step S115, the placement processing unit 113 determines the load of the server S + li whose load exceeds the server threshold when the absolute value (O kj : margin) of the load of the server S kj whose load is equal to or less than the server threshold. If it is the same as the absolute value (O + li : excess) (step S115 → No), the process proceeds to the next step S119. Then, the placement processing unit 113 sets Flag to “true” indicating that all the margins of the server S kj whose load is equal to or less than the server threshold are allocated to eliminate the load (step S119).

続いて、配置処理部113は、サーバ負荷計算部112が計算し整列した後の、負荷がサーバ閾値を超えるサーバS li、負荷がサーバ閾値以下のサーバS kjのうち、次に絶対値(O li,O kj)の大きいサーバをそれぞれ選択し(i←i+1,j←j+1)(ステップS120)、次のステップS121へ進む。 Subsequently, after the server load calculation unit 112 calculates and arranges the arrangement processing unit 113, the absolute value of the server S + li whose load exceeds the server threshold and the server S kj whose load is equal to or less than the server threshold is next. Servers with large (O + li , O kj ) are selected (i ← i + 1, j ← j + 1) (step S120), and the process proceeds to the next step S121.

そして、ステップS118およびステップS120の次に、ステップS121において、配置処理部113は、まだ余裕分の残っている、負荷がサーバ閾値以下のサーバS kjがあるか否かを判定する(j=p+1)。そして、まだ余裕分が残っている、負荷がサーバ閾値以下のサーバS kjがある場合には(ステップS121→Yes)、ステップS102(図9参照)へ戻り処理を続ける。一方、配置処理部113は、負荷がサーバ閾値以下のサーバS kjで、余裕分が残っているサーバがない場合には(ステップS121→No)、ステップS122へ進み、管理者サーバ5に、物理サーバ(DBサーバ20)の追加依頼を送信し、処理を終える。
なお、配置処理部113は、ハッシュ空間上での仮想サーバの割当てを完了することにより、新たなサーバ担当データ情報100を生成し、各DBサーバ20それぞれに送信する。
Then, after step S118 and step S120, in step S121, the placement processing unit 113 determines whether there is a server S - kj whose load is still less than or equal to the server threshold (j = p + 1). If there is a server S - kj whose load is still less than the server threshold (step S121 → Yes), the process returns to step S102 (see FIG. 9) to continue the process. On the other hand, if the load is the server S - kj whose load is equal to or less than the server threshold and there is no remaining server (step S121 → No), the arrangement processing unit 113 proceeds to step S122, and the administrator server 5 A request for addition of the physical server (DB server 20) is transmitted, and the process ends.
The placement processing unit 113 completes the allocation of the virtual server on the hash space, thereby generating new server handling data information 100 and transmitting it to each DB server 20.

このようにすることで、本実施形態に係るデータ負荷分散配置システム1およびデータ負荷分散配置方法による仮想サーバの初期配置によって、負荷分散を実現し、さらに、各サーバの担当領域に配置する仮想サーバの数が同一に設定される従来技術に比べ、仮想サーバの数を減らすことができる。また、仮想サーバを大量に配置する必要がなくなるため、仮想サーバ保持のための記述量の増加を抑え、クライアントからデータの問い合わせを受けた際に、そのデータを格納している担当サーバの検索に要する時間の増加を抑えることができる。よって、システム全体としてのスループットを向上させることができる。   By doing in this way, load distribution is realized by the initial arrangement of the virtual server by the data load distribution arrangement system 1 and the data load distribution arrangement method according to the present embodiment, and the virtual server arranged in the assigned area of each server The number of virtual servers can be reduced compared to the prior art in which the number of servers is set to be the same. Also, since there is no need to place a large number of virtual servers, the increase in the amount of description for holding virtual servers is suppressed, and when a data inquiry is received from a client, the server in charge that stores the data is searched. An increase in time required can be suppressed. Therefore, the throughput of the entire system can be improved.

(データ負荷分散配置処理―仮想サーバの再配置)
次に、図11を参照して、データ負荷分散配置システム1が行う、所定間隔Zごとの仮想サーバの再配置処理の全体の処理の流れについて説明する。図11は、本実施形態に係るデータ負荷分散配置処理(仮想サーバの再配置)の全体の処理の流れを示すシーケンス図である。なお、図8に示した仮想サーバの初期配置の全体の流れと同一の処理については、図11においても、同一の名称と符号を付し、説明を省略する。
(Data load distribution placement processing-virtual server relocation)
Next, the overall processing flow of the virtual server relocation processing for each predetermined interval Z performed by the data load distribution and placement system 1 will be described with reference to FIG. FIG. 11 is a sequence diagram showing the overall processing flow of the data load distribution arrangement processing (virtual server relocation) according to the present embodiment. In addition, about the process same as the whole flow of the initial arrangement | positioning of the virtual server shown in FIG. 8, the same name and code | symbol are attached | subjected also in FIG. 11, and description is abbreviate | omitted.

まず、管理者サーバ5から、仮想サーバ配置装置10が、システム全体に求める処理性能Rと、各サーバの負荷のサーバ閾値を決定するための負荷閾値定数cとを、設定情報として取得する(ステップS11)。なお、この処理は、所定間隔Zごとに行われてもよいが、システム全体に求める処理性能Rおよび負荷閾値定数cに変更がなければ、このステップS11を行わないようにしてもよい。また、予め、仮想サーバ配置装置10の記憶部14に、設定情報(R,c)を記憶させておき利用するようにしてもよい。   First, from the administrator server 5, the virtual server placement apparatus 10 acquires, as setting information, the processing performance R required for the entire system and the load threshold constant c for determining the server threshold of the load of each server (step). S11). This process may be performed at every predetermined interval Z. However, if the processing performance R and load threshold constant c required for the entire system are not changed, step S11 may not be performed. In addition, the setting information (R, c) may be stored in advance in the storage unit 14 of the virtual server placement apparatus 10 for use.

そして、各DBサーバ20それぞれは、所定間隔Zごとに、自身のDBサーバ20に保存しているデータのデータキーおよびそのデータへのアクセス回数の情報であるアクセス回数情報300(図7参照)を、自身に固有な番号とともに、仮想サーバ配置装置10へ送信する(ステップS21)。   Each DB server 20 receives, for each predetermined interval Z, a data key of data stored in its own DB server 20 and access count information 300 (see FIG. 7) which is information on the number of accesses to the data. , Together with a number unique to itself, is transmitted to the virtual server placement apparatus 10 (step S21).

次に、仮想サーバ配置装置10のサーバ負荷計算部112は、サーバ負荷計算処理を行う(ステップS22)。
具体的は、サーバ負荷計算部112は、図8の仮想サーバの初期配置におけるステップS12で受信している、各DBサーバ20のサーバ性能Tと、自身の記憶部14に記憶する負荷閾値定数cまたはステップS11で取得した負荷閾値定数cに基づき、(式1)を用いて、各サーバのサーバ閾値αを設定する。また、サーバ負荷計算部112は、ステップS21で各DBサーバ20から受信した、データキーおよびアクセス回数を含むアクセス回数情報300(図7参照)に基づき、各DBサーバの負荷Wを計算する。そして、サーバ負荷計算部112は、計算したDBサーバ20ごとの負荷Wとサーバ閾値αとを比較し、負荷がサーバ閾値以下のサーバSの集合と、負荷がサーバ閾値を超えるサーバSの集合とを生成して、その集合ごとに、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列する処理を行う。
Next, the server load calculation unit 112 of the virtual server arrangement device 10 performs server load calculation processing (step S22).
Specifically, the server load calculation unit 112 receives the server performance T m of each DB server 20 received in step S12 in the initial arrangement of the virtual server in FIG. The server threshold value α m of each server is set using (Equation 1) based on c or the load threshold constant c acquired in step S11. The server load calculation unit 112, received from each DB server 20 in step S21, based on the access count information 300 containing the data key and the access count (see FIG. 7) calculates the load W m of the DB servers. Then, the server load calculation unit 112 compares the calculated load W m for each DB server 20 with the server threshold value α m, and the set of servers S whose load is equal to or less than the server threshold value and the server S whose load exceeds the server threshold value. A set of + is generated, and for each set, the servers are arranged in descending order of the absolute value of the difference between the load W m and the server threshold value α m .

続いて、仮想サーバ配置装置10の仮想サーバ再配置計算部115は、負荷がサーバ閾値以下となったDBサーバ20について、仮想サーバを取り除く処理(仮想サーバ再配置計算)を行う(ステップS23)。そして、仮想サーバ再配置計算部115は、仮想サーバを取り除いた後の各サーバの負荷に基づき、負荷がサーバ閾値以下のサーバSと、負荷がサーバ閾値を超えるサーバSとについて、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列する。そして、その情報を、配置処理部113に引き渡す。なお、この仮想サーバ再配置計算は、後記する図12〜図18において詳細に説明する。 Subsequently, the virtual server rearrangement calculation unit 115 of the virtual server arrangement apparatus 10 performs a process of removing the virtual server (virtual server rearrangement calculation) for the DB server 20 whose load is equal to or less than the server threshold (step S23). Then, based on the load of each server after the virtual server is removed, the virtual server relocation calculation unit 115 calculates the load W for the server S whose load is equal to or less than the server threshold and the server S + whose load exceeds the server threshold. The servers are arranged in descending order of the absolute value of the difference between m and the server threshold α m . Then, the information is transferred to the arrangement processing unit 113. This virtual server rearrangement calculation will be described in detail with reference to FIGS.

そして、仮想サーバ配置装置10の配置処理部113は、仮想サーバ再配置計算部115が計算し整列させた各サーバの負荷に関する情報に基づき、再度、仮想サーバ配置処理(図9および図10参照)を実行する(ステップS14)。そして、以下は、図8のステップS15〜S18と同様の処理を行って、各DBサーバ20同士が担当データの交換処理を行う。   Then, the placement processing unit 113 of the virtual server placement apparatus 10 again performs the virtual server placement processing (see FIGS. 9 and 10) based on the information regarding the load of each server calculated and aligned by the virtual server relocation calculation unit 115. Is executed (step S14). Then, the following processes similar to those in steps S15 to S18 in FIG. 8 are performed, and the respective DB servers 20 exchange data in charge.

<仮想サーバ再配置計算>
次に、図12〜図17を参照して、図11のステップS23における、仮想サーバ配置装置10(仮想サーバ再配置計算部115)による仮想サーバ再配置計算の概要を説明する。そして、図18を用いて、仮想サーバ再配置計算部115による仮想サーバ再配置計算の流れを、さらに詳細にフローチャートを用いて説明する(適宜図1参照)。
<Virtual server relocation calculation>
Next, an overview of the virtual server relocation calculation by the virtual server allocation device 10 (virtual server relocation calculation unit 115) in step S23 of FIG. 11 will be described with reference to FIGS. Then, the flow of the virtual server rearrangement calculation performed by the virtual server rearrangement calculation unit 115 will be described in more detail using a flowchart (see FIG. 1 as appropriate) with reference to FIG.

なお、この仮想サーバ再配置計算部115による仮想サーバ再配置計算は、例えば、図11のステップS22において、サーバ負荷計算部112が、所定間隔Zごとに各DBサーバ20の負荷Wを算出し、負荷がサーバ閾値以下のサーバSと、負荷がサーバ閾値を超えるサーバSとについて、負荷Wとサーバ閾値αとの差の絶対値が大きい順にサーバを整列させたことを契機として実行される。 The virtual server relocation calculation by the virtual server relocation calculation unit 115 is performed by, for example, the server load calculation unit 112 calculating the load W m of each DB server 20 at every predetermined interval Z in step S22 of FIG. When the server S whose load is equal to or less than the server threshold and the server S + whose load exceeds the server threshold, the servers are arranged in descending order of the absolute value of the difference between the load W m and the server threshold α m. Executed.

図12〜図17は、本実施形態に係る仮想サーバ配置装置10(仮想サーバ再配置計算部115)による仮想サーバ再配置計算の概要を説明するための図である。
ここでは、仮想サーバ配置装置10による仮想サーバの初期配置により、図5(a)に示すようにハッシュ空間上で仮想サーバが配置され(図12(a)参照)、システム稼働後の所定間隔Z後に、各サーバSの負荷Wとサーバ閾値αとの差の絶対値が、図12(b)のようになったものとして説明する。例えば、サーバSは、初期配置では、仮想サーバ(VS,VS)が配置されることにより、負荷がサーバ閾値を超えない設定で、処理を開始したが、時間の経過とともに、図12(b)に示すように、負荷がサーバ閾値以下のサーバSとなっている。つまりサーバSの負荷が減少している。
12 to 17 are diagrams for explaining the outline of the virtual server relocation calculation performed by the virtual server arrangement device 10 (virtual server relocation calculation unit 115) according to the present embodiment.
Here, by the initial placement of the virtual server by the virtual server placement device 10, the virtual server is placed on the hash space as shown in FIG. 5A (see FIG. 12A), and the predetermined interval Z after the system is operated. later, the absolute value of the difference between the load W m and the server threshold value alpha m of each server S m is described as that looks like Figure 12 (b). For example, in the initial placement, the server S 1 starts processing with a setting in which the load does not exceed the server threshold by placing virtual servers (VS 3 , VS 4 ). As shown in (b), the load is the server S whose load is equal to or less than the server threshold. This means that the load of the server S 1 is decreased.

仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバSのうち、ハッシュ空間上で仮想サーバが配置されているものを取り除く処理を行う。なお、その際、仮想サーバ再配置計算部115は、仮想サーバを取り除くと、その負荷Wがサーバ閾値αを超えてしまう場合には、負荷がサーバ閾値以下のサーバSのその仮想サーバを取り除く処理を行わないものとする。 The virtual server rearrangement calculation unit 115 performs a process of removing a server S whose load is equal to or less than the server threshold value, in which the virtual server is arranged in the hash space. At that time, if the virtual server rearrangement calculation unit 115 removes the virtual server and the load W m exceeds the server threshold value α m , the virtual server of the server S whose load is equal to or less than the server threshold value. It is assumed that the process of removing is not performed.

まず、仮想サーバ再配置計算部115は、図12に示す状態から、負荷がサーバ閾値以下のサーバSのうち、負荷Wとサーバ閾値αとの差の絶対値が大きい順で、かつ、ハッシュ空間上で仮想サーバが配置されているサーバを選択する。ここでは、Sのサーバを選択する。そして、ハッシュ空間上のサーバSに近い順に、1番目に配置された仮想サーバVSを取り除く(図13(a)参照)。この状態での各サーバSの負荷Wとサーバ閾値αとの差の絶対値を図13(b)に示す。サーバSは、仮想サーバVSが担当していたデータの分だけ、負荷の余裕分が減っている。これに対し、サーバSは、仮想サーバVSの担当していたデータ分だけ、負荷の余裕分が増えている。 First, the virtual server rearrangement calculation unit 115 starts from the state shown in FIG. 12 in order of increasing absolute value of the difference between the load W m and the server threshold value α m among the servers S whose loads are equal to or less than the server threshold value, and The server on which the virtual server is arranged on the hash space is selected. Here, you select the server S 1. Then, the virtual server VS 3 arranged first is removed in the order close to the server S 1 on the hash space (see FIG. 13A). FIG. 13B shows the absolute value of the difference between the load W m of each server S m and the server threshold value α m in this state. The server S 1 has a reduced load margin by the amount of data handled by the virtual server VS 3 . On the other hand, the load margin of the server S 3 is increased by the amount of data handled by the virtual server VS 3 .

次に、仮想サーバ再配置計算部115は、ハッシュ空間上のサーバSに近い順に、2番目に配置された仮想サーバVSを取り除く(図14(a)参照)。この状態での各サーバSの負荷Wとサーバ閾値αとの差の絶対値を図14(b)に示す。サーバSは、仮想サーバVSが担当していたデータ分だけ、負荷の余裕分が減っている。これに対し、サーバSは、仮想サーバVSの担当していたデータ分だけ、負荷の超過分が減っている。 Next, the virtual server rearrangement calculation unit 115 removes the second virtual server VS 4 that is arranged in order from the server S 1 in the hash space (see FIG. 14A). FIG. 14B shows the absolute value of the difference between the load W m of each server S m and the server threshold value α m in this state. The server S 1 has a reduced load margin corresponding to the data handled by the virtual server VS 4 . On the other hand, in the server S 4 , the excess load is reduced by the amount of data handled by the virtual server VS 4 .

これで、サーバSの仮想サーバをすべて取り除いたので、図12(b)において、負荷がサーバ閾値以下のサーバSで、仮想サーバが配置されている次のサーバであるサーバSを選択する。なお、サーバSは、仮想サーバが配置されていないので、選択せずに、サーバSを選択する。そして、ハッシュ空間上のサーバSに近い順に、1番目に配置された仮想サーバVSを取り除く(図15(a)参照)。この状態での各サーバSの負荷Wとサーバ閾値αとの差の絶対値を図15(b)に示す。サーバSは、仮想サーバVSが担当していたデータ分だけ、負荷の余裕分が減っている。これに対し、サーバSは、仮想サーバVSが担当していたデータ分だけ、負荷の超過分が減っている。 Since all the virtual servers of the server S 1 are now removed, in FIG. 12B, the server S whose load is equal to or less than the server threshold and the server S 2 that is the next server on which the virtual server is arranged is selected. To do. The server S 3, since the virtual server is not arranged, without selecting, selects the server S 2. Then, the virtual server VS 4 arranged first is removed in the order close to the server S 2 on the hash space (see FIG. 15A). The absolute value of the difference between the load W m of each server S m and the server threshold value α m in this state is shown in FIG. The server S 2 has a reduced load margin corresponding to the data handled by the virtual server VS 4 . On the other hand, in the server S 4 , the excess load is reduced by the amount of data handled by the virtual server VS 4 .

次に、仮想サーバ再配置計算部115は、ハッシュ空間上のサーバSに近い順に、2番目に配置された仮想サーバVSを取り除く処理を行おうとするが、仮想サーバVSの担当データ分の負荷が、サーバSの余裕分より大きいため、仮想サーバVSを取り除くと、サーバSの負荷がサーバ閾値を超えてしまうため、取り除く処理を行わない(図16参照)。 Next, the virtual server relocation calculation section 115, order close to the server S 2 on the hash space, but an attempt is made to processing for removing the virtual servers VS 5 disposed in the second, charge data content of the virtual servers VS 5 Since the load of the server S 2 is larger than the margin of the server S 2 , if the virtual server VS 5 is removed, the load of the server S 2 exceeds the server threshold value, so the removal process is not performed (see FIG. 16).

そして、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバSのすべてのサーバの処理を終えると、仮想サーバを取り除いても負荷がサーバ閾値を超えない範囲で、その仮想サーバを取り除いた状態の各サーバSの負荷Wとサーバ閾値αとの差の絶対値を示す図16(b)のようになる。仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバSと、負荷がサーバ閾値を超えるサーバSとについて、負荷Wとサーバ閾値αとの差の絶対値が大きい順に整列し直し(図17参照)、仮想サーバ再配置計算を終え、その情報を配置処理部113に渡す。そして、配置処理部113が、図11のステップS14の仮想サーバ配置処理(図9および図10参照)を続ける。 Then, the virtual server relocation calculation section 115, the load is less than the server threshold value server S - Upon completion of the processing of all the servers, to the extent that the load be removed virtual servers does not exceed the server threshold value, the virtual server FIG. 16B shows the absolute value of the difference between the load W m of each server S m and the server threshold value α m in the removed state. The virtual server rearrangement calculation unit 115 sorts the server S whose load is less than or equal to the server threshold and the server S + whose load exceeds the server threshold in descending order of the absolute value of the difference between the load W m and the server threshold α m. Then, the virtual server rearrangement calculation is finished, and the information is passed to the arrangement processing unit 113. Then, the placement processing unit 113 continues the virtual server placement processing (see FIGS. 9 and 10) in step S14 of FIG.

次に、図18を用いて、仮想サーバ再配置計算部115による仮想サーバ再配置計算の流れを、さらに詳細にフローチャートを用いて説明する(適宜図1参照)。   Next, the flow of the virtual server relocation calculation performed by the virtual server relocation calculation unit 115 will be described in more detail using a flowchart (see FIG. 1 as appropriate) with reference to FIG.

まず、仮想サーバ再配置計算部115は、初期値として、負荷がサーバ閾値以下のサーバS kjについて、絶対値O kjが大きい順に1番目のサーバを選択し(j←1)、その選択した負荷がサーバ閾値以下のサーバS kjに、ハッシュ空間上で近い順で一番目の仮想サーバを初期値として選択する(l←1)(ステップS201)。 First, the virtual server relocation calculating unit 115 as an initial value, the load is less server threshold of the server S - for kj, absolute value O - kj select the first server to the descending order (j ← 1), the selection The first virtual server is selected as an initial value in the order close to the server S - kj whose load is equal to or less than the server threshold in the hash space (l ← 1) (step S201).

次に、仮想サーバ再配置計算部115は、まだ処理していない、負荷がサーバ閾値以下のサーバS kjがあるか否かを判定する(j<p+1)(ステップS202)。ここで、まだ処理していない、負荷がサーバ閾値以下のサーバS kjがない、つまり、すべての負荷がサーバ閾値以下のサーバS kjの処理を終えている場合には(ステップS202→No)、ステップS210へ進む。一方、まだ処理していない、負荷がサーバ閾値以下のサーバS kjがある場合には(ステップS202→Yes)、次のステップS203へ進む。 Next, the virtual server relocation calculation unit 115 determines whether there is a server S - kj that has not been processed yet and whose load is equal to or less than the server threshold (j <p + 1) (step S202). Here, in the case where there is no server S - kj whose load is not more than the server threshold, that is, the processing of the server S - kj whose load is not more than the server threshold is finished (step S202 → No) ), Go to step S210. On the other hand, when there is a server S - kj whose load is not more than the server threshold value (step S202 → Yes), the process proceeds to the next step S203.

ステップS203において、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS kjのハッシュ空間上での担当領域に、仮想サーバが配置されているか否かを判定する(ykj > 0)。ここでykjは、負荷がサーバ閾値以下のサーバS kjに配置された仮想サーバ数を示す。そして、負荷がサーバ閾値以下のサーバS kjに仮想サーバが配置されていない場合には(ステップS203→No)、ステップS209へ進む。一方、仮想サーバが配置されている場合には(ステップS203→Yes)、次のステップS204へ進む。 In step S203, the virtual server relocation calculation unit 115 determines whether or not a virtual server is allocated in the assigned area in the hash space of the server S - kj whose load is equal to or less than the server threshold (y kj > 0). ). Here, y kj indicates the number of virtual servers arranged in the server S - kj whose load is equal to or less than the server threshold. If no virtual server is placed on the server S - kj whose load is equal to or less than the server threshold (step S203 → No), the process proceeds to step S209. On the other hand, when the virtual server is arranged (step S203 → Yes), the process proceeds to the next step S204.

続いて、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)が0を超えているか否かを判定する(O kj >0)(ステップS204)。つまり、負荷がサーバ閾値以下のサーバS kjが、仮想サーバを取り除いた後でも、まだ、その余裕分が残っているか否かを判定する。なお、このステップS204を最初に実行する際は、ステップS202で、負荷がサーバ閾値以下のサーバが1つでも存在すれば、当然に、余裕分が残っていることになる。ここで、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)が0以下、つまり余裕分が残っていない場合は(ステップS204→No)、ステップS209へ進む。一方、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)が0より大きい、つまり余裕分が残っている場合には(ステップS204→Yes)、次のステップS205へ進む。 Subsequently, the virtual server relocation calculation unit 115 determines whether or not the absolute value (O kj : margin) of the load of the server S kj whose load is equal to or less than the server threshold exceeds 0 (O kj). > 0) (step S204). That is, it is determined whether or not the server S - kj whose load is equal to or less than the server threshold still has a margin after the virtual server is removed. When step S204 is executed for the first time, if at least one server having a load equal to or lower than the server threshold exists in step S202, a margin is naturally left. Here, when the absolute value (O - kj : margin) of the load of the server S - kj whose load is not more than the server threshold is 0 or less, that is, when there is no margin (step S204 → No), the process proceeds to step S209. . On the other hand, when the absolute value (O - kj : margin) of the load of the server S - kj whose load is equal to or less than the server threshold is greater than 0, that is, when the margin remains (step S204 → Yes), the next step The process proceeds to S205.

次に、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS kjの担当領域に、まだ未処理の仮想サーバが配置されているか否かを判定する(l<ykj+1)(ステップS205)。つまり、取り除くことができる可能性のある仮想サーバが残っているか否かを判定する。ここで、未処理の仮想サーバがハッシュ空間上に配置されていない場合には(ステップS205→No)、ステップS209へ進む。一方、未処理の仮想サーバがそのサーバのハッシュ空間上の担当領域に残っている場合には(ステップS205→Yes)、次のステップS206へ進む。 Next, the virtual server relocation calculation unit 115 determines whether or not an unprocessed virtual server is still allocated in the area in charge of the server S kj whose load is equal to or less than the server threshold (l <y kj +1). (Step S205). That is, it is determined whether or not there is a virtual server that can be removed. Here, when an unprocessed virtual server is not arranged in the hash space (step S205 → No), the process proceeds to step S209. On the other hand, if an unprocessed virtual server remains in the assigned area in the hash space of the server (step S205 → Yes), the process proceeds to the next step S206.

ステップS206において、仮想サーバ再配置計算部115は、仮想サーバの担当する負荷(Zkj(l))が、負荷がサーバ閾値以下のサーバS kjの負荷の余裕分の絶対値(O kj:余裕分)より小さいか否かを判定する(Zkj(l) < O kj)。つまり、仮想サーバを取り除いても、その仮想サーバの基のサーバの負荷が、サーバ閾値を超えないか否かを判定する。ここで、仮想サーバの担当する負荷(Zkj(l))が、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)以上の場合は(ステップS206→No)、ステップS209へ進む。一方、仮想サーバの担当する負荷(Zkj(l))が、負荷がサーバ閾値以下のサーバS kjの負荷の絶対値(O kj:余裕分)より小さい場合には(ステップS206→Yes)、次のステップS207へ進む。 In step S206, the virtual server rearrangement calculation unit 115 determines that the load (Z kj (l)) in charge of the virtual server is an absolute value (O kj ) of the load margin of the server S kj whose load is equal to or less than the server threshold. : It is determined whether it is smaller than the margin) (Z kj (l) <O kj ). That is, even if the virtual server is removed, it is determined whether or not the load on the base server of the virtual server does not exceed the server threshold. Here, when the load (Z kj (l)) in charge of the virtual server is equal to or greater than the absolute value (O kj : margin) of the load of the server S kj whose load is equal to or less than the server threshold (step S206 → No). ), Go to step S209. On the other hand, when the load handled by the virtual server (Z kj (l)) is smaller than the absolute value (O kj : margin) of the load of the server S kj whose load is equal to or less than the server threshold (step S206 → Yes). ), And proceeds to the next Step S207.

ステップS207において、仮想サーバ再配置計算部115は、仮想サーバをハッシュ空間上から取り除く。そして、仮想サーバ再配置計算部115は、その領域を担当する元のサーバに負荷を戻す処理を行う。具体的には、仮想サーバ(vk(l))を取り除いた場合の負荷を以下の式により計算する。 In step S207, the virtual server relocation calculation unit 115 removes the virtual server from the hash space. Then, the virtual server rearrangement calculation unit 115 performs processing for returning the load to the original server in charge of the area. Specifically, the load when the virtual server (v k (l)) is removed is calculated by the following equation.

Figure 2012238084
Figure 2012238084

ここで、Wvkj(l)は、仮想サーバを取り除いた元のサーバの負荷を示す。 Here, Wv kj (l) indicates the load of the original server from which the virtual server is removed.

そして、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS kjの担当領域の、次の仮想サーバを選択し(l←l+1)(ステップS208)、ステップS204へ戻り、処理を続ける。 Then, the virtual server rearrangement calculation unit 115 selects the next virtual server in the area in charge of the server S - kj whose load is equal to or less than the server threshold (l ← l + 1) (step S208), returns to step S204, and performs processing. to continue.

一方、ステップS203→No、ステップS204→No、ステップS205→No、ステップS206→Noの場合には、ステップS209において、仮想サーバ再配置計算部115は、サーバ負荷計算部112が計算し整列した後の、負荷がサーバ閾値以下のサーバS kjのうち、次に絶対値が大きいサーバを選択し(j←j+1)、ステップS202へ戻る。 On the other hand, in the case of step S203 → No, step S204 → No, step S205 → No, step S206 → No, in step S209, the virtual server relocation calculation unit 115 calculates and arranges the server load calculation unit 112. Of the servers S kj whose load is equal to or less than the server threshold, the server having the next largest absolute value is selected (j ← j + 1), and the process returns to step S202.

そして、仮想サーバ再配置計算部115は、ステップS202において、負荷がサーバ閾値以下のサーバS kjすべての処理を終えている場合には(ステップS202→No)、ステップS207において再計算された各サーバの負荷Wに基づき、負荷がサーバ閾値以下のサーバSと、負荷がサーバ閾値を超えるサーバSとについて、負荷Wとサーバ閾値αとの差の絶対値が大きい順に整列する(ステップS210)。そして、その情報を、配置処理部113に渡す。配置処理部113では、図9および図10で示した仮想サーバ配置処理を実行する。 Then, in step S202, the virtual server rearrangement calculation unit 115, when the processing of all the servers S - kj whose loads are equal to or less than the server threshold has been completed (step S202 → No), each of the recalculated values in step S207. Based on the server load W m , the server S whose load is equal to or less than the server threshold and the server S + whose load exceeds the server threshold are arranged in descending order of the absolute value of the difference between the load W m and the server threshold α m. (Step S210). Then, the information is passed to the arrangement processing unit 113. The placement processing unit 113 executes the virtual server placement processing shown in FIGS. 9 and 10.

このようにすることで、本実施形態に係るデータ負荷分散配置システム1およびデータ負荷分散配置方法による仮想サーバの再配置によれば、所定間隔ごとの担当データ数の増減や各データへの実アクセス数に応じた、各DBサーバ20の負荷を計算する。そして、負荷がサーバ閾値以下のサーバSに含まれることになったDBサーバ20のハッシュ空間上での担当領域に、仮想サーバが配置されている場合に、その仮想サーバの担当領域を、元のDBサーバの担当領域に戻すことができる。そして、負荷Wとサーバ閾値αとの差の絶対値を計算し直すことにより、負荷がサーバ閾値以下のサーバSの集合と、負荷がサーバ閾値を超えるサーバSの集合とを生成して、再度、ハッシュ空間上での仮想サーバの配置を計算する。これにより、各DBサーバ20の負荷を均一化させるとともに、ハッシュ空間上に配置する仮想サーバの数を減らすことができる。 In this way, according to the virtual server rearrangement by the data load distribution and arrangement system 1 and the data load distribution and arrangement method according to the present embodiment, the number of assigned data increases or decreases at each predetermined interval and the actual access to each data The load on each DB server 20 is calculated according to the number. When a virtual server is arranged in the area in charge on the hash space of the DB server 20 whose load is included in the server S having a server threshold value or less, the area in charge of the virtual server is It is possible to return to the area in charge of the DB server. Then, by recalculating the absolute value of the difference between the load W m and the server threshold value α m , a set of servers S whose load is equal to or less than the server threshold value and a set of servers S + whose load exceeds the server threshold value are generated. Then, the arrangement of the virtual server on the hash space is calculated again. As a result, the load on each DB server 20 can be made uniform and the number of virtual servers arranged in the hash space can be reduced.

なお、本実施形態において仮想サーバ配置装置10は、コンシステントハッシュ法の領域分割方式として、時計回り方式を用いて、ハッシュ空間上に仮想サーバを配置するものとして説明した。しかし、本発明はこれに限定されず、反時計回り方式や、各データがリング上で最も隣接するサーバにデータを格納する最近値方式等を用いることもできる。   In the present embodiment, the virtual server placement apparatus 10 has been described as placing a virtual server on a hash space using a clockwise method as a region partitioning method of the consistent hash method. However, the present invention is not limited to this, and a counterclockwise method, a nearest value method in which each data is stored in a server closest to the ring, or the like can also be used.

1 データ負荷分散配置システム
5 管理者サーバ
6 クライアント
10 仮想サーバ配置装置
11 制御部
12,22 通信部
13,23 メモリ部
14,24 記憶部
20 DBサーバ
21 処理部
100 サーバ担当データ情報
111,211 情報受信部
112 サーバ負荷計算部
113 配置処理部
114,213 ハッシュ値計算部
115 仮想サーバ再配置計算部
116,216 情報送信部
200 データ格納部
212 データ管理部
214 アクセス監視部
215 データ交換部
300 アクセス回数情報
DESCRIPTION OF SYMBOLS 1 Data load distribution arrangement system 5 Administrator server 6 Client 10 Virtual server arrangement apparatus 11 Control part 12,22 Communication part 13,23 Memory part 14,24 Storage part 20 DB server 21 Processing part 100 Server charge data information 111,211 information Reception unit 112 Server load calculation unit 113 Allocation processing unit 114, 213 Hash value calculation unit 115 Virtual server relocation calculation unit 116, 216 Information transmission unit 200 Data storage unit 212 Data management unit 214 Access monitoring unit 215 Data exchange unit 300 Number of accesses information

Claims (4)

相互に通信可能に接続される複数のDBサーバと、前記複数のDBサーバそれぞれと通信可能に接続される仮想サーバ配置装置とを備えるデータ負荷分散配置システムであって、
前記DBサーバは、
(1)クライアントからの検索対象となるデータ、およびそのデータそれぞれに対応付けられるデータキー、(2)前記DBサーバ自身のサーバ性能、並びに、(3)前記データそれぞれの保存先の前記DBサーバを示すサーバ担当データ情報が保存される記憶部と、
前記データキーおよび前記サーバ性能を、前記仮想サーバ配置装置に送信するデータ管理部と、
前記仮想サーバ配置装置から、新たな前記サーバ担当データ情報を受信し、前記保存していたサーバ担当データ情報と比較することにより、自身の前記DBサーバの前記記憶部に保存していないデータおよびそのデータの保存先となる他のDBサーバを抽出し、前記抽出した他のDBサーバにデータ交換要求を送信することにより、前記自身が保存していないデータを取得し、前記保存していたサーバ担当データ情報を前記新たなサーバ担当データ情報に更新するデータ交換部と、を備え、
前記仮想サーバ配置装置は、
前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれに設定する負荷の閾値を示す負荷閾値定数が保存される記憶部と、
前記DBサーバそれぞれから取得した、前記サーバ性能と、前記負荷閾値定数とを用いて、前記DBサーバそれぞれの負荷の閾値であるサーバ閾値を計算し、前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれから取得した前記データキーの数の合計であるシステム全体のデータ数とに基づき、前記データへのアクセス回数が均等であると仮定して、前記DBサーバそれぞれの負荷を計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し、前記負荷が前記サーバ閾値以下のサーバSの集合と、前記負荷が前記サーバ閾値を超えるサーバSの集合とを生成するサーバ負荷計算部と、
前記DBサーバおよび前記データそれぞれについて、所定のハッシュ関数を用いてハッシュ値を算出することにより、ハッシュ空間上に、前記データの保存を担当する前記DBサーバの担当領域を設定し、前記サーバSの集合うち、前記負荷と前記サーバ閾値との差の絶対値が大きいDBサーバから順に、前記ハッシュ空間上の前記サーバSの担当領域において、担当できるデータ数が自身のDBサーバのサーバ閾値を超える超過分に対して、前記サーバSの集合のうち、前記絶対値が大きいDBサーバから順に仮想サーバを配置し、前記超過分のデータの前記ハッシュ空間上での担当領域を前記仮想サーバに変更し、前記変更したハッシュ空間上での担当領域に基づき、前記DBサーバそれぞれが担当するデータの保存先を示す前記新たなサーバ担当データ情報を生成し、前記生成した新たなサーバ担当データ情報を、前記DBサーバそれぞれに送信する配置処理部と、を備えること、
を特徴とするデータ負荷分散配置システム。
A data load distribution arrangement system comprising a plurality of DB servers that are communicably connected to each other, and a virtual server arrangement apparatus that is communicably connected to each of the plurality of DB servers,
The DB server
(1) Data to be searched from the client, data key associated with each of the data, (2) server performance of the DB server itself, and (3) the DB server of the storage destination of the data A storage unit for storing server data data to be shown;
A data management unit for transmitting the data key and the server performance to the virtual server placement device;
Data received from the virtual server placement device is received by the server, and compared with the stored server charge data information. The other DB server that is the data storage destination is extracted, and a data exchange request is sent to the extracted other DB server, so that the data that is not stored by itself is acquired, and the stored server manager A data exchanging unit that updates data information to the new server charge data information,
The virtual server placement device is:
A storage unit that stores processing performance required for the entire data load distribution and arrangement system, and a load threshold constant indicating a threshold of load set for each of the DB servers;
The server performance obtained from each of the DB servers and the load threshold constant are used to calculate a server threshold that is a load threshold of each of the DB servers, and the processing performance required for the entire data load distribution arrangement system And the total number of data keys acquired from each DB server, and the load on each DB server is calculated on the assumption that the number of accesses to the data is equal. Then, for each DB server, the absolute value of the difference between the load and the server threshold is calculated, the set of servers S whose load is equal to or less than the server threshold, and the server S + whose load exceeds the server threshold A server load calculation unit for generating a set of
For each of the DB server and the data, by calculating a hash value using a predetermined hash function, an area in charge of the DB server responsible for storing the data is set on the hash space, and the server S + From the DB server in which the absolute value of the difference between the load and the server threshold is large, the number of data that can be handled in the server S + in the hash space is the server threshold of the own DB server. relative excess of greater than, the server S - of the set of the virtual server absolute value from large DB server in order to place, the coverage area in said hash space data of the excess to the virtual server Before the storage location of the data that each DB server is in charge of based on the changed area in the changed hash space Generates new server contact data information, a new server contact data information the generating, by and a placement processing section that transmits to each of the DB server,
A data load distribution arrangement system characterized by
前記DBサーバは、
自身が保存する前記データの増減と、前記クライアントからの前記データに対するアクセス数とを監視し、前記データそれぞれへの前記アクセス数を示すアクセス回数情報を生成するアクセス監視部を、さらに備え、
前記データ管理部は、所定間隔ごとに、前記記憶部に保存されている前記データの前記データキーと、前記アクセス回数情報とを、前記仮想サーバ配置装置に送信し、
前記仮想サーバ配置装置は、
仮想サーバ再配置計算部を、さらに備えており、
前記サーバ負荷計算部は、前記所定間隔ごとに前記DBサーバそれぞれから取得した前記アクセス回数情報に含まれる、前記データキーの数であるデータ数と、前記データへのアクセス数とを用いて、前記所定間隔ごとの前記DBサーバそれぞれの前記負荷を計算することにより、前記サーバSの集合と、前記サーバSの集合とを生成し、
前記仮想サーバ再配置計算部は、前記サーバSの集合のうち、前記ハッシュ空間上に前記仮想サーバが配置されている前記DBサーバについて、前記絶対値が大きいDBサーバから順に、前記仮想サーバの担当領域を前記変更前に担当していた前記DBサーバの担当領域に戻したときに、当該DBサーバの負荷が当該DBサーバのサーバ閾値を超えない場合に、前記仮想サーバの担当領域を前記ハッシュ空間上から取り除き、前記DBサーバそれぞれの前記負荷を再計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し直すことにより、前記サーバSの集合と、前記サーバSの集合とを再度生成して、前記配置処理部に引き渡すこと、
を特徴とする請求項1に記載のデータ負荷分散配置システム。
The DB server
An access monitoring unit that monitors increase / decrease of the data stored by itself and the number of accesses to the data from the client, and generates access count information indicating the number of accesses to each of the data;
The data management unit transmits the data key of the data stored in the storage unit and the access count information to the virtual server placement device at predetermined intervals,
The virtual server placement device is:
A virtual server relocation calculation unit;
The server load calculation unit uses the number of data, which is the number of data keys, and the number of accesses to the data, included in the access count information acquired from each DB server at each predetermined interval, By calculating the load on each of the DB servers at predetermined intervals, a set of the servers S − and a set of the servers S + are generated,
The virtual server relocation calculator, the server S - of a set of, for the DB server where the virtual server is located on the hash space, the absolute value of a large DB servers in the order, the virtual server If the load of the DB server does not exceed the server threshold of the DB server when the charge area is returned to the charge area of the DB server that was assigned before the change, the hash value of the charge area of the virtual server is the hash removed from the space, the recalculates the DB server each of the load, for each of the DB server, by recalculating the absolute value of the difference between the load and the server threshold value, the server S - a set of, Re-generating the set of servers S + and delivering them to the placement processing unit;
The data load distribution and arrangement system according to claim 1.
相互に通信可能に接続される複数のDBサーバと、前記複数のDBサーバそれぞれと通信可能に接続される仮想サーバ配置装置とを備えるデータ負荷分散配置システムのデータ負荷分散配置方法であって、
前記DBサーバは、
(1)クライアントからの検索対象となるデータ、およびそのデータそれぞれに対応付けられるデータキー、(2)前記DBサーバ自身のサーバ性能、並びに、(3)前記データそれぞれの保存先の前記DBサーバを示すサーバ担当データ情報が保存されている記憶部を備えており、
前記データキーおよび前記サーバ性能を、前記仮想サーバ配置装置に送信するステップを実行し、
前記仮想サーバ配置装置は、
前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれに設定する負荷の閾値を示す負荷閾値定数が保存されている記憶部を備えており、
前記DBサーバそれぞれから取得した、前記サーバ性能と、前記負荷閾値定数とを用いて、前記DBサーバそれぞれの負荷の閾値であるサーバ閾値を計算し、前記データ負荷分散配置システム全体に求められる処理性能と、前記DBサーバそれぞれから取得した前記データキーの数の合計であるシステム全体のデータ数とに基づき、前記データへのアクセス回数が均等であると仮定して、前記DBサーバそれぞれの負荷を計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し、前記負荷が前記サーバ閾値以下のサーバSの集合と、前記負荷が前記サーバ閾値を超えるサーバSの集合とを生成するステップと、
前記DBサーバおよび前記データそれぞれについて、所定のハッシュ関数を用いてハッシュ値を算出することにより、ハッシュ空間上に、前記データの保存を担当する前記DBサーバの担当領域を設定し、前記サーバSの集合うち、前記負荷と前記サーバ閾値との差の絶対値が大きいDBサーバから順に、前記ハッシュ空間上の前記サーバSの担当領域において、担当できるデータ数が自身のDBサーバのサーバ閾値を超える超過分に対して、前記サーバSの集合のうち、前記絶対値が大きいDBサーバから順に仮想サーバを配置し、前記超過分のデータの前記ハッシュ空間上での担当領域を前記仮想サーバに変更し、前記変更したハッシュ空間上での担当領域に基づき、前記DBサーバそれぞれが担当するデータの保存先を示す新たなサーバ担当データ情報を生成し、前記生成した新たなサーバ担当データ情報を、前記DBサーバそれぞれに送信するステップと、を実行し、
前記DBサーバは、
前記仮想サーバ配置装置から、前記新たなサーバ担当データ情報を受信し、前記保存していたサーバ担当データ情報と比較することにより、自身の前記DBサーバの前記記憶部に保存していないデータおよびそのデータの保存先となる他のDBサーバを抽出し、前記抽出した他のDBサーバにデータ交換要求を送信することにより、前記自身が保存していないデータを取得し、前記保存していたサーバ担当データ情報を前記新たなサーバ担当データ情報に更新するステップを実行すること、
を特徴とするデータ負荷分散配置方法。
A data load distribution arrangement method of a data load distribution arrangement system, comprising: a plurality of DB servers that are communicably connected to each other; and a virtual server arrangement apparatus that is communicably connected to each of the plurality of DB servers,
The DB server
(1) Data to be searched from the client, data key associated with each of the data, (2) server performance of the DB server itself, and (3) the DB server of the storage destination of the data A storage unit for storing server data data to be shown,
Executing the step of transmitting the data key and the server performance to the virtual server placement device;
The virtual server placement device is:
A processing unit required for the entire data load distribution and arrangement system, and a storage unit storing a load threshold constant indicating a load threshold set for each of the DB servers,
The server performance obtained from each of the DB servers and the load threshold constant are used to calculate a server threshold that is a load threshold of each of the DB servers, and the processing performance required for the entire data load distribution arrangement system And the total number of data keys acquired from each DB server, and the load on each DB server is calculated on the assumption that the number of accesses to the data is equal. Then, for each DB server, the absolute value of the difference between the load and the server threshold is calculated, the set of servers S whose load is equal to or less than the server threshold, and the server S + whose load exceeds the server threshold Generating a set of
For each of the DB server and the data, by calculating a hash value using a predetermined hash function, an area in charge of the DB server responsible for storing the data is set on the hash space, and the server S + From the DB server in which the absolute value of the difference between the load and the server threshold is large, the number of data that can be handled in the server S + in the hash space is the server threshold of the own DB server. relative excess of greater than, the server S - of the set of the virtual server absolute value from large DB server in order to place, the coverage area in said hash space data of the excess to the virtual server And a new storage location indicating the data storage location of each of the DB servers based on the changed area in the hash space. Generate a server contact data information, a new server contact data information the generating, running, and transmitting to each of the DB server,
The DB server
By receiving the new server charge data information from the virtual server placement device and comparing it with the stored server charge data information, the data not stored in the storage unit of the own DB server and the data The other DB server that is the data storage destination is extracted, and a data exchange request is sent to the extracted other DB server, so that the data that is not stored by itself is acquired, and the stored server manager Performing a step of updating data information to the new server data information;
A data load distribution arrangement method characterized by the above.
前記DBサーバは、
自身が保存する前記データの増減と、前記クライアントからの前記データに対するアクセス数とを監視し、前記データそれぞれへの前記アクセス数を示すアクセス回数情報を生成するステップと、
所定間隔ごとに、前記記憶部に保存されている前記データの前記データキーと、前記アクセス回数情報とを、前記仮想サーバ配置装置に送信するステップとを、さらに実行し、
前記仮想サーバ配置装置は、
前記所定間隔ごとに前記DBサーバそれぞれから取得した前記アクセス回数情報に含まれる、前記データキーの数であるデータ数と、前記データへのアクセス数とを用いて、前記所定間隔ごとの前記DBサーバそれぞれの前記負荷を計算することにより、前記サーバSの集合と、前記サーバSの集合とを生成するステップと、
前記サーバSの集合のうち、前記ハッシュ空間上に前記仮想サーバが配置されている前記DBサーバについて、前記絶対値が大きいDBサーバから順に、前記仮想サーバの担当領域を前記変更前に担当していた前記DBサーバの担当領域に戻したときに、当該DBサーバの負荷が当該DBサーバのサーバ閾値を超えない場合に、前記仮想サーバの担当領域を前記ハッシュ空間上から取り除き、前記DBサーバそれぞれの前記負荷を再計算し、前記DBサーバごとに、前記負荷と前記サーバ閾値との差の絶対値を計算し直すことにより、前記サーバSの集合と、前記サーバSの集合とを再度生成するステップとを、実行すること、
を特徴とする請求項3に記載のデータ負荷分散配置方法。
The DB server
Monitoring the increase / decrease in the data stored by itself and the number of accesses to the data from the client, and generating access count information indicating the number of accesses to each of the data;
Further executing the step of transmitting the data key of the data stored in the storage unit and the access count information to the virtual server placement device at predetermined intervals,
The virtual server placement device is:
The DB server at each predetermined interval using the number of data that is the number of the data keys and the number of accesses to the data included in the access count information acquired from each DB server at each predetermined interval Generating the set of servers S − and the set of servers S + by calculating each of the loads;
The server S - of a set of, for the DB server where the virtual server is located on the hash space, in order from the large absolute value DB server, responsible for coverage area of the virtual server before the change If the load on the DB server does not exceed the server threshold value of the DB server when returning to the assigned area of the DB server, the virtual server is removed from the hash space, and each DB server And recalculate the absolute value of the difference between the load and the server threshold value for each DB server, thereby re-establishing the set of the servers S − and the set of the servers S + Performing the generating step;
The data load distribution and arrangement method according to claim 3.
JP2011105225A 2011-05-10 2011-05-10 Data load distribution arrangement system and data load distribution arrangement method Expired - Fee Related JP5540269B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011105225A JP5540269B2 (en) 2011-05-10 2011-05-10 Data load distribution arrangement system and data load distribution arrangement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011105225A JP5540269B2 (en) 2011-05-10 2011-05-10 Data load distribution arrangement system and data load distribution arrangement method

Publications (2)

Publication Number Publication Date
JP2012238084A true JP2012238084A (en) 2012-12-06
JP5540269B2 JP5540269B2 (en) 2014-07-02

Family

ID=47460949

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011105225A Expired - Fee Related JP5540269B2 (en) 2011-05-10 2011-05-10 Data load distribution arrangement system and data load distribution arrangement method

Country Status (1)

Country Link
JP (1) JP5540269B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162099A (en) * 2014-02-27 2015-09-07 日本電信電話株式会社 Server resource management device
JP2015162066A (en) * 2014-02-27 2015-09-07 日本電信電話株式会社 Cluster system and load balancing method
JP2017016576A (en) * 2015-07-06 2017-01-19 日本電信電話株式会社 Node, rebalancing cancellation method, and program
JP2017033337A (en) * 2015-08-03 2017-02-09 日本電信電話株式会社 Virtual machine arrangement device and virtual machine arrangement method
JP2017146848A (en) * 2016-02-18 2017-08-24 日本電信電話株式会社 Re-balancing device, re-balancing method, and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09218858A (en) * 1996-02-14 1997-08-19 Hitachi Ltd Distributed type data base control system
JP2011510367A (en) * 2007-12-26 2011-03-31 シマンテック コーポレーション Balanced consistent hash for distributed resource management

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09218858A (en) * 1996-02-14 1997-08-19 Hitachi Ltd Distributed type data base control system
JP2011510367A (en) * 2007-12-26 2011-03-31 シマンテック コーポレーション Balanced consistent hash for distributed resource management

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162099A (en) * 2014-02-27 2015-09-07 日本電信電話株式会社 Server resource management device
JP2015162066A (en) * 2014-02-27 2015-09-07 日本電信電話株式会社 Cluster system and load balancing method
JP2017016576A (en) * 2015-07-06 2017-01-19 日本電信電話株式会社 Node, rebalancing cancellation method, and program
JP2017033337A (en) * 2015-08-03 2017-02-09 日本電信電話株式会社 Virtual machine arrangement device and virtual machine arrangement method
JP2017146848A (en) * 2016-02-18 2017-08-24 日本電信電話株式会社 Re-balancing device, re-balancing method, and program

Also Published As

Publication number Publication date
JP5540269B2 (en) 2014-07-02

Similar Documents

Publication Publication Date Title
US10079879B2 (en) Weighted rendezvous hashing
US10209908B2 (en) Optimization of in-memory data grid placement
EP3335119B1 (en) Multi-priority service instance allocation within cloud computing platforms
WO2018149221A1 (en) Device management method and network management system
CN107111517B (en) Optimized allocation and/or generation of virtual machines for reducer tasks
WO2017084393A1 (en) Content distribution method, virtual server management method, cloud platform and system
JP5540269B2 (en) Data load distribution arrangement system and data load distribution arrangement method
JP7035606B2 (en) Edge computing systems, edge servers, system control methods, and programs
KR20170029263A (en) Apparatus and method for load balancing
CN105791254B (en) Network request processing method and device and terminal
CN110347515B (en) Resource optimization allocation method suitable for edge computing environment
CN107291536B (en) Application task flow scheduling method in cloud computing environment
CN104639645A (en) Method and device for balancing network load, and cluster service system
WO2022111313A1 (en) Request processing method and micro-service system
JP2016024612A (en) Data processing control method, data processing control program, and data processing control apparatus
CN114051049A (en) Proxy forwarding method of identifier, server and computer readable storage medium
US8819239B2 (en) Distributed resource management systems and methods for resource management thereof
US20150365474A1 (en) Computer-readable recording medium, task assignment method, and task assignment apparatus
JP5388134B2 (en) Computer system and moving data determination method
Anusooya et al. Reducing the carbon emission by early prediction of peak time load in a data center
US20150263958A1 (en) Load balancing apparatus and method
KR102054068B1 (en) Partitioning method and partitioning device for real-time distributed storage of graph stream
JP6339978B2 (en) Resource allocation management device and resource allocation management method
JP5690287B2 (en) Load balancing program and load balancing apparatus
KR101393237B1 (en) Dynamic available resource reallocation based job allocation system and method in grid computing thereof

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20130201

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130725

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140311

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: 20140401

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20140403

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140404

R150 Certificate of patent or registration of utility model

Ref document number: 5540269

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees