JP5997668B2 - Data division controller - Google Patents

Data division controller Download PDF

Info

Publication number
JP5997668B2
JP5997668B2 JP2013170135A JP2013170135A JP5997668B2 JP 5997668 B2 JP5997668 B2 JP 5997668B2 JP 2013170135 A JP2013170135 A JP 2013170135A JP 2013170135 A JP2013170135 A JP 2013170135A JP 5997668 B2 JP5997668 B2 JP 5997668B2
Authority
JP
Japan
Prior art keywords
data
time
processing
control device
division
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.)
Expired - Fee Related
Application number
JP2013170135A
Other languages
Japanese (ja)
Other versions
JP2015041116A (en
Inventor
近藤 悟
悟 近藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2013170135A priority Critical patent/JP5997668B2/en
Publication of JP2015041116A publication Critical patent/JP2015041116A/en
Application granted granted Critical
Publication of JP5997668B2 publication Critical patent/JP5997668B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、分散データベースにデータを分割または統合して格納する技術に関する。   The present invention relates to a technique for storing data in a distributed database by dividing or integrating the data.

ネットワーク上に分散して配置される複数のサーバを論理的に連結させて、あたかも1台のサーバのように見せる技術を用いたクラスタシステムが知られている。このクラスタシステムは、データに関しては分散データベースとして各サーバにデータを分割して配置させ、スケーラビリティを向上させることができる。   2. Description of the Related Art A cluster system using a technique in which a plurality of servers distributed on a network are logically connected to make it appear as if it is a single server is known. In this cluster system, data can be divided and arranged on each server as a distributed database, and scalability can be improved.

例えば、1つの非常に大きなデータをそのまま1台のサーバに格納する場合、当該サーバのメモリを圧迫してしまう状態が発生する。これを回避するため、非特許文献1に記載の分散データベースBigTableが基盤とする分散ファイルシステムのGFS(Global File System)においては、1つの大きなデータを、適当な固定サイズのChunkに分割し、複数のサーバに格納する方法が採られている。この方法では、固定サイズのChunkが分散して各サーバに格納されるため、1台当りのサーバのメモリへの圧迫の度合いは小さくなる。   For example, when one very large piece of data is stored as it is in one server, a state in which the memory of the server is compressed occurs. In order to avoid this, in the GFS (Global File System) of the distributed file system based on the distributed database BigTable described in Non-Patent Document 1, one large data is divided into Chunks of appropriate fixed sizes, The method of storing in the server is adopted. In this method, since fixed-size chunks are distributed and stored in each server, the degree of pressure on the memory of each server is reduced.

F Chang, et al.,“Bigtable: a distributed storage system for structured data”,OSDI ‘06 Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation - Volume 7F Chang, et al., “Bigtable: a distributed storage system for structured data”, OSDI '06 Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation-Volume 7

基本的に、分散データベースに格納されているデータに対するデータ処理は、分散ロック等によってロック処理が行われた後に実行されることで、トランザクション性を維持している。したがって、分割されたデータ全体に係わる更新等の処理を実行する場合、当該データ全体は、分散ロック等によってロックされることになる。   Basically, data processing for data stored in the distributed database is executed after lock processing is performed by distributed lock or the like, thereby maintaining transactionality. Therefore, when processing such as updating related to the entire divided data is executed, the entire data is locked by a distributed lock or the like.

非特許文献1に記載の固定サイズのChunkを用いる方法では、そのサイズを小さくし過ぎると、非常に多くのサーバに分散してデータが配置されることになる。データが非常に多くのサーバに分散配置された場合、分散ロックに掛かる時間が肥大化し、分割数が少ない場合よりも、かえってトランザクション処理に掛かる時間が大きくなるという虞がある。なお、トランザクション処理に掛かる時間とは、分散ロックに掛かる時間とデータ処理に係る時間との合計である。   In the method using a fixed-size Chunk described in Non-Patent Document 1, if the size is too small, data is distributed and distributed to a large number of servers. When data is distributed and arranged in a very large number of servers, the time required for the distributed lock increases, and there is a possibility that the time required for transaction processing becomes longer than when the number of divisions is small. The time required for transaction processing is the sum of the time required for distributed locking and the time required for data processing.

そこで、本発明は、トランザクション処理に掛かる時間を低減するように、データの分割の仕方を自動的に決める技術を提供することを課題とする。   Therefore, an object of the present invention is to provide a technique for automatically determining how to divide data so as to reduce the time required for transaction processing.

本発明のデータ分割制御装置は、データベースに分割または統合して格納されるデータに対してデータ処理する複数のデータ分割制御装置を含むデータ分割制御システムにおけるデータ分割制御装置であって、前記データベースが記憶される記憶部と、前記データ処理の要求を、端末または他のデータ分割制御装置から受信した場合、前記データ分割制御システム内に分散して格納されたデータのロックに掛かる時間を示すロック時間と、前記データ処理に掛かる時間を示すデータ処理時間とを計測し、所定期間内の計測値を集計する処理時間計測部と、前記集計したロック時間およびデータ処理時間に基づいて、当該データ処理の対象となったデータに対して分割するか否かまたは統合するか否かを判定する分割統合処理部とを備え、前記分割統合処理部は、前記集計したロック時間と前記集計したデータ処理時間との合計値および前記集計したロック時間を前記合計値で除算した比に基づいて、前記データ処理の対象となったデータに対して分割するか否かまたは統合するか否かを判定し、今回の所定期間内の前記合計値が前回の所定期間内の前記合計値より小さく、かつ前記比が第1の閾値より小さい場合、前記データを分割すると判定することを特徴とする。 A data division control device according to the present invention is a data division control device in a data division control system including a plurality of data division control devices that process data for data stored by being divided or integrated into a database , wherein the database a storage unit stored, a request for pre Kide over data processing, when receiving from a terminal or other data division control device, the time required for locking of the data stored across a said data division control system A lock time and a data processing time indicating the time required for the data processing, and a processing time measuring unit that counts measurement values within a predetermined period, and based on the calculated lock time and data processing time, and a determining segmentation-concatenation processor unit whether to whether or integrated split for the data as the object of data processing, the The split integration processing unit adds the data to the data processing target based on a total value of the totaled lock time and the totaled data processing time and a ratio obtained by dividing the totaled lock time by the total value. Whether to divide or integrate, the total value in the current predetermined period is smaller than the total value in the previous predetermined period, and the ratio is smaller than the first threshold The data is determined to be divided .

このような構成によれば、データ分割制御装置は、所定期間内で集計したロック時間およびデータ処理時間に基づいて、データ処理の対象となったデータに対して分割するか否かまたは統合するか否かを判定することができる。なお、データの分割数が増加するに従って、ロック時間は増加し、データ処理時間は減少する。つまり、データの分割数に対して、ロック時間とデータ処理時間とはトレードオフの関係にある。したがって、データ分割制御装置は、所定期間内で集計したロック時間およびデータ処理時間に基づいて、トランザクション処理に掛かる時間を低減するように、データの分割の仕方を自動的に決めることができる。   According to such a configuration, the data division control device determines whether or not to divide or integrate the data subjected to data processing based on the lock time and data processing time counted within a predetermined period. It can be determined whether or not. As the number of data divisions increases, the lock time increases and the data processing time decreases. That is, the lock time and the data processing time are in a trade-off relationship with respect to the number of data divisions. Therefore, the data division control device can automatically determine how to divide data so as to reduce the time required for transaction processing based on the lock time and data processing time accumulated within a predetermined period.

また、前記分割統合処理部は、分割されているデータの双方が、今回の所定期間内の前記合計値が前回の所定期間内の前記合計値より大きく、かつ前記比が前記第1の閾値よりも大きな第2の閾値より大きい場合、当該分割されているデータ同士を統合すると判定することを特徴とする。   Further, the division integration processing unit is configured so that both of the divided data are such that the total value in the current predetermined period is greater than the total value in the previous predetermined period, and the ratio is greater than the first threshold value. Is larger than the second threshold value, it is determined that the divided data are integrated.

このような構成によれば、データ分割制御装置の分割統合処理部は、今回の所定期間内の合計値と前回の所定期間内の合計値との大小関係、および集計したロック時間を前記合計値で除算した比と所定の閾値との大小関係を比較することによって、データの分割または統合を判定する。したがって、データ分割制御装置は、トランザクション処理に掛かる時間を低減するように、データの分割の仕方を自動的に決めることができる。   According to such a configuration, the division integration processing unit of the data division control device calculates the magnitude relationship between the total value in the current predetermined period and the total value in the previous predetermined period, and the total lock time as the total value. The division or integration of data is determined by comparing the magnitude relationship between the ratio obtained by dividing by a predetermined threshold value. Therefore, the data division control device can automatically determine how to divide the data so as to reduce the time required for transaction processing.

また、前記集計したロック時間および前記集計したデータ処理時間それぞれは、前記所定期間内の計測値の平均値であることを特徴とする。   Each of the totaled lock time and the totalized data processing time is an average value of measured values within the predetermined period.

このような構成によれば、データ分割制御装置は、計測値の平均値を用いて、手動でなく、データの分割の仕方を自動的に決めることができる。   According to such a configuration, the data division control device can automatically determine how to divide data instead of manually using the average value of the measurement values.

本発明によれば、トランザクション処理に掛かる時間を低減するように、データの分割の仕方を自動的に決めることができる。   According to the present invention, it is possible to automatically determine how to divide data so as to reduce the time required for transaction processing.

データ分割制御装置を含むデータ分割制御システムの構成例を示す図である。It is a figure which shows the structural example of the data division control system containing a data division control apparatus. 記憶部に記憶される情報の一例を示す図であり、(a)は分割情報の一例を表し、(b)は処理時間情報を表す。It is a figure which shows an example of the information memorize | stored in a memory | storage part, (a) represents an example of division | segmentation information, (b) represents process time information. データ分割制御システムの処理フロー例を示す図である。It is a figure which shows the example of a processing flow of a data division | segmentation control system. 分割したデータをさらに分割する場合の処理フロー例を示す図である。It is a figure which shows the example of a processing flow in the case of further dividing the divided | segmented data. 分割したデータを統合する場合の処理フロー例を示す図である。It is a figure which shows the example of a processing flow in the case of integrating | segmenting the divided data. ロック時間およびデータ処理時間とデータの分割数との関係を示す図である。It is a figure which shows the relationship between lock time and data processing time, and the division | segmentation number of data.

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

(データ分割制御装置)
はじめに、データ分割制御装置1を含むデータ分割制御システム100の構成例について、図1を用いて説明する。
データ分割制御システム100は、図1に示すように、データ分割制御装置1,1a,1b,1cをクラスタ構成として備えている。なお、図1中に示すデータ分割制御装置1a,1b,1cの機能は、データ分割制御装置1の機能と同様である。また、図1では、データ分割制御装置1,1a,1b,1cを4台記載しているが、4台に限られることはない。データ分割制御装置1,1a,1b,1cは、ネットワーク2aを介して通信可能に接続されている。また、ユーザの操作する端末3は、ネットワーク2bを介して、データ分割制御システム100にデータ処理(例えば、格納、参照、更新)等の要求を送信し、データ分割制御システム100から要求に対応する応答情報(例えば、データ処理結果)を受信する。
(Data division controller)
First, a configuration example of a data division control system 100 including the data division control device 1 will be described with reference to FIG.
As shown in FIG. 1, the data division control system 100 includes data division control devices 1, 1a, 1b, and 1c as a cluster configuration. The functions of the data division control devices 1a, 1b, and 1c shown in FIG. 1 are the same as the functions of the data division control device 1. In FIG. 1, four data division control devices 1, 1a, 1b, and 1c are shown, but the number is not limited to four. The data division control devices 1, 1a, 1b, and 1c are communicably connected via the network 2a. Further, the terminal 3 operated by the user transmits a request for data processing (for example, storage, reference, and update) to the data division control system 100 via the network 2b, and responds to the request from the data division control system 100. Response information (for example, data processing result) is received.

(データ分割制御装置)
次に、データ分割制御装置1の機能例について、図1を用いて説明する。
データ分割制御装置1は、処理部11、記憶部12および通信部13を備える。処理部11は、図示しないCPU(Central Processing Unit)およびメインメモリによって構成され、記憶部12に記憶されているアプリケーションプログラムをメインメモリに展開して、リクエスト処理部111、処理時間計測部112、分割統合処理部113およびデータ管理部114を具現化している。
(Data division controller)
Next, an example of functions of the data division control device 1 will be described with reference to FIG.
The data division control device 1 includes a processing unit 11, a storage unit 12, and a communication unit 13. The processing unit 11 is configured by a CPU (Central Processing Unit) and a main memory (not shown). The application program stored in the storage unit 12 is expanded in the main memory, and a request processing unit 111, a processing time measuring unit 112, and a division An integrated processing unit 113 and a data management unit 114 are embodied.

リクエスト処理部111は、端末3からデータ処理等の要求を受信し、記憶部12に格納されているデータベースのデータを処理し、その要求に対応する応答情報を、端末3に送信する機能を有する。また、リクエスト処理部111は、受信した要求の対象となるデータを格納しているいずれかのデータ分割制御装置1a,1b,1cに、その要求を転送する機能を有する。なお、受信した要求の対象となるデータを格納するデータ分割制御装置1,1a,1b,1cは、例えば、Consistent Hashing等の分散アルゴリズムを用いて決めることができる。また、リクエスト処理部111は、データ分割制御システム100内に分散して格納されたデータの可用性とシステムとしての一貫性を保つための分散ロックを実行する機能を有する。   The request processing unit 111 has a function of receiving a request for data processing or the like from the terminal 3, processing data in the database stored in the storage unit 12, and transmitting response information corresponding to the request to the terminal 3. . In addition, the request processing unit 111 has a function of transferring the request to any of the data division control devices 1a, 1b, and 1c that stores the data that is the target of the received request. Note that the data division control devices 1, 1a, 1b, and 1c that store the data that is the target of the received request can be determined using a distributed algorithm such as consistent hashing, for example. Further, the request processing unit 111 has a function of executing a distributed lock for maintaining the availability of data distributed and stored in the data division control system 100 and the consistency of the system.

処理時間計測部112は、データ処理時に、分散ロックに掛かる時間(以降、ロック時間と称す。)と、データ処理に掛かる時間(以降、データ処理時間と称す。)とを計測して記録し、所定の周期(一定周期の場合を含む)で統計的に集計して、集計したロック時間およびデータ処理時間を算出する機能を有する。このとき、所定の周期内で集計された回数Nも算出される。なお、集計したロック時間およびデータ処理時間それぞれは、一例として、所定の周期(所定期間)内の計測値の平均値である。   The processing time measuring unit 112 measures and records the time required for distributed locking (hereinafter referred to as lock time) and the time required for data processing (hereinafter referred to as data processing time) during data processing, It has a function of statistically totaling in a predetermined cycle (including the case of a fixed cycle) and calculating the totaled lock time and data processing time. At this time, the number N of times counted within a predetermined period is also calculated. Each of the totaled lock time and data processing time is, for example, an average value of measured values within a predetermined period (predetermined period).

分割統合処理部113は、処理時間計測部112によって集計されたロック時間およびデータ処理時間に基づいて、データに対して分割するか否かまたは統合するか否かを判定し、分割または統合の処理を実行する機能を有する。なお、分割統合処理部113の処理の詳細については後記する。   The division integration processing unit 113 determines whether to divide or integrate the data based on the lock time and the data processing time counted by the processing time measurement unit 112, and performs division or integration processing. It has a function to execute. Details of the processing of the division integration processing unit 113 will be described later.

データ管理部114は、分割統合処理部113の分割または統合の処理に応じて、記憶部12に記憶されている不図示のデータベースのデータの管理(登録、読み出し、更新、削除等)を実行する機能を有する。データ管理部114は、不図示のデータベースのデータを、キーと、それに紐付く先頭アドレス、カラム、タグ等の情報によって管理する。   The data management unit 114 manages (registers, reads, updates, deletes, etc.) data in a database (not shown) stored in the storage unit 12 in accordance with the division or integration process of the division integration processing unit 113. It has a function. The data management unit 114 manages data in a database (not shown) using information such as a key and a head address, a column, and a tag associated with the key.

記憶部12は、ハードディスク等の記憶装置であり、分割情報121、処理時間情報122および不図示のデータベースのデータが記憶される。
分割情報121には、キー(データの識別情報)と、当該データが分割後の情報である場合には、分割後のデータの格納場所と、分割後のデータの先頭が元データの何(Byte)目に位置しているかに関する先頭アドレス(先頭情報)と、が記憶される。分割情報121の詳細については後記する。
処理時間情報122には、処理時間計測部112によって計測されたロック時間およびデータ処理時間が記録(記憶)される。
The storage unit 12 is a storage device such as a hard disk, and stores division information 121, processing time information 122, and data of a database (not shown).
The division information 121 includes a key (data identification information) and, if the data is information after division, the storage location of the data after division, and the beginning of the data after division is what the original data is (Bytes). ) A head address (head information) regarding whether the eye is located is stored. Details of the division information 121 will be described later.
The processing time information 122 records (stores) the lock time and the data processing time measured by the processing time measuring unit 112.

