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 PDFInfo
- 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
Links
Images
Abstract
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)に示すように、リング状のハッシュ空間にデータとサーバとが配置され、あるサーバ(例えば、「S1」)が配置された位置から、その1つ前に配置されたサーバ「S5」の配置位置の前までの領域(担当領域)に配置されたデータを、時計回りに、そのサーバ「S1」が格納する。このコンシステントハッシュ法によるデータの分散格納方法では、サーバ数の増減に対して格納先のサーバが変更となるデータが限られるため、拡張性に富むという特徴がある。 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)に示すように、ハッシュ空間上にサーバ「S3」の仮想サーバ「VS3」を、例えば、サーバ「S1」の担当領域にハッシュ値に基づき配置する。そして、この仮想サーバ「VS3」を設けることで、サーバ「S1」の担当領域の一部のデータを、仮想サーバ「VS3」の基のサーバ「S3」に格納させることで、サーバ「S1」の負荷を減らし、負荷分散性を向上させる。
この仮想サーバを用いた方法によれば、各サーバの仮想サーバをハッシュ空間上に増やすことで、担当領域を細かく分割し各サーバが格納するデータ数を、より均一にすることができる。
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.
しかしながら、従来のコンシステントハッシュ法による仮想サーバの配置方法では、サーバにハッシュ関数を繰り返し適用するなどして複数のハッシュ値を算出し、仮想サーバをハッシュ空間に配置する。従って、適用するハッシュ関数に応じて負荷分散効果が異なると同時に、分散効果を高めるためには大量の仮想サーバをハッシュ空間上に配置する必要がある。その結果、仮想サーバ保持のための記述量が増加し、クライアントからデータの問い合わせを受けた際に、そのデータを格納している担当サーバの検索に要する時間が増加してしまう。 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
また、請求項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
また、請求項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.
次に、本発明を実施するための形態(以下、「実施形態」という)について、適宜図面を参照しながら詳細に説明する。 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
図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
As shown in FIG. 1, the data load distribution and
また、仮想サーバ配置装置10は、管理者サーバ5と通信可能に接続されており、仮想サーバをハッシュ空間上に配置するために必要となる、設定情報(後記参照)を管理者サーバ5から受信する。そして、仮想サーバ配置装置10は、仮想サーバの配置処理の結果、DBサーバ20が不足する場合には、リソース不足通知を管理者サーバ5へ送信する。
The virtual
DBサーバ20は、クライアント6とも通信可能に接続されている。DBサーバ20は、クライアント6からのデータ要求を受け付けると、そのデータを保存するDBサーバ20を、後記する記憶部24内のサーバ担当データ情報100(図6参照)を参照して検索し、その検索結果を担当サーバ通知として、クライアント6に送信する。そして、クライアント6は、その担当サーバ通知に示されるデータの保存先のDBサーバ20に対して、データ取得要求を送信し、そのデータを取得する。
The
次に、本実施形態に係るデータ負荷分散配置システム1の仮想サーバの初期配置の概要について説明する。その後に、データ負荷分散配置システム1の具体的な構成と、データ負荷分散配置方法の具体的な処理の流れについて説明する。
Next, an outline of the initial arrangement of the virtual server of the data load
(仮想サーバの初期配置の概要)
まず、本実施形態に係るデータ負荷分散配置システム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
本実施形態に係るデータ負荷分散配置システム1では、初期状態として、N台のDBサーバ(物理サーバ)20にH個のデータが保存されているものとする。この場合に、初期状態でのシステム性能要件は、以下の(A)(B)ようになる。
In the data load distribution and
(A)各サーバSmにかかる負荷Wmは、そのサーバ性能Tm以下である。 (A) The load W m applied to each server S m is equal to or less than the server performance T m .
(B)各サーバSmにかかる負荷Wmの合計が、システム全体に求める処理性能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.
この(A)および(B)のシステム性能条件を満たす限り、クライアント6は、正常なアクセス応答時間内でシステム内のデータへのアクセスが可能である。
As long as the system performance conditions (A) and (B) are satisfied, the
本実施形態に係る仮想サーバの初期配置では、システム全体に対して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)各サーバSmにかかる負荷Wmは、そのサーバ閾値αm以下である。 (C) The load W m applied to each server S m is the server threshold value α m or less.
なお、このサーバ閾値αmは、以下の(式1)により計算される。 The server threshold value α m is calculated by the following (Equation 1).
ここで、cは、負荷閾値定数であり、例えば、サーバ性能Tmの7割をサーバ閾値αmとして設定する場合には、システムの管理者等により「0.7」が、負荷閾値定数cとして設定される。
また、負荷Wmは、以下の(式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).
ここで、Dmは、サーバSmに保存されるデータ数であり、αSm(i)は、サーバSmが保存するデータdSm(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は、ハッシュ空間における各サーバSm(DBサーバ20)の担当領域に、仮想サーバを配置し、サーバSm(物理サーバ)の担当領域の一部を仮想サーバに担当させる。これにより、そのサーバSm(物理サーバ)の担当データ(DBサーバ20が保存するデータ)の一部を、仮想サーバの基となる他の物理サーバ(DBサーバ20)に変更すること、つまり、他のDBサーバ20にそのデータを移して保存させることが可能となる。そして、仮想サーバ配置装置10は、この仮想サーバを用いて、ハッシュ空間における負荷の大きい物理サーバ(DBサーバ20)の担当領域内に、負荷の小さい物理サーバ(DBサーバ20)の仮想サーバを割り当てることで、システム全体の負荷分散を行う。なお、本実施形態において、DBサーバ20をハッシュ空間に配置した場合に、DBサーバ20を、仮想サーバに対応させる意味において物理サーバということがある。
The virtual
仮想サーバ配置装置10は、各DBサーバ20からサーバ性能Tmを取得し、管理者サーバ5から負荷閾値定数cを取得するなどして、(式1)を用いて、サーバ閾値αmを計算する。そして、仮想サーバ配置装置10は、負荷Wmがかかっている物理サーバSmに対し、Omを以下のように定義する。
The virtual
ここで、Omは、物理サーバSmの負荷Wmとサーバ閾値αmとの差の絶対値である。 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
ここで、負荷がサーバ閾値以下の物理サーバの集合を、S−とする。そして、S−に含まれる物理サーバSmをOmの大きい順に並べたものを以下のように記述する。 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.
一方、負荷がサーバ閾値を超える物理サーバの集合を、S+とする。そして、S+に含まれる物理サーバSmをOmの大きい順に並べたものを以下のように記述する。 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.
また、負荷がサーバ閾値以下のサーバ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.
次に、仮想サーバ配置装置10による、ハッシュ空間上での仮想サーバの初期配置の概要について説明する。図2〜図5は、本実施形態に係る仮想サーバ配置装置10による、ハッシュ空間上での仮想サーバの初期配置の概要を説明するための図である。
Next, an outline of the initial placement of the virtual server on the hash space by the virtual
ここでは、図2(b)に示すように、仮想サーバ配置装置10により、負荷がサーバ閾値以下のサーバS−が、S3,S4,S5のように、負荷とサーバ閾値との差の絶対値O−の大きい順に並べられ、負荷がサーバ閾値を超えるサーバS+が、S1,S2のように、負荷とサーバ閾値との差の絶対値O+の大きい順に並べられているものとする。そして、この各サーバS1〜S5とその担当データとが、仮想サーバ配置装置10により、図2(a)に示すように、ハッシュ空間上に配置されるとする。
Here, as shown in FIG. 2B, the virtual
図2(a)に示すような状態から、仮想サーバ配置装置10は、負荷とサーバ閾値との差の絶対値が大きい順に、負荷がサーバ閾値を超えるサーバS+の負荷の超過分の領域に、負荷がサーバ閾値以下のサーバS−の仮想サーバを配置することで、負荷がサーバ閾値を超えるサーバS+の負荷の超過分のデータの担当を、負荷がサーバ閾値以下のサーバS−に変更する。
From the state shown in FIG. 2A, the virtual
具体的には、図3に示すように、まず、負荷がサーバ閾値を超えるサーバS+のうち、絶対値O+が一番大きいS1のサーバの負荷の超過分の領域に、負荷がサーバ閾値以下のサーバS−のうち、絶対値O−が一番大きいサーバS3の仮想サーバVS3を配置し、その領域のデータをサーバS3が担当する。 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に示すように、サーバS1の残りの負荷の超過分の領域に、負荷がサーバ閾値以下の次のサーバであるサーバS4の仮想サーバVS4を配置し、その領域のデータをサーバS4が担当する。これによって、サーバS1の負荷の超過分が解消される。続いて、負荷がサーバ閾値を超える次のサーバであるサーバS2の負荷の超過分の領域に、負荷がサーバ閾値以下のサーバS4の残りの余剰分を、仮想サーバVS4として配置し、その領域のデータをサーバS4が担当する。 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に示すように、サーバS2の残りの負荷の超過分の領域に、負荷がサーバ閾値以下の次のサーバであるサーバS5の仮想サーバVS5を配置し、その領域のデータをサーバS5が担当する。これによって、サーバS2の負荷の超過分が解消される。なお、仮想サーバ配置装置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
本実施形態に係る仮想サーバ配置装置10は、このように、ハッシュ空間上で、負荷がサーバ閾値を超えるサーバS+の負荷の超過分の領域を、負荷がサーバ閾値以下のサーバS−が、仮想サーバを設けることにより、その領域のデータを、負荷がサーバ閾値以下のサーバS−のサーバが担当する。よって、サーバ間の負荷分散を実現し、仮想サーバの数を減らすことができる。
As described above, the virtual
(データ負荷分散配置システムの構成)
次に、本実施形態に係るデータ負荷分散配置システム1を構成するDBサーバ20および仮想サーバ配置装置10の構成例について詳細に説明する。
(Data load distribution system configuration)
Next, a configuration example of the
<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
The
As illustrated in FIG. 1, the
通信部22は、クライアント6、自身以外の他のDBサーバ20および仮想サーバ配置装置10との間の通信を司る、通信インタフェースにより構成される。
The
処理部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
情報受信部211は、通信部22を介して、クライアント6からのデータ要求や、仮想サーバ配置装置10からのサーバ担当データ情報100(図6参照)、他のDBサーバ20から送信されたデータ等を取得する。
The
データ管理部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
図6は、本実施形態に係るサーバ担当データ情報100のデータ構成の一例を示す図である。
図6に示すように、サーバ担当データ情報100は、各DBサーバ(サーバSm)20ごとに、そのサーバSmが保存する担当データが記憶される。例えば、サーバS1は、「d1〜d3,d6」のデータを保存することを示している。なお、この担当データには、各データのデータキーが「d1」「d2」…、等として記憶される。なお、このサーバ担当データ情報100には、仮想サーバ配置装置10による仮想サーバの初期配置の処理の初期値として、現時点においてDBサーバ20ごとに保存される各データの情報が記憶されているものとする。
FIG. 6 is a diagram illustrating an example of a data configuration of the server
As shown in FIG. 6, the server handled
また、データ管理部212は、図1に示すように、ハッシュ値計算部213を備えている。そして、データ管理部212は、通信部22や、不図示の入力部を介して、新たなデータを取得すると、そのデータのデータキーに対して、ハッシュ値計算部213が、所定のハッシュ関数によりハッシュ値を計算する。データ管理部212は、そのデータのデータキーと、そのハッシュ値と、そのデータ(データ値)とを対応付けて、記憶部24内の後記するデータ格納部200に記憶する。
The data management unit 212 includes a hash
そして、データ管理部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
また、データ管理部212は、仮想サーバ配置装置10による仮想サーバの初期配置の処理に際して、記憶部24内のデータ格納部200を参照し、自身が保存するすべてのデータのデータキーと、予め記憶部24等に保存されている自身のサーバ性能Tmとを、自身のDBサーバ20に固有な番号と共に、情報送信部216を介して仮想サーバ配置装置10に送信する。なお、自身のDBサーバ20に固有な番号とは、例えば、そのDBサーバ20のIPアドレス等であるが、これに限定されず、他のDBサーバ20等と識別可能な番号であればよい。
In addition, the data management unit 212 refers to the
また、データ管理部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
Furthermore, when the data management unit 212 obtains new server
アクセス監視部214は、データ管理部212を監視し、クライアント6からのデータ取得要求を受け付けるごとに、データ格納部200に記憶された各データへのアクセス回数をカウントし、その結果を、アクセス回数情報300として記憶する。
The
図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
As shown in FIG. 7, the
データ交換部215は、データ管理部212が仮想サーバ配置装置10から新たなサーバ担当データ情報100を受信したことを契機として、その新たなサーバ担当データ情報100と記憶部24に保存していたサーバ担当データ情報100と比較することにより、自身が保存していないデータおよびそのデータの保存先となる他のDBサーバ20を抽出する。そして、データ交換部215は、その抽出した自身が担当すべきデータを記憶している他のDBサーバ20に対して、データ交換要求を送信することにより、そのデータの送信を依頼し、担当すべきデータを取得する。続いて、データ交換部215は、記憶部24に保存していたサーバ担当データ情報100を、データ管理部212を介して、受信した新たなサーバ担当データ情報100に更新させる。
The
情報送信部216は、通信部22を介して、クライアント6への担当サーバ通知や、仮想サーバ配置装置10への自身が保存するデータに関する情報、他のDBサーバ20へのデータ交換要求等を送信する。
The
次に、記憶部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-
メモリ部23は、RAM等の一次記憶装置からなり、処理部21によるデータ処理に必要な情報を一次的に記憶している。
The
<仮想サーバ配置装置の構成>
次に、本実施形態に係る仮想サーバ配置装置10の構成について、図1を参照して説明する。
仮想サーバ配置装置10は、データを複数のDBサーバ20に分散して保存させるために、データ(データキー)とDBサーバ(固有の番号)20とをハッシュ関数にかけてリング状のハッシュ空間に配置する。そして、仮想サーバ配置装置10は、各DBサーバ20のサーバ性能Tmや、時間経過に伴うサーバ負荷の変動を考慮した上で、仮想サーバをハッシュ空間上に配置する。仮想サーバ配置装置10は、仮想サーバの配置により決定した各DBサーバ20が保存すべきデータの情報(サーバ担当データ情報100)を、各DBサーバ20それぞれに送信する。
<Configuration of virtual server placement device>
Next, the configuration of the virtual
The virtual
この仮想サーバ配置装置10は、図1に示すように、制御部11と、通信部12と、メモリ部13と、記憶部14とを備える。
As illustrated in FIG. 1, the virtual
通信部12は、各DBサーバ20および管理者サーバ5との間の通信を司る、通信インタフェースにより構成される。
The
制御部11は、仮想サーバ配置装置10全体の制御を司り、情報受信部111と、サーバ負荷計算部112と、配置処理部113と、仮想サーバ再配置計算部115と、情報送信部116とを含んで構成される。なお、この制御部11は、例えば、仮想サーバ配置装置10の記憶部14に格納されたプログラムをCPUが、メモリ部13であるRAMに展開し実行することで実現される。
The control unit 11 controls the entire virtual
情報受信部111は、通信部12を介して、DBサーバ20それぞれから、各DBサーバ20に記憶されたデータ等に関する情報を受信したり、管理者サーバ5から、仮想サーバの配置に必要となる設定情報等を取得する。
The
サーバ負荷計算部112は、各DBサーバ20のサーバ閾値αmおよび負荷Wmを計算する。
具体的には、サーバ負荷計算部112は、仮想サーバの初期配置の処理において、管理者サーバ5等から、システム全体に求める処理性能Rおよび負荷閾値定数cを取得し、DBサーバ20から各DBサーバ20のサーバ性能Tmおよびデータキーを取得する。そして、サーバ負荷計算部112は、各DBサーバ20のサーバ性能Tmと負荷閾値定数cにより、(式1)を用いて、各DBサーバ20のサーバ閾値αmを計算する。また、サーバ負荷計算部112は、各DBサーバ20から取得したデータキーの数を合計し、システム全体のデータ数Hを計算する。そして、各データへのアクセス回数が均等であると仮定し、1つのデータへのアクセス回数をR/H回として、(式2)を用いて、各DBサーバ20の負荷Wmを計算する。
The server
Specifically, the server
そして、サーバ負荷計算部112は、計算したDBサーバ20ごとの負荷Wmとサーバ閾値αmとを比較し、負荷がサーバ閾値以下のサーバS−の集合と、負荷がサーバ閾値を超えるサーバS+の集合とを生成して、その集合ごとに、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列する処理を行う。
Then, the server
また、サーバ負荷計算部112は、仮想サーバの再配置の処理において、所定間隔Zごとに各DBサーバ20が記憶するデータのデータキーと、そのデータに対するアクセス回数を記録したアクセス回数情報300を、各DBサーバ20から取得する。そして、(式2)を用いて、各DBサーバ20の負荷Wmを計算する。
また、サーバ負荷計算部112は、計算した所定間隔Z経過後のDBサーバ20ごとの負荷Wmとサーバ閾値αmとを比較し、負荷がサーバ閾値以下のサーバS−の集合と、負荷がサーバ閾値を超えるサーバS+の集合とを生成して、その集合ごとに、所定間隔Z経過時点における、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列する処理を行う。
Further, the server
Further, the server
次に、配置処理部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
The placement processing unit 113 then loads the server S + with the load exceeding the server threshold, in order from the
配置処理部113は、負荷がサーバ閾値を超えるサーバS+のすべての超過分について、仮想サーバを配置することにより決定した、各DBサーバ20が担当するデータについての新たなサーバ担当データ情報100を生成する。そして、配置処理部113は、情報送信部116を介して、各DBサーバ20それぞれに、新たなサーバ担当データ情報100を送信する。
The placement processing unit 113 obtains new server
また、配置処理部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
次に、仮想サーバ再配置計算部115は、仮想サーバの再配置の処理において、サーバ負荷計算部112が、所定間隔Z経過時点における、負荷がサーバ閾値以下のサーバS−と、負荷がサーバ閾値を超えるサーバS+とについて、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列する処理が行ったことを契機として、所定間隔Z経過時点において、負荷がサーバ閾値以下のサーバS−に、ハッシュ空間上で仮想サーバが配置されていた場合に、その仮想サーバを取り除く処理(仮想サーバ再配置計算)を行う。つまり、元々そのDBサーバ20自身が担当すべきハッシュ空間の担当領域を、そのDBサーバ20の負荷Wmがサーバ閾値αmより大きいため、他のDBサーバ20が仮想サーバを配置することにより、データの保存先を変更してもらっていたものを、時間の経過により、サーバの負荷が変化し、負荷に余裕が生じたため、仮想サーバが担当していたデータ分を、元々のDBサーバ20の担当領域に戻す処理を行う。なお、この仮想サーバ再配置計算の詳細は、後記する図12〜図18を参照して説明する。
Next, in the virtual server relocation processing, the virtual server
情報送信部116は、通信部12を介して、各DBサーバ20それぞれに、配置処理部113が生成したサーバ担当データ情報100を送信する。また、情報送信部116は、管理者サーバ5に対し、リソース不足通知を送信する。
The
次に、記憶部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-
メモリ部13は、RAM等の一次記憶装置からなり、制御部11によるデータ処理に必要な情報を一次的に記憶している。
The
次に、本実施形態に係るデータ負荷分散配置システム1が行う、(1)各DBサーバ20のサーバ性能を考慮した仮想サーバの初期配置によるデータ負荷分散配置処理と、(2)システム稼動後の時間経過に伴うデータ数やデータアクセス回数の増減に対応した動的な仮想サーバの再配置と、について具体的に説明する。
Next, the data load
(データ負荷分散配置処理―仮想サーバの初期配置)
まず、図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
まず、管理者サーバ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
次に、各DBサーバ20は、自身が保存しているデータのデータキー、および自サーバのサーバ性能Tmを、自身に固有な番号とともに、仮想サーバ配置装置10に送信する(ステップS12)。
Then, the
続いて、仮想サーバ配置装置10のサーバ負荷計算部112は、サーバ負荷計算処理を行う(ステップS13)。
具体的には、サーバ負荷計算部112は、管理者サーバ5から受信した設定情報に含まれる負荷閾値定数cと、各DBサーバ20から受信したサーバ性能Tmとに基づき、(式1)を用いて、各サーバのサーバ閾値αmを計算する。そして、サーバ負荷計算部112は、管理者サーバ5から受信したシステム全体に求める処理性能Rと、各サーバから受信したデータキーの数の合計から得られるデータ数Hとに基づき、(式2)を用いて、DBサーバ20ごとの負荷Wmを計算する。なお、この仮想サーバの初期配置では、システム全体に対して1秒当たりシステム最大性能であるR回のアクセスがあり、各データへのアクセス回数は均等であるR/H回と想定する。
そして、サーバ負荷計算部112は、計算したDBサーバ20ごとの負荷Wmとサーバ閾値αmとを比較し、負荷がサーバ閾値以下のサーバS−の集合と、負荷がサーバ閾値を超えるサーバS+の集合とを生成して、その集合ごとに、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列する処理を行う。
Subsequently, the server
Specifically, the server
Then, the server
そして、仮想サーバ配置装置10の配置処理部113が、ハッシュ空間上での仮想サーバの配置処理(「仮想サーバ配置処理」)を行うことにより、サーバ担当データ情報100を生成する(ステップS14)。ここで、配置処理部113は、この仮想サーバ配置処理において、リソース不足と判定した場合には、サーバ担当データ情報100を生成せずに、そのリソース不足通知を、管理者サーバ5に送信し(ステップS15)、物理サーバ(DBサーバ20)の追加を促して(ステップS16)、処理を終える。
Then, the placement processing unit 113 of the virtual
一方、仮想サーバ配置装置10が、サーバ担当データ情報100を生成した場合には、そのサーバ担当データ情報100を、各DBサーバ20それぞれに送信する(ステップS17)。
On the other hand, when the virtual
そして、各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
<仮想サーバ配置処理>
次に、図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
なお、この配置処理部113による仮想サーバ配置処理は、図8のステップS13において、仮想サーバ配置装置10のサーバ負荷計算部112により、各DBサーバ20の負荷Wmが計算され、負荷がサーバ閾値以下のサーバS−と、負荷がサーバ閾値を超えるサーバS+とについて、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順に、サーバがすでに整列されているものとして説明する。
そして、配置処理部113は、図2〜図5において説明したように、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順に、負荷がサーバ閾値を超えるサーバS+の負荷の超過分の領域に、負荷がサーバ閾値以下のサーバS−の仮想サーバを配置することで、負荷がサーバ閾値を超えるサーバS+の負荷の超過分の担当データを、負荷がサーバ閾値以下のサーバS−に変更する処理を行う。以下、具体的に説明する。
Note that in the virtual server placement processing by the placement processing unit 113, the load W m of each
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のハッシュ値に近い順に並べたときに、負荷がサーバ閾値αm以下で最大となる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
ステップ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
一方、ステップ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
一方、ステップ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
そして、ステップ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
このようにすることで、本実施形態に係るデータ負荷分散配置システム1およびデータ負荷分散配置方法による仮想サーバの初期配置によって、負荷分散を実現し、さらに、各サーバの担当領域に配置する仮想サーバの数が同一に設定される従来技術に比べ、仮想サーバの数を減らすことができる。また、仮想サーバを大量に配置する必要がなくなるため、仮想サーバ保持のための記述量の増加を抑え、クライアントからデータの問い合わせを受けた際に、そのデータを格納している担当サーバの検索に要する時間の増加を抑えることができる。よって、システム全体としてのスループットを向上させることができる。
By doing in this way, load distribution is realized by the initial arrangement of the virtual server by the data load
(データ負荷分散配置処理―仮想サーバの再配置)
次に、図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
まず、管理者サーバ5から、仮想サーバ配置装置10が、システム全体に求める処理性能Rと、各サーバの負荷のサーバ閾値を決定するための負荷閾値定数cとを、設定情報として取得する(ステップS11)。なお、この処理は、所定間隔Zごとに行われてもよいが、システム全体に求める処理性能Rおよび負荷閾値定数cに変更がなければ、このステップS11を行わないようにしてもよい。また、予め、仮想サーバ配置装置10の記憶部14に、設定情報(R,c)を記憶させておき利用するようにしてもよい。
First, from the
そして、各DBサーバ20それぞれは、所定間隔Zごとに、自身のDBサーバ20に保存しているデータのデータキーおよびそのデータへのアクセス回数の情報であるアクセス回数情報300(図7参照)を、自身に固有な番号とともに、仮想サーバ配置装置10へ送信する(ステップS21)。
Each
次に、仮想サーバ配置装置10のサーバ負荷計算部112は、サーバ負荷計算処理を行う(ステップS22)。
具体的は、サーバ負荷計算部112は、図8の仮想サーバの初期配置におけるステップS12で受信している、各DBサーバ20のサーバ性能Tmと、自身の記憶部14に記憶する負荷閾値定数cまたはステップS11で取得した負荷閾値定数cに基づき、(式1)を用いて、各サーバのサーバ閾値αmを設定する。また、サーバ負荷計算部112は、ステップS21で各DBサーバ20から受信した、データキーおよびアクセス回数を含むアクセス回数情報300(図7参照)に基づき、各DBサーバの負荷Wmを計算する。そして、サーバ負荷計算部112は、計算したDBサーバ20ごとの負荷Wmとサーバ閾値αmとを比較し、負荷がサーバ閾値以下のサーバS−の集合と、負荷がサーバ閾値を超えるサーバS+の集合とを生成して、その集合ごとに、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列する処理を行う。
Next, the server
Specifically, the server
続いて、仮想サーバ配置装置10の仮想サーバ再配置計算部115は、負荷がサーバ閾値以下となったDBサーバ20について、仮想サーバを取り除く処理(仮想サーバ再配置計算)を行う(ステップS23)。そして、仮想サーバ再配置計算部115は、仮想サーバを取り除いた後の各サーバの負荷に基づき、負荷がサーバ閾値以下のサーバS−と、負荷がサーバ閾値を超えるサーバS+とについて、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列する。そして、その情報を、配置処理部113に引き渡す。なお、この仮想サーバ再配置計算は、後記する図12〜図18において詳細に説明する。
Subsequently, the virtual server
そして、仮想サーバ配置装置10の配置処理部113は、仮想サーバ再配置計算部115が計算し整列させた各サーバの負荷に関する情報に基づき、再度、仮想サーバ配置処理(図9および図10参照)を実行する(ステップS14)。そして、以下は、図8のステップS15〜S18と同様の処理を行って、各DBサーバ20同士が担当データの交換処理を行う。
Then, the placement processing unit 113 of the virtual
<仮想サーバ再配置計算>
次に、図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
なお、この仮想サーバ再配置計算部115による仮想サーバ再配置計算は、例えば、図11のステップS22において、サーバ負荷計算部112が、所定間隔Zごとに各DBサーバ20の負荷Wmを算出し、負荷がサーバ閾値以下のサーバS−と、負荷がサーバ閾値を超えるサーバS+とについて、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順にサーバを整列させたことを契機として実行される。
The virtual server relocation calculation by the virtual server
図12〜図17は、本実施形態に係る仮想サーバ配置装置10(仮想サーバ再配置計算部115)による仮想サーバ再配置計算の概要を説明するための図である。
ここでは、仮想サーバ配置装置10による仮想サーバの初期配置により、図5(a)に示すようにハッシュ空間上で仮想サーバが配置され(図12(a)参照)、システム稼働後の所定間隔Z後に、各サーバSmの負荷Wmとサーバ閾値αmとの差の絶対値が、図12(b)のようになったものとして説明する。例えば、サーバS1は、初期配置では、仮想サーバ(VS3,VS4)が配置されることにより、負荷がサーバ閾値を超えない設定で、処理を開始したが、時間の経過とともに、図12(b)に示すように、負荷がサーバ閾値以下のサーバS−となっている。つまりサーバS1の負荷が減少している。
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
仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS−のうち、ハッシュ空間上で仮想サーバが配置されているものを取り除く処理を行う。なお、その際、仮想サーバ再配置計算部115は、仮想サーバを取り除くと、その負荷Wmがサーバ閾値αmを超えてしまう場合には、負荷がサーバ閾値以下のサーバS−のその仮想サーバを取り除く処理を行わないものとする。
The virtual server
まず、仮想サーバ再配置計算部115は、図12に示す状態から、負荷がサーバ閾値以下のサーバS−のうち、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順で、かつ、ハッシュ空間上で仮想サーバが配置されているサーバを選択する。ここでは、S1のサーバを選択する。そして、ハッシュ空間上のサーバS1に近い順に、1番目に配置された仮想サーバVS3を取り除く(図13(a)参照)。この状態での各サーバSmの負荷Wmとサーバ閾値αmとの差の絶対値を図13(b)に示す。サーバS1は、仮想サーバVS3が担当していたデータの分だけ、負荷の余裕分が減っている。これに対し、サーバS3は、仮想サーバVS3の担当していたデータ分だけ、負荷の余裕分が増えている。
First, the virtual server
次に、仮想サーバ再配置計算部115は、ハッシュ空間上のサーバS1に近い順に、2番目に配置された仮想サーバVS4を取り除く(図14(a)参照)。この状態での各サーバSmの負荷Wmとサーバ閾値αmとの差の絶対値を図14(b)に示す。サーバS1は、仮想サーバVS4が担当していたデータ分だけ、負荷の余裕分が減っている。これに対し、サーバS4は、仮想サーバVS4の担当していたデータ分だけ、負荷の超過分が減っている。
Next, the virtual server
これで、サーバS1の仮想サーバをすべて取り除いたので、図12(b)において、負荷がサーバ閾値以下のサーバS−で、仮想サーバが配置されている次のサーバであるサーバS2を選択する。なお、サーバS3は、仮想サーバが配置されていないので、選択せずに、サーバS2を選択する。そして、ハッシュ空間上のサーバS2に近い順に、1番目に配置された仮想サーバVS4を取り除く(図15(a)参照)。この状態での各サーバSmの負荷Wmとサーバ閾値αmとの差の絶対値を図15(b)に示す。サーバS2は、仮想サーバVS4が担当していたデータ分だけ、負荷の余裕分が減っている。これに対し、サーバS4は、仮想サーバVS4が担当していたデータ分だけ、負荷の超過分が減っている。 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は、ハッシュ空間上のサーバS2に近い順に、2番目に配置された仮想サーバVS5を取り除く処理を行おうとするが、仮想サーバVS5の担当データ分の負荷が、サーバS2の余裕分より大きいため、仮想サーバVS5を取り除くと、サーバS2の負荷がサーバ閾値を超えてしまうため、取り除く処理を行わない(図16参照)。
Next, the virtual server
そして、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS−のすべてのサーバの処理を終えると、仮想サーバを取り除いても負荷がサーバ閾値を超えない範囲で、その仮想サーバを取り除いた状態の各サーバSmの負荷Wmとサーバ閾値αmとの差の絶対値を示す図16(b)のようになる。仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS−と、負荷がサーバ閾値を超えるサーバS+とについて、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順に整列し直し(図17参照)、仮想サーバ再配置計算を終え、その情報を配置処理部113に渡す。そして、配置処理部113が、図11のステップS14の仮想サーバ配置処理(図9および図10参照)を続ける。
Then, the virtual server
次に、図18を用いて、仮想サーバ再配置計算部115による仮想サーバ再配置計算の流れを、さらに詳細にフローチャートを用いて説明する(適宜図1参照)。
Next, the flow of the virtual server relocation calculation performed by the virtual server
まず、仮想サーバ再配置計算部115は、初期値として、負荷がサーバ閾値以下のサーバS− kjについて、絶対値O− kjが大きい順に1番目のサーバを選択し(j←1)、その選択した負荷がサーバ閾値以下のサーバS− kjに、ハッシュ空間上で近い順で一番目の仮想サーバを初期値として選択する(l←1)(ステップS201)。
First, the virtual server
次に、仮想サーバ再配置計算部115は、まだ処理していない、負荷がサーバ閾値以下のサーバS− kjがあるか否かを判定する(j<p+1)(ステップS202)。ここで、まだ処理していない、負荷がサーバ閾値以下のサーバS− kjがない、つまり、すべての負荷がサーバ閾値以下のサーバS− kjの処理を終えている場合には(ステップS202→No)、ステップS210へ進む。一方、まだ処理していない、負荷がサーバ閾値以下のサーバS− kjがある場合には(ステップS202→Yes)、次のステップS203へ進む。
Next, the virtual server
ステップS203において、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS− kjのハッシュ空間上での担当領域に、仮想サーバが配置されているか否かを判定する(ykj > 0)。ここでykjは、負荷がサーバ閾値以下のサーバS− kjに配置された仮想サーバ数を示す。そして、負荷がサーバ閾値以下のサーバS− kjに仮想サーバが配置されていない場合には(ステップS203→No)、ステップS209へ進む。一方、仮想サーバが配置されている場合には(ステップS203→Yes)、次のステップS204へ進む。
In step S203, the virtual server
続いて、仮想サーバ再配置計算部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
次に、仮想サーバ再配置計算部115は、負荷がサーバ閾値以下のサーバS− kjの担当領域に、まだ未処理の仮想サーバが配置されているか否かを判定する(l<ykj+1)(ステップS205)。つまり、取り除くことができる可能性のある仮想サーバが残っているか否かを判定する。ここで、未処理の仮想サーバがハッシュ空間上に配置されていない場合には(ステップS205→No)、ステップS209へ進む。一方、未処理の仮想サーバがそのサーバのハッシュ空間上の担当領域に残っている場合には(ステップS205→Yes)、次のステップS206へ進む。
Next, the virtual server
ステップ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
ステップS207において、仮想サーバ再配置計算部115は、仮想サーバをハッシュ空間上から取り除く。そして、仮想サーバ再配置計算部115は、その領域を担当する元のサーバに負荷を戻す処理を行う。具体的には、仮想サーバ(vk(l))を取り除いた場合の負荷を以下の式により計算する。
In step S207, the virtual server
ここで、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
一方、ステップ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
そして、仮想サーバ再配置計算部115は、ステップS202において、負荷がサーバ閾値以下のサーバS− kjすべての処理を終えている場合には(ステップS202→No)、ステップS207において再計算された各サーバの負荷Wmに基づき、負荷がサーバ閾値以下のサーバS−と、負荷がサーバ閾値を超えるサーバS+とについて、負荷Wmとサーバ閾値αmとの差の絶対値が大きい順に整列する(ステップS210)。そして、その情報を、配置処理部113に渡す。配置処理部113では、図9および図10で示した仮想サーバ配置処理を実行する。
Then, in step S202, the virtual server
このようにすることで、本実施形態に係るデータ負荷分散配置システム1およびデータ負荷分散配置方法による仮想サーバの再配置によれば、所定間隔ごとの担当データ数の増減や各データへの実アクセス数に応じた、各DBサーバ20の負荷を計算する。そして、負荷がサーバ閾値以下のサーバS−に含まれることになったDBサーバ20のハッシュ空間上での担当領域に、仮想サーバが配置されている場合に、その仮想サーバの担当領域を、元のDBサーバの担当領域に戻すことができる。そして、負荷Wmとサーバ閾値αmとの差の絶対値を計算し直すことにより、負荷がサーバ閾値以下のサーバS−の集合と、負荷がサーバ閾値を超えるサーバS+の集合とを生成して、再度、ハッシュ空間上での仮想サーバの配置を計算する。これにより、各DBサーバ20の負荷を均一化させるとともに、ハッシュ空間上に配置する仮想サーバの数を減らすことができる。
In this way, according to the virtual server rearrangement by the data load distribution and
なお、本実施形態において仮想サーバ配置装置10は、コンシステントハッシュ法の領域分割方式として、時計回り方式を用いて、ハッシュ空間上に仮想サーバを配置するものとして説明した。しかし、本発明はこれに限定されず、反時計回り方式や、各データがリング上で最も隣接するサーバにデータを格納する最近値方式等を用いることもできる。
In the present embodiment, the virtual
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
Claims (4)
前記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サーバそれぞれの前記負荷を計算することにより、前記サーバ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サーバは、
(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サーバそれぞれの前記負荷を計算することにより、前記サーバ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.
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)
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)
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 |
-
2011
- 2011-05-10 JP JP2011105225A patent/JP5540269B2/en not_active Expired - Fee Related
Patent Citations (2)
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)
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 |