ここで、分割情報121の一例を図2(a)に示す。
図2(a)では、キーaが付されたデータの分割状態を木構造で表している。キーaを根ノードとして、キーa0,a1は兄弟ノードである。また、キーa10,a11は、キーa1を親ノードとする兄弟ノードである。
Here, an example of the division information 121 is shown in FIG.
In FIG. 2A, the division state of the data to which the key a is attached is represented by a tree structure. Key a is a root node, and keys a0 and a1 are sibling nodes. Keys a10 and a11 are sibling nodes having key a1 as a parent node.

キーa0は、キーaと同じデータ分割制御装置1の記憶部12に記憶される。また、キーa1は、格納場所がデータ分割制御装置1bであり、先頭アドレスがキーaのデータのs(Byte)目からの情報であることが付されている。キーa10は、キーa1と同じデータ分割制御装置1bの記憶部12に記憶される。そして、キーa11は、格納場所がデータ分割制御装置1cであり、先頭アドレスがキーaのt(Byte)目からの情報であることが付されている。したがって、データ分割制御装置1は、分割情報121を参照して、キーに基づいて、分割されたデータに係る情報を取得することができる。   The key a0 is stored in the storage unit 12 of the same data division control device 1 as the key a. In addition, the key a1 has a storage location of the data division control device 1b, and a head address is information from the s (byte) th of the data of the key a. The key a10 is stored in the storage unit 12 of the same data division control device 1b as the key a1. The key a11 has a storage location of the data division control device 1c and a head address of information from the t (byte) th of the key a. Therefore, the data division control device 1 can acquire information related to the divided data based on the key with reference to the division information 121.

次に、処理時間情報122の一例を、図2(b)に示す。
図2(b)に示すように、処理時間情報122は、キーごとに、No.、計測されたロック時間およびデータ処理時間の記録を記憶している。ここで、No.は、処理時間計測部112によって付される管理番号を表す。処理時間計測部112は、所定の周期で処理時間情報122を参照して、記録されたロック時間およびデータ処理時間を取得して、統計的な算出処理を実行し、その算出処理の実行後には、算出処理に用いた記録を削除する。
Next, an example of the processing time information 122 is shown in FIG.
As shown in FIG. 2B, the processing time information 122 includes No. A record of the measured lock time and data processing time is stored. Here, no. Represents a management number assigned by the processing time measuring unit 112. The processing time measuring unit 112 refers to the processing time information 122 at a predetermined cycle, acquires the recorded lock time and data processing time, executes a statistical calculation process, and after executing the calculation process, The record used for the calculation process is deleted.

(データ分割制御システムの処理フロー)
次に、データ分割制御システム100の処理フロー例について、図3を用いて説明する(適宜、図1、図2(a)(b)参照)。
図3は、データ分割制御装置1が、データ分割制御装置1aを介してデータ処理の要求を受信したり、端末3からデータ処理の要求を受信したりして、ロック時間およびデータ処理時間を計測し、計測したロック時間およびデータ処理時間に対して統計的な算出処理を実行し、データの分割判定を行って、分割処理を実行するまでの処理フロー例を表している。なお、データ分割制御装置1がキーaのデータを格納しているものとする。
(Processing flow of the data division control system)
Next, an example of the processing flow of the data division control system 100 will be described with reference to FIG. 3 (see FIGS. 1 and 2A and 2B as appropriate).
In FIG. 3, the data division control device 1 receives the data processing request via the data division control device 1a or receives the data processing request from the terminal 3, and measures the lock time and the data processing time. In this example, a statistical calculation process is executed for the measured lock time and data processing time, a data division determination is performed, and a division process is executed. It is assumed that the data division control device 1 stores the data of the key a.

ステップS301では、データ分割制御装置1aのリクエスト処理部111は、端末3等からキーaのデータに対するデータ処理の要求を受信する。
ステップS302では、データ分割制御装置1aのリクエスト処理部111は、クラスタ構成機能によってキーaに対する要求を解析し、当該要求の対象となるキーaのデータを格納しているデータ分割制御装置1に当該要求を転送する。
In step S301, the request processing unit 111 of the data division control device 1a receives a data processing request for the data of the key a from the terminal 3 or the like.
In step S302, the request processing unit 111 of the data division control device 1a analyzes the request for the key a by the cluster configuration function, and sends the data division control device 1 storing the data of the key a that is the target of the request to the data division control device 1a. Forward the request.

ステップS303では、データ分割制御装置1のリクエスト処理部111は、要求を受信し、分散ロックの処理および受信した要求に対応するデータ処理を実行する。
ステップS304では、データ分割制御装置1の処理時間計測部112は、ロック時間とデータ処理時間とを計測し、計測したロック時間およびデータ処理時間をデータ分割制御装置1の記憶部12の処理時間情報122に記録(記憶)する。
In step S303, the request processing unit 111 of the data division control device 1 receives the request, and executes distributed lock processing and data processing corresponding to the received request.
In step S304, the processing time measuring unit 112 of the data division control device 1 measures the lock time and the data processing time, and the measured lock time and data processing time are processed time information in the storage unit 12 of the data division control device 1. Record (store) in 122.

ステップS305では、データ分割制御装置1のリクエスト処理部111は、データ処理結果を示す応答情報を、要求を送信してきた端末3に送信する(図3では「端末へ応答送信」と記載)。
ステップS305とステップS307との間の二重波線は、時間経過の省略を表している。
In step S305, the request processing unit 111 of the data division control device 1 transmits response information indicating the data processing result to the terminal 3 that has transmitted the request (described as “response transmission to terminal” in FIG. 3).
A double wavy line between step S305 and step S307 represents omission of time.

ステップS307では、データ分割制御装置1のリクエスト処理部111は、端末3からキーaのデータに対するデータ処理の要求を受信する。
ステップS308では、データ分割制御装置1のリクエスト処理部111は、要求を受信し、分散ロックの処理および受信した要求に対応するデータ処理を実行する。
In step S307, the request processing unit 111 of the data division control device 1 receives a data processing request for the data of the key a from the terminal 3.
In step S308, the request processing unit 111 of the data division control device 1 receives the request, and executes distributed lock processing and data processing corresponding to the received request.

ステップS309では、データ分割制御装置1の処理時間計測部112は、ロック時間とデータ処理時間とを計測し、計測したロック時間およびデータ処理時間をデータ分割制御装置1の記憶部12の処理時間情報122に記録(記憶)する。
ステップS310では、データ分割制御装置1のリクエスト処理部111は、データ処理結果を示す応答情報を、要求を送信してきた端末3に送信する。
In step S309, the processing time measurement unit 112 of the data division control device 1 measures the lock time and the data processing time, and the measured lock time and data processing time are processed time information in the storage unit 12 of the data division control device 1. Record (store) in 122.
In step S310, the request processing unit 111 of the data division control device 1 transmits response information indicating the data processing result to the terminal 3 that has transmitted the request.

ステップS311では、データ分割制御装置1の処理時間計測部112は、処理時間情報122を参照して、記録されたロック時間およびデータ処理時間を取得し、ロック時間およびデータ処理時間を集計する。具体的には、データ分割制御装置1の処理時間計測部112は、統計的な算出処理により、キーaのデータに係るロック時間およびデータ処理時間それぞれの平均時間を算出する。   In step S311, the processing time measuring unit 112 of the data division control device 1 refers to the processing time information 122, acquires the recorded lock time and data processing time, and totals the lock time and data processing time. Specifically, the processing time measuring unit 112 of the data division control device 1 calculates the average time of the lock time and the data processing time related to the data of the key a by statistical calculation processing.

ステップS312では、データ分割制御装置1の分割統合処理部113は、処理時間計測部112によって統計的に算出されたロック時間およびデータ処理時間(集計されたロック時間および集計されたデータ処理時間)に基づいて、分割判定を実行する。分割判定とは、分割するか否かの判定を行うことである。
具体的には、ロック時間の平均時間をTL、データ処理時間の平均時間をTDとすると、分割統合処理部113は、まず、トランザクション処理の平均総処理時間(合計値)T=TL+TDを演算し、その演算値をキーaに紐付けて記憶する。次に、分割統合処理部113は、今回の所定期間の平均総処理時間Tが前回の所定期間の平均総処理時間Tpより小さく、かつTLを(TL+TD)で除算した比TL/(TL+TD)が予め設定された分割閾値(第1の閾値)Kよりも小さい場合、キーaのデータを分割すると判定する。
In step S312, the division integration processing unit 113 of the data division control device 1 sets the lock time and the data processing time statistically calculated by the processing time measurement unit 112 (the total lock time and the total data processing time). Based on this, division determination is executed. The division determination is to determine whether to divide.
Specifically, assuming that the average time of the lock time is TL and the average time of the data processing time is TD, the division integration processing unit 113 first calculates the average total processing time (total value) T = TL + TD of the transaction processing. The calculated value is stored in association with the key a. Next, the division integration processing unit 113 has a ratio TL / (TL + TD) obtained by dividing the TL by (TL + TD) and the average total processing time T of the current predetermined period is smaller than the average total processing time Tp of the previous predetermined period. If it is smaller than the preset division threshold (first threshold) K, it is determined that the data of the key a is to be divided.

ここで、集計されたロック時間と集計されたデータ処理時間とを用いて、分割判定を行う理由について、図6を用いて説明する。
図6に示すように、一般的に、ロック時間は、データの分割数が増加するに従って大きくなる。また、データ処理時間は、データの分割数が増加するに従って並列処理の割合が増加するので減少し、分割数が大きくなり過ぎると、データサイズがデータ処理単位より小さくなるため減少しなくなる。そこで、データの分割数に対して、データ処理時間とロック時間とがトレードオフの関係にあるので、平均総処理時間Tの変化およびTL/(TL+TD)の変化をデータの分割および統合の判定に用いることにする。
Here, the reason why the division determination is performed using the totaled lock time and the total data processing time will be described with reference to FIG.
As shown in FIG. 6, the lock time generally increases as the number of data divisions increases. Further, the data processing time decreases as the number of data divisions increases as the ratio of parallel processing increases, and if the number of divisions increases too much, the data size does not decrease because the data size becomes smaller than the data processing unit. Therefore, since the data processing time and the lock time are in a trade-off relationship with respect to the number of data divisions, the change in the average total processing time T and the change in TL / (TL + TD) are used to determine the data division and integration. I will use it.

図3に戻って、ステップS313では、データ分割制御装置1の分割統合処理部113は、キーaのデータを分割すると判定した場合、キーaのデータをキーa0のデータおよびキーa1のデータに分割する分割処理を実行する。
ステップS314では、データ分割制御装置1の分割統合処理部113は、ステップS313において分割したキーa1のデータを、クラスタ構成のデータ分割制御装置1bに送信する。なお、キーa0のデータは、そのままデータ分割制御装置1に格納される。
Returning to FIG. 3, in step S313, when the division integration processing unit 113 of the data division control device 1 determines to divide the data of the key a, the data of the key a is divided into the data of the key a0 and the data of the key a1. Execute the division process.
In step S314, the division integration processing unit 113 of the data division control device 1 transmits the data of the key a1 divided in step S313 to the data division control device 1b having the cluster configuration. The data of the key a0 is stored in the data division control device 1 as it is.

ステップS315では、データ分割制御装置1の分割統合処理部113は、キーa0について分割情報121を更新する。また、データ分割制御装置1の分割統合処理部113は、キーa1に対して、格納場所および先頭アドレスを付与して、分割情報121を更新する。   In step S315, the division integration processing unit 113 of the data division control device 1 updates the division information 121 for the key a0. Further, the division integration processing unit 113 of the data division control device 1 updates the division information 121 by assigning a storage location and a head address to the key a1.

(データをさらに分割する場合の処理フロー)
次に、本実施形態のデータ分割制御システム100において、分割したキーa1のデータをさらに分割する場合の処理フロー例について、図4を用いて説明する(適宜、図1、図2(a)(b)参照)。
まず、図4に示すデータ分割制御システム100におけるデータの所在状況について説明する。図2(a)の分割情報121に示されているように、データ分割制御装置1にはキーa0のデータが格納され、データ分割制御装置1bには、キーa1のデータが格納されているものとする。
(Processing flow when further dividing data)
Next, in the data division control system 100 of this embodiment, an example of a processing flow when the data of the divided key a1 is further divided will be described with reference to FIG. 4 (FIGS. 1 and 2 (a) (appropriately). b)).
First, the location of data in the data division control system 100 shown in FIG. 4 will be described. As shown in the division information 121 in FIG. 2A, the data division control device 1 stores the data of the key a0, and the data division control device 1b stores the data of the key a1. And

ステップS401では、データ分割制御装置1のリクエスト処理部111は、キーaのデータに対するデータ処理の要求を受信したとき、データ分割制御装置1の分割情報121を参照して、キーa1のデータの格納場所を取得し、キーa1のデータを格納しているデータ分割制御装置1bに、キーa1のデータに対するデータ処理の要求を送信する。そして、データ分割制御装置1bのリクエスト処理部111は、キーa1のデータに対するデータ処理の要求を受信する。   In step S401, when the request processing unit 111 of the data division control device 1 receives a data processing request for the data of the key a, the request processing unit 111 refers to the division information 121 of the data division control device 1 and stores the data of the key a1. The location is acquired, and a data processing request for the data of the key a1 is transmitted to the data division control device 1b storing the data of the key a1. Then, the request processing unit 111 of the data division control device 1b receives a data processing request for the data of the key a1.

ステップS402では、データ分割制御装置1のリクエスト処理部111は、キーa0のデータに対する分散ロックの処理およびデータ処理を実行する。
ステップS403では、データ分割制御装置1の処理時間計測部112は、キーa0のデータに係るロック時間とデータ処理時間とを計測し、計測したロック時間およびデータ処理時間をデータ分割制御装置1の記憶部12の処理時間情報122に記録(記憶)する。
In step S402, the request processing unit 111 of the data division control device 1 executes distributed lock processing and data processing for the data of the key a0.
In step S403, the processing time measuring unit 112 of the data division control device 1 measures the lock time and the data processing time related to the data of the key a0, and stores the measured lock time and data processing time in the data division control device 1. It is recorded (stored) in the processing time information 122 of the unit 12.

ステップS404では、データ分割制御装置1bのリクエスト処理部111は、キーa1のデータに対する分散ロックの処理およびデータ処理を実行する。
ステップS405では、データ分割制御装置1bの処理時間計測部112は、キーa1のデータに係るロック時間とデータ処理時間とを計測し、計測したロック時間およびデータ処理時間をデータ分割制御装置1bの記憶部12の処理時間情報122に記録(記憶)する。
In step S404, the request processing unit 111 of the data division control device 1b executes distributed lock processing and data processing for the data of the key a1.
In step S405, the processing time measuring unit 112 of the data division control device 1b measures the lock time and the data processing time related to the data of the key a1, and stores the measured lock time and data processing time in the data division control device 1b. It is recorded (stored) in the processing time information 122 of the unit 12.

ステップS406では、データ分割制御装置1bのリクエスト処理部111は、キーa1に対する処理データをデータ分割制御装置1に送信する。そして、データ分割制御装置1のリクエスト処理部111は、キーa1に対する処理データを受信する。
ステップS406とステップS407との期間には、ステップS401〜S406の処理が繰り返し実行されるものとする。
In step S406, the request processing unit 111 of the data division control device 1b transmits processing data for the key a1 to the data division control device 1. Then, the request processing unit 111 of the data division control device 1 receives the processing data for the key a1.
It is assumed that the processes of steps S401 to S406 are repeatedly executed during the period between step S406 and step S407.

ステップS407では、データ分割制御装置1の処理時間計測部112は、データ分割制御装置1の処理時間情報122を参照して、記録されたロック時間およびデータ処理時間を取得し、キーa0のデータに係るロック時間およびデータ処理時間を集計する。具体的には、データ分割制御装置1の処理時間計測部112は、統計的な算出処理により、キーa0のデータに係るロック時間およびデータ処理時間それぞれの平均時間を算出する。   In step S407, the processing time measuring unit 112 of the data division control device 1 refers to the processing time information 122 of the data division control device 1, acquires the recorded lock time and data processing time, and stores it in the data of the key a0. The lock time and data processing time are aggregated. Specifically, the processing time measuring unit 112 of the data division control device 1 calculates the average time of the lock time and the data processing time related to the data of the key a0 by statistical calculation processing.

ステップS408では、データ分割制御装置1の処理時間計測部112は、集計結果をデータ分割制御装置1の分割統合処理部113に送信する。集計結果とは、ステップS407において算出されたキーa0のデータに係るロック時間およびデータ処理時間それぞれの平均時間である。   In step S <b> 408, the processing time measuring unit 112 of the data division control device 1 transmits the aggregation result to the division integration processing unit 113 of the data division control device 1. The total result is an average time of the lock time and the data processing time related to the data of the key a0 calculated in step S407.

ステップS409では、データ分割制御装置1bの処理時間計測部112は、データ分割制御装置1bの処理時間情報122を参照して、記録されたロック時間およびデータ処理時間を取得し、キーa1のデータに係るロック時間およびデータ処理時間を集計する。具体的には、データ分割制御装置1bの処理時間計測部112は、統計的な算出処理により、キーa1のデータに係るロック時間およびデータ処理時間それぞれの平均時間を算出する。   In step S409, the processing time measuring unit 112 of the data division control device 1b refers to the processing time information 122 of the data division control device 1b, acquires the recorded lock time and data processing time, and stores the data in the key a1. The lock time and data processing time are aggregated. Specifically, the processing time measuring unit 112 of the data division control device 1b calculates the average time of the lock time and the data processing time related to the data of the key a1 by statistical calculation processing.

ステップS410では、データ分割制御装置1bの処理時間計測部112は、集計結果をデータ分割制御装置1の分割統合処理部113に送信する。集計結果とは、ステップS409において算出されたキーa1のデータに係るロック時間およびデータ処理時間それぞれの平均時間である。   In step S410, the processing time measuring unit 112 of the data division control device 1b transmits the aggregation result to the division integration processing unit 113 of the data division control device 1. The total result is an average time of the lock time and the data processing time related to the data of the key a1 calculated in step S409.

ステップS411では、データ分割制御装置1の分割統合処理部113は、受信したキーa1のデータに係るロック時間およびデータ処理時間に基づいて分割判定を実行する。
具体的には、キーa1のデータに係るロック時間の平均時間をTL(a1)とし、キーa1のデータに係るデータ処理時間の平均時間をTD(a1)とすると、データ分割制御装置1の分割統合処理部113は、まず、トランザクション処理の平均総処理時間(合計値)T(a1)=TL(a1)+TD(a1)を演算し、その演算値をキーa1に紐付けて記憶する。次に、分割統合処理部113は、今回の所定期間の平均総処理時間T(a1)が前回の所定期間の平均総処理時間Tp(a1)より小さく、かつTL(a1)を(TL(a1)+TD(a1))で除算した比TL(a1)/(TL(a1)+TD(a1))が予め設定された分割閾値(第1の閾値)Kよりも小さいか否かを判定する。そして、データ分割制御装置1の分割統合処理部113は、比TL(a1)/(TL(a1)+TD(a1))が分割閾値Kより小さい場合、キーa1のデータを分割すると判定する。ここで、分割閾値Kは、分割が進みすぎることを防止するために設定される値である。
分割すると判定する条件を下記に示す。
T(a1)<Tp(a1) かつTL(a1)/(TL(a1)+TD(a1))<K
In step S411, the division integration processing unit 113 of the data division control device 1 executes division determination based on the lock time and data processing time relating to the received data of the key a1.
Specifically, when the average time of the lock time related to the data of the key a1 is TL (a1) and the average time of the data processing time related to the data of the key a1 is TD (a1), the division of the data division control device 1 is performed. First, the integrated processing unit 113 calculates an average total processing time (total value) T (a1) = TL (a1) + TD (a1) of transaction processing, and stores the calculated value in association with the key a1. Next, the division integration processing unit 113 determines that the average total processing time T (a1) of the current predetermined period is smaller than the average total processing time Tp (a1) of the previous predetermined period, and sets TL (a1) to (TL (a1) ) + TD (a1)), it is determined whether or not the ratio TL (a1) / (TL (a1) + TD (a1)) is smaller than a preset division threshold (first threshold) K. When the ratio TL (a1) / (TL (a1) + TD (a1)) is smaller than the division threshold K, the division integration processing unit 113 of the data division control device 1 determines to divide the data of the key a1. Here, the division threshold K is a value set to prevent the division from proceeding too much.
The conditions for determining to be divided are shown below.
T (a1) <Tp (a1) and TL (a1) / (TL (a1) + TD (a1)) <K

ステップS412では、データ分割制御装置1の分割統合処理部113は、キーa1のデータを分割すると判定した場合、データ分割制御装置1bに対して、キーa1のデータの分割指示を示す分割指示情報を送信する。分割指示情報には、分割後のキーa11のデータの格納場所および先頭アドレスが含まれている。
ステップS413では、データ分割制御装置1の分割統合処理部113は、キーa11に対して、格納場所および先頭アドレスを付与して、データ分割制御装置1の記憶部12の分割情報121を更新する。
In step S412, when the division integration processing unit 113 of the data division control device 1 determines to divide the data of the key a1, the division instruction information indicating the division instruction of the data of the key a1 is sent to the data division control device 1b. Send. The division instruction information includes the data storage location and the start address of the key a11 after division.
In step S413, the division integration processing unit 113 of the data division control device 1 updates the division information 121 of the storage unit 12 of the data division control device 1 by assigning the storage location and the head address to the key a11.

ステップS414では、データ分割制御装置1bの分割統合処理部113は、受信した分割指示情報に基づいて、キーa1のデータをキーa10のデータおよびキーa11のデータに分割する分割処理を実行する。
ステップS415では、データ分割制御装置1bの分割統合処理部113は、分割したキーa11のデータを、クラスタ構成のデータ分割制御装置1cに送信する。なお、キーa10のデータは、そのままデータ分割制御装置1bに格納される。
In step S414, the division integration processing unit 113 of the data division control device 1b executes division processing for dividing the data of the key a1 into the data of the key a10 and the data of the key a11 based on the received division instruction information.
In step S415, the division integration processing unit 113 of the data division control device 1b transmits the data of the divided key a11 to the data division control device 1c having the cluster configuration. The data of the key a10 is stored as it is in the data division control device 1b.

(データを統合する場合の処理フロー)
次に、本実施形態のデータ分割制御システム100において、分割したデータを統合する場合の処理フロー例について、図5を用いて説明する(適宜、図1、図2(a)(b)参照)。
まず、図5に示すデータ分割制御システム100におけるデータの所在状況について説明する。図2(a)の分割情報121に示されるように、データ分割制御装置1にはキーa0のデータが格納され、データ分割制御装置1bにはキーa10のデータが格納され、データ分割制御装置1cにはキーa11のデータが格納されているものとする。そして、図5では、キーa10のデータとキーa11のデータとを統合する処理について説明する。
(Processing flow when integrating data)
Next, in the data division control system 100 of the present embodiment, an example of a processing flow in the case of integrating divided data will be described with reference to FIG. 5 (refer to FIGS. 1, 2A and 2B as appropriate). .
First, the data location status in the data division control system 100 shown in FIG. 5 will be described. As shown in the division information 121 in FIG. 2A, the data division control device 1 stores the data of the key a0, the data division control device 1b stores the data of the key a10, and the data division control device 1c. It is assumed that the data of the key a11 is stored in. FIG. 5 illustrates a process for integrating the data of the key a10 and the data of the key a11.

ステップS501では、データ分割制御装置1のリクエスト処理部111は、キーaのデータに対するデータ処理の要求を受信したとき、データ分割制御装置1の分割情報121を参照して、キーa10,a11のデータの格納場所を取得し、キーa10のデータを格納しているデータ分割制御装置1bにキーa10のデータに対するデータ処理の要求を送信し、キーa11のデータを格納しているデータ分割制御装置1cにキーa11のデータに対するデータ処理の要求を送信する。そして、データ分割制御装置1bのリクエスト処理部111は、キーa10のデータに対するデータ処理の要求を受信する。また、データ分割制御装置1cのリクエスト処理部111は、キーa11のデータに対するデータ処理の要求を受信する。
ステップS502では、データ分割制御装置1のリクエスト処理部111は、キーa0のデータに対する分散ロックの処理およびデータ処理を実行する。
In step S501, when the request processing unit 111 of the data division control device 1 receives a data processing request for the data of the key a, the request processing unit 111 refers to the division information 121 of the data division control device 1 and stores the data of the keys a10 and a11. Is obtained, a data processing request for the data of the key a10 is transmitted to the data division control device 1b storing the data of the key a10, and the data division control device 1c storing the data of the key a11 is transmitted. A data processing request for the data of the key a11 is transmitted. Then, the request processing unit 111 of the data division control device 1b receives a data processing request for the data of the key a10. The request processing unit 111 of the data division control device 1c receives a data processing request for the data of the key a11.
In step S502, the request processing unit 111 of the data division control device 1 executes distributed lock processing and data processing for the data of the key a0.

ステップS503では、データ分割制御装置1bのリクエスト処理部111は、キーa10のデータに対する分散ロックの処理およびデータ処理を実行する。
ステップS504では、データ分割制御装置1bの処理時間計測部112は、キーa10のデータに係るロック時間とデータ処理時間とを計測し、計測したロック時間およびデータ処理時間をデータ分割制御装置1bの記憶部12の処理時間情報122に記録(記憶)する。
In step S503, the request processing unit 111 of the data division control device 1b executes distributed lock processing and data processing for the data of the key a10.
In step S504, the processing time measuring unit 112 of the data division control device 1b measures the lock time and data processing time related to the data of the key a10, and stores the measured lock time and data processing time in the data division control device 1b. It is recorded (stored) in the processing time information 122 of the unit 12.

ステップS505では、データ分割制御装置1cのリクエスト処理部111は、キーa11のデータに対する分散ロックの処理およびデータ処理を実行する。
ステップS506では、データ分割制御装置1cの処理時間計測部112は、キーa11のデータに係るロック時間とデータ処理時間とを計測し、計測したロック時間およびデータ処理時間をデータ分割制御装置1cの記憶部12の処理時間情報122に記録(記憶)する。
In step S505, the request processing unit 111 of the data division control device 1c executes distributed lock processing and data processing for the data of the key a11.
In step S506, the processing time measuring unit 112 of the data division control device 1c measures the lock time and the data processing time related to the data of the key a11, and stores the measured lock time and data processing time in the data division control device 1c. It is recorded (stored) in the processing time information 122 of the unit 12.

ステップS507では、データ分割制御装置1bのリクエスト処理部111は、キーa10に対する処理データをデータ分割制御装置1に送信する。また、データ分割制御装置1cのリクエスト処理部111は、キーa11に対する処理データをデータ分割制御装置1に送信する。そして、データ分割制御装置1のリクエスト処理部111は、キーa10,a11に対する処理データを受信する。   In step S507, the request processing unit 111 of the data division control device 1b transmits the processing data for the key a10 to the data division control device 1. Further, the request processing unit 111 of the data division control device 1c transmits the processing data for the key a11 to the data division control device 1. Then, the request processing unit 111 of the data division control device 1 receives the processing data for the keys a10 and a11.

ステップS507とステップS508との期間には、ステップS501〜S507の処理が繰り返し実行されるものとする。
そして、ステップS508では、データ分割制御装置1bの処理時間計測部112は、データ分割制御装置1bの処理時間情報122を参照して、記録されたロック時間およびデータ処理時間を取得し、キーa10のデータに係るロック時間およびデータ処理時間を集計する。具体的には、データ分割制御装置1bの処理時間計測部112は、統計的な算出処理により、キーa10のデータに係るロック時間およびデータ処理時間それぞれの平均時間を算出する。
It is assumed that the processing of steps S501 to S507 is repeatedly executed during the period between step S507 and step S508.
In step S508, the processing time measuring unit 112 of the data division control device 1b refers to the processing time information 122 of the data division control device 1b, acquires the recorded lock time and data processing time, and stores the key a10. Data lock time and data processing time are aggregated. Specifically, the processing time measuring unit 112 of the data division control device 1b calculates the average time of the lock time and the data processing time related to the data of the key a10 by statistical calculation processing.

ステップS509では、データ分割制御装置1cの処理時間計測部112は、データ分割制御装置1cの処理時間情報122を参照して、記録されたロック時間およびデータ処理時間を読み出して、キーa11のデータに係るロック時間およびデータ処理時間を集計する。具体的には、データ分割制御装置1cの処理時間計測部112は、統計的な算出処理により、キーa11のデータに係るロック時間およびデータ処理時間それぞれの平均時間を算出する。   In step S509, the processing time measurement unit 112 of the data division control device 1c refers to the processing time information 122 of the data division control device 1c, reads the recorded lock time and data processing time, and stores the data in the key a11. The lock time and data processing time are aggregated. Specifically, the processing time measuring unit 112 of the data division control device 1c calculates the average time of the lock time and the data processing time related to the data of the key a11 by statistical calculation processing.

ステップS510では、データ分割制御装置1bおよびデータ分割制御装置1cの処理時間計測部112それぞれは、集計結果をデータ分割制御装置1に送信する。集計結果とは、ステップS508において算出したキーa10のデータに係るロック時間およびデータ処理時間それぞれの平均時間、および、ステップS509において算出したキーa10のデータに係るロック時間およびデータ処理時間それぞれの平均時間である。   In step S510, each of the processing time measuring units 112 of the data division control device 1b and the data division control device 1c transmits the aggregation result to the data division control device 1. The total results are the average time of the lock time and the data processing time related to the data of the key a10 calculated in step S508, and the average time of the lock time and the data processing time related to the data of the key a10 calculated in step S509. It is.

ステップS511では、データ分割制御装置1の分割統合処理部113は、受信したキーa10,a11のデータに係るロック時間およびデータ処理時間に基づいて統合判定を実行する。
具体的には、キーa10のデータに係るロック時間の平均時間をTL(a10)とし、キーa10のデータに係るデータ処理時間の平均時間をTD(a10)とすると、データ分割制御装置1の分割統合処理部113は、まず、トランザクション処理の平均総処理時間(合計値)T(a10)=TL(a10)+TD(a10)を演算し、その演算値をキーa10に紐付けて記憶する。次に、分割統合処理部113は、今回の所定期間の平均総処理時間T(a10)が前回の所定期間の平均総処理時間Tp(a10)より大きく、かつTL(a10)を(TL(a10)+TD(a10))で除算した比TL(a10)/(TL(a10)+TD(a10))が予め設定された統合閾値(第2の閾値)Cよりも大きいか否かを判定する。ここで、統合閾値Cは、統合が進みすぎることを防止するために設定される値である。また、キーa11のデータに係るロック時間の平均時間をTL(a11)とし、キーa11のデータに係るデータ処理時間の平均時間をTD(a11)とすると、データ分割制御装置1の分割統合処理部113は、まず、トランザクション処理の平均総処理時間(合計値)T(a11)=TL(a11)+TD(a11)を演算し、その演算値をキーa11に紐付けて記憶する。次に、分割統合処理部113は、今回の所定期間の平均総処理時間T(a11)が前回の所定期間の平均総処理時間Tp(a11)より大きく、かつTL(a11)を(TL(a11)+TD(a11))で除算した比TL(a11)/(TL(a11)+TD(a11))が予め設定された統合閾値(第2の閾値)Cよりも大きいか否かを判定する。そして、データ分割制御装置1の分割統合処理部113は、今回の所定期間の平均総処理時間T(a10)が前回の所定期間の平均総処理時間Tp(a10)より大きく、かつTL(a10)/(TL(a10)+TD(a10))が統合閾値Cより大きく、さらに、今回の所定期間の平均総処理時間T(a11)が前回の所定期間の平均総処理時間Tp(a11)より大きく、かつTL(a11)/(TL(a11)+TD(a11))が統合閾値Cより大きい場合、キーa10のデータにキーa11のデータを統合すると判定する。なお、図2(a)に示すように、キーa10とキーa11とは兄弟ノードとなる葉であるので統合すると判定される。しかし、一方のデータが葉ではなく、節である場合には、統合しないと判定される。このとき、統合後のキーa1の平均総処理時間T(a1)は、(T(a10)N(a10)+T(a11)N(a11))/(N(a10)+N(a11))を算出して求められ、その算出値がキーa1に紐付けて記憶される。
統合すると判定する条件を下記に示す。
T(a10)>Tp(a10) かつ
TL(a10)/(TL(a10)+TD(a10))>C かつ
T(a11)>Tp(a11) かつ
TL(a11)/(TL(a11)+TD(a11))>C
In step S511, the division integration processing unit 113 of the data division control device 1 executes integration determination based on the lock time and data processing time relating to the received data of the keys a10 and a11.
Specifically, when the average time of the lock time related to the data of the key a10 is TL (a10) and the average time of the data processing time related to the data of the key a10 is TD (a10), the division of the data division control device 1 is performed. First, the integrated processing unit 113 calculates an average total processing time (total value) T (a10) = TL (a10) + TD (a10) of transaction processing, and stores the calculated value in association with the key a10. Next, the division integration processing unit 113 determines that the average total processing time T (a10) of the current predetermined period is larger than the average total processing time Tp (a10) of the previous predetermined period and sets TL (a10) to (TL (a10 ) + TD (a10)), it is determined whether or not the ratio TL (a10) / (TL (a10) + TD (a10)) is larger than a preset integration threshold (second threshold) C. Here, the integration threshold C is a value set to prevent the integration from proceeding too much. Further, assuming that the average time of the lock time related to the data of the key a11 is TL (a11) and the average time of the data processing time related to the data of the key a11 is TD (a11), the division integration processing unit of the data division control device 1 First, 113 calculates an average total processing time (total value) T (a11) = TL (a11) + TD (a11) of transaction processing, and stores the calculated value in association with the key a11. Next, the division integration processing unit 113 determines that the average total processing time T (a11) of the current predetermined period is larger than the average total processing time Tp (a11) of the previous predetermined period and sets TL (a11) to (TL (a11) ) + TD (a11)), it is determined whether or not the ratio TL (a11) / (TL (a11) + TD (a11)) is larger than a preset integration threshold (second threshold) C. Then, the division integration processing unit 113 of the data division control device 1 determines that the average total processing time T (a10) of the current predetermined period is larger than the average total processing time Tp (a10) of the previous predetermined period and TL (a10). / (TL (a10) + TD (a10)) is greater than the integration threshold C, and the average total processing time T (a11) of the current predetermined period is greater than the average total processing time Tp (a11) of the previous predetermined period, If TL (a11) / (TL (a11) + TD (a11)) is larger than the integration threshold C, it is determined that the data of the key a11 is integrated with the data of the key a10. As shown in FIG. 2A, since the key a10 and the key a11 are leaves that are sibling nodes, it is determined to be integrated. However, if one of the data is not a leaf but a node, it is determined not to be integrated. At this time, the average total processing time T (a1) of the key a1 after integration is calculated as (T (a10) N (a10) + T (a11) N (a11)) / (N (a10) + N (a11)). The calculated value is stored in association with the key a1.
The conditions for determining integration are shown below.
T (a10)> Tp (a10) and TL (a10) / (TL (a10) + TD (a10))> C and T (a11)> Tp (a11) and TL (a11) / (TL (a11) + TD ( a11))> C

ステップS512では、データ分割制御装置1の分割統合処理部113は、キーa10のデータにキーa11のデータを統合すると判定した場合、データ分割制御装置1bおよびデータ分割制御装置1cに対して、キーa10のデータにキーa11のデータを統合する指示を示す統合指示情報を送信する。
ステップS513では、データ分割制御装置1の分割統合処理部113は、キーa10とキーa11とを統合したキーa1に対して、格納場所および先頭アドレスを付与して、データ分割制御装置1の記憶部12の分割情報121を更新する。
In step S512, when the division integration processing unit 113 of the data division control device 1 determines to integrate the data of the key a11 with the data of the key a10, the key a10 is transmitted to the data division control device 1b and the data division control device 1c. Integration instruction information indicating an instruction to integrate the data of the key a11 with the data of the key a11.
In step S513, the division integration processing unit 113 of the data division control device 1 assigns a storage location and a head address to the key a1 obtained by integrating the key a10 and the key a11, and stores the storage unit of the data division control device 1. The 12 pieces of division information 121 are updated.

ステップS514では、データ分割制御装置1bの分割統合処理部113は、受信した統合指示情報に基づいて、キーa10のデータにキーa11のデータを統合する統合処理を実行する。なお、図5には示していないが、データ分割制御装置1cの分割統合処理部113は、キーa11のデータを削除する。   In step S514, the division integration processing unit 113 of the data division control device 1b executes integration processing for integrating the data of the key a11 with the data of the key a10 based on the received integration instruction information. Although not shown in FIG. 5, the division integration processing unit 113 of the data division control device 1c deletes the data of the key a11.

なお、分割閾値Kと統合閾値Cとは、分割と統合とが連続して交互に発生し振動してしまうことを防ぐため、統合閾値Cは分割閾値Kより大きく離れた値に設定されることが好ましい。   Note that the division threshold K and the integration threshold C are set to a value far apart from the division threshold K in order to prevent the division and integration from occurring alternately and continuously. Is preferred.

また、例えば、キーaが図2(a)に示すように、キーa0,a10,a11に分割され、それぞれ異なるデータ分割制御装置1,1a,1b,1cに格納されているものとする。この時、本実施形態では、データ分割制御装置1がキーaのデータを参照するデータ処理の要求を受信した場合、キーa10,a11のデータを取得する処理が増加する。しかし、キーaのデータのサイズが非常に大きかった場合、キーa10,a11のデータを取得する処理に伴う遅延は、キーaのデータ全体を参照する処理に伴う遅延に比べて無視できる程度である。   In addition, for example, as shown in FIG. 2A, the key a is divided into keys a0, a10, and a11 and stored in different data division control devices 1, 1a, 1b, and 1c, respectively. At this time, in the present embodiment, when the data division control device 1 receives a request for data processing referring to the data of the key a, the processing for acquiring the data of the keys a10 and a11 increases. However, when the size of the data of the key a is very large, the delay associated with the process of acquiring the data of the keys a10 and a11 is negligible compared to the delay associated with the process of referring to the entire data of the key a. .

以上、本実施形態のデータ分割制御装置1は、データ処理を実行した場合、分散ロックに掛かる時間(ロック時間)と、データ処理に掛かる時間(データ処理時間)とを計測し、所定期間内の計測値を集計する処理時間計測部112と、集計したロック時間およびデータ処理時間に基づいて、当該データ処理の対象となったデータを分割する、統合するまたは何もしないと判定する分割統合処理部113とを備える。具体的には、分割統合処理部113は、今回の所定期間内の集計したロック時間と集計したデータ処理時間との合計値が前回の所定期間内の前記合計値より小さく、かつ集計したロック時間を前記今回の所定期間内の合計値で除算した比が第1の閾値より小さい場合、そのデータを分割すると判定する。また、分割統合処理部113は、分割されているデータの双方が、今回の所定期間内の集計したロック時間と集計したデータ処理時間との合計値が前回の所定期間内の前記合計値より大きく、かつ集計したロック時間を前記今回の所定期間内の合計値で除算した比が統合閾値Cより大きい場合、当該データ同士を統合すると判定する。このことによって、データ分割制御装置1は、トランザクション処理に掛かる時間を低減するように、データの分割の仕方を自動的に決めることができる。   As described above, the data division control device 1 according to the present embodiment, when executing data processing, measures the time required for distributed locking (lock time) and the time required for data processing (data processing time), and within a predetermined period. A processing time measuring unit 112 that totals the measurement values, and a division integration processing unit that determines whether to divide, integrate, or do nothing based on the total lock time and data processing time. 113. Specifically, the division integration processing unit 113 determines that the total value of the total lock time and the total data processing time within the predetermined period is smaller than the total value within the previous predetermined period and the total lock time. Is divided by the total value within the predetermined period of time this time is smaller than the first threshold value, it is determined that the data is divided. In addition, the division integration processing unit 113 determines that both of the divided data have a total value of the total lock time and the total data processing time within the predetermined period greater than the total value within the previous predetermined period. If the ratio obtained by dividing the totaled lock time by the total value within the predetermined period is larger than the integration threshold C, it is determined that the data are integrated. Thus, the data division control device 1 can automatically determine how to divide data so as to reduce the time required for transaction processing.

また、ロック時間は、データの分割のされ方、分割されたデータの格納場所の散らばり方の双方またはいずれか一方、およびデータのどの部分を同時に用いるか、に依存する。データの更新処理においては、部分データを更新する場合があり、本来は、「同時に更新される部分」が1つのデータとなることが好ましい。同時に更新される部分データは、分散ロック等によって必ず排他処理を掛けられるので、各部分データごとに排他処理の時間を計測しておくことで、この部分データが他のデータと同時に処理される確率が高いことから把握できる。このようにして、データ分割制御装置1は、運用中に分割されたデータのロック時間を取得しているので、データを同時に更新処理に用いていることを動的に把握可能である。さらに、データ分割制御装置1は、同時に処理に用いる部分が変更された場合であっても、収集結果に基づいて自動的に追従できる。したがって、データ分割制御システム100は、手動でデータをどのように分割するかを設定する手間を省くことができる。   Also, the lock time depends on how data is divided and / or where the divided data are stored, and which part of the data is used simultaneously. In the data update process, partial data may be updated. Originally, it is preferable that the “part updated simultaneously” be one piece of data. Since partial data that is updated at the same time is always subjected to exclusive processing by distributed lock, etc., the probability that this partial data will be processed simultaneously with other data by measuring the time of exclusive processing for each partial data Can be grasped from the fact that Thus, since the data division control device 1 acquires the lock time of the data divided during operation, it can dynamically grasp that the data is simultaneously used for the update process. Furthermore, the data division control device 1 can automatically follow based on the collection result even when the parts used for the processing are changed at the same time. Therefore, the data division control system 100 can save time and labor for manually setting how to divide the data.

なお、本実施形態では、ロック処理の時間およびデータ処理時間を所定の周期で集計するように説明した。この集計処理は、所定の周期(一定周期を含む)で実行されなくとも構わない。例えば、集計処理は、データ処理要求に対して同期、非同期のいずれかで実行されても構わない。また、集計処理は、例えば、データ分割制御装置1の内部アラーム(例えば、メモリ等リソースの使用率が一定以上になった場合等)や、外部からの指示に基づいて実行されても構わない。   In the present embodiment, the lock processing time and the data processing time have been described as being totaled at a predetermined period. This aggregation process may not be executed in a predetermined cycle (including a fixed cycle). For example, the aggregation process may be executed either synchronously or asynchronously with respect to the data processing request. The aggregation process may be executed based on, for example, an internal alarm of the data division control device 1 (for example, when the usage rate of a resource such as a memory exceeds a certain level) or an instruction from the outside.

また、本実施形態では、分割統合は、図2(a)の分割情報121に示したように、2分木で実行した場合について説明したが、多分木で実行されても構わない。また、分割するときのサイズは、均等でなくても構わない。   Further, in the present embodiment, the division integration has been described with respect to the case where it is executed with a binary tree as shown in the division information 121 of FIG. 2A. However, it may be executed with a multitree. Moreover, the size when dividing may not be equal.

1,1a,1b,1c データ分割制御装置
3 端末
11 処理部
12 記憶部
13 通信部
100 データ分割制御システム
111 リクエスト処理部
112 処理時間計測部
113 分割統合処理部
114 データ管理部
121 分割情報
122 処理時間情報
C 統合閾値(第2の閾値)
K 分割閾値(第1の閾値)
T、Tp 平均総処理時間(合計値)
TL ロック時間
TD データ処理時間
1, 1a, 1b, 1c Data division control device 3 Terminal 11 Processing unit 12 Storage unit 13 Communication unit 100 Data division control system 111 Request processing unit 112 Processing time measurement unit 113 Division integration processing unit 114 Data management unit 121 Division information 122 Processing Time information C Integrated threshold (second threshold)
K division threshold (first threshold)
T, Tp Average total processing time (total value)
TL lock time TD data processing time

Claims (3)

データベースに分割または統合して格納されるデータに対してデータ処理する複数のデータ分割制御装置を含むデータ分割制御システムにおけるデータ分割制御装置であって、
前記データベースが記憶される記憶部と、
記データ処理の要求を、端末または他のデータ分割制御装置から受信した場合、前記データ分割制御システム内に分散して格納されたデータのロックに掛かる時間を示すロック時間と、前記データ処理に掛かる時間を示すデータ処理時間とを計測し、所定期間内の計測値を集計する処理時間計測部と、
前記集計したロック時間およびデータ処理時間に基づいて、当該データ処理の対象となったデータに対して分割するか否かまたは統合するか否かを判定する分割統合処理部と
を備え
前記分割統合処理部は、前記集計したロック時間と前記集計したデータ処理時間との合計値および前記集計したロック時間を前記合計値で除算した比に基づいて、前記データ処理の対象となったデータに対して分割するか否かまたは統合するか否かを判定し、
今回の所定期間内の前記合計値が前回の所定期間内の前記合計値より小さく、かつ前記比が第1の閾値より小さい場合、前記データを分割すると判定する
ことを特徴とするデータ分割制御装置。
A data partitioning control device in a data partitioning control system including a plurality of data partitioning control devices that process data on data stored by being divided or integrated into a database,
A storage unit which the database is stored,
A request for pre Kide over data processing, when receiving from a terminal or other data division control device, a lock time indicating a time required for locking of the data stored across a said data division control system, the data A processing time measuring unit that measures data processing time indicating the time required for processing, and totals the measured values within a predetermined period;
A division integration processing unit that determines whether or not to divide or integrate the data subjected to the data processing based on the aggregated lock time and data processing time ;
The division integration processing unit is configured to calculate data based on a total value of the totaled lock time and the totaled data processing time and a ratio obtained by dividing the totalized lock time by the total value. Determine whether to split or merge
When the total value in the current predetermined period is smaller than the total value in the previous predetermined period and the ratio is smaller than the first threshold, it is determined that the data is divided. Data division controller.
前記分割統合処理部は、分割されているデータの双方が、今回の所定期間内の前記合計値が前回の所定期間内の前記合計値より大きく、かつ前記比が前記第1の閾値よりも大きな第2の閾値より大きい場合、当該分割されているデータ同士を統合すると判定する
ことを特徴とする請求項に記載のデータ分割制御装置。
In the divided integration processing unit, both of the divided data are such that the total value in the current predetermined period is larger than the total value in the previous predetermined period, and the ratio is larger than the first threshold value. If greater than the second threshold value, the data division control device according to claim 1, wherein determining that integrate data with each other are the split.
前記集計したロック時間および前記集計したデータ処理時間それぞれは、前記所定期間内の計測値の平均値である
ことを特徴とする請求項1または請求項に記載のデータ分割制御装置。
Wherein each totalized lock time and the aggregate data processing time, the data division control device according to claim 1 or claim 2, characterized in that a mean value of the measurement value within the predetermined period.
JP2013170135A 2013-08-20 2013-08-20 Data division controller Expired - Fee Related JP5997668B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013170135A JP5997668B2 (en) 2013-08-20 2013-08-20 Data division controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013170135A JP5997668B2 (en) 2013-08-20 2013-08-20 Data division controller

Publications (2)

Publication Number Publication Date
JP2015041116A JP2015041116A (en) 2015-03-02
JP5997668B2 true JP5997668B2 (en) 2016-09-28

Family

ID=52695271

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013170135A Expired - Fee Related JP5997668B2 (en) 2013-08-20 2013-08-20 Data division controller

Country Status (1)

Country Link
JP (1) JP5997668B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8607238B2 (en) * 2011-07-08 2013-12-10 International Business Machines Corporation Lock wait time reduction in a distributed processing environment

Also Published As

Publication number Publication date
JP2015041116A (en) 2015-03-02

Similar Documents

Publication Publication Date Title
US8874532B2 (en) Managing dereferenced chunks in a deduplication system
US9372908B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
US10204147B2 (en) System for capture, analysis and storage of time series data from sensors with heterogeneous report interval profiles
CN110347651B (en) Cloud storage-based data synchronization method, device, equipment and storage medium
JP2019511054A (en) Distributed cluster training method and apparatus
US9424156B2 (en) Identifying a potential failure event for a data storage device
EP3425493A1 (en) Data processing method and apparatus
JP2021500649A (en) Computer implementation methods, computer program products, and systems for storing records in shard database shard tables, computer implementation methods, computer program products, and systems for retrieving records from shard database shard tables. System, as well as a system for storing shard databases
CN107451013B (en) Data recovery method, device and system based on distributed system
US10936216B2 (en) Method and system for storage exhaustion estimation
JP6129290B1 (en) Method and system for recommending application parameter settings and system specification settings in distributed computing
US11635994B2 (en) System and method for optimizing and load balancing of applications using distributed computer clusters
WO2018068714A1 (en) Deduplication processing method, and storage device
US20150331621A1 (en) Uncoordinated data retrieval across multiple-data-storage-devices enclosures
CN104424361A (en) Autonomically defining hot storage and heavy workloads
JP2022503344A (en) Computer network measurement metrics
EP2940587A1 (en) Computer, control device for computer system, and recording medium
CN112988039B (en) Data uploading method and device, cloud storage gateway and system and storage medium
US9430149B2 (en) Pipeline planning for low latency storage system
JP5997668B2 (en) Data division controller
US10469411B1 (en) Dynamic application scaling
CN110909062A (en) Data processing method and device, electronic equipment and readable storage medium
US9747309B1 (en) Auto-determining backup level
US20150331610A1 (en) Data device grouping across multiple-data-storage-devices enclosures for synchronized data maintenance
US20180165380A1 (en) Data processing system and data processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150717

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160531

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160801

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160826

R150 Certificate of patent or registration of utility model

Ref document number: 5997668

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees