Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6239264B2 - Database management system and writing method management method thereof - Google Patents
[go: Go Back, main page]

JP6239264B2 - Database management system and writing method management method thereof - Google Patents

Database management system and writing method management method thereof Download PDF

Info

Publication number
JP6239264B2
JP6239264B2 JP2013102186A JP2013102186A JP6239264B2 JP 6239264 B2 JP6239264 B2 JP 6239264B2 JP 2013102186 A JP2013102186 A JP 2013102186A JP 2013102186 A JP2013102186 A JP 2013102186A JP 6239264 B2 JP6239264 B2 JP 6239264B2
Authority
JP
Japan
Prior art keywords
time
write
synchronous
database
semi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013102186A
Other languages
Japanese (ja)
Other versions
JP2014222451A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2013102186A priority Critical patent/JP6239264B2/en
Publication of JP2014222451A publication Critical patent/JP2014222451A/en
Application granted granted Critical
Publication of JP6239264B2 publication Critical patent/JP6239264B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本実施形態は、データベース管理システムおよびその書き込み方式管理方法に関する。   The present embodiment relates to a database management system and a writing method management method thereof.

近年、データの格納や操作、検索を実現する情報管理技術として、データベースが利用されている。データベースには、さまざまなデータを管理し、常にユーザが快適に利用できるように、データベースを管理するデータベース管理システムが設けられている。   In recent years, a database has been used as an information management technique for realizing data storage, operation, and retrieval. The database is provided with a database management system that manages various data and manages the database so that the user can always use it comfortably.

データベースには、主となるデータベースを示すマスター側のデータベース(以下、これをマスターデータベースともいう。)と、このマスターデータベースと全く同じ内容のデータベース(以下、これをレプリカデータベースという。)がある。レプリカデータベースは、マスターデータベースの複製(レプリカ)であり、マスターデータベースとデータの整合性を維持することが求められている。   There are two types of databases: a master-side database indicating a main database (hereinafter also referred to as a master database) and a database having the same contents as the master database (hereinafter referred to as a replica database). The replica database is a replica (replica) of the master database and is required to maintain data consistency with the master database.

ここで、この種のデータベース管理システムに関するものとして、マスターデータベースのレコードについて単位時間当たりの更新回数の頻度が上限値を上回っているか否かを判別し、更新回数の頻度が上限値を上回っている場合には、レプリカデータベースを更新するために差分データをシステムに送信するデータベースが開示されている(例えば、特許文献1参照)。   Here, as for this type of database management system, it is determined whether or not the frequency of the update count per unit time exceeds the upper limit value for the record of the master database, and the frequency of the update count exceeds the upper limit value. In some cases, a database is disclosed that transmits difference data to the system to update the replica database (see, for example, Patent Document 1).

特開2006−318020号公報JP 2006-318020 A

しかしながら、マスターデータベースの更新回数のみを監視していても、ネットワークの負荷やレプリカデータベースに生じる負荷が考慮されていないため、レプリカデータベースにデータが書き込まれるタイミングは、マスターデータベースと同期が取れていなかった。この場合、レプリカデータベースは、マスターサーバから送信されるタイミングによっては送信された差分データを損失する可能性があった。   However, even if only the number of updates of the master database is monitored, the network load and the load generated in the replica database are not taken into consideration, so the timing at which data is written to the replica database is not synchronized with the master database. . In this case, the replica database may lose the transmitted differential data depending on the timing of transmission from the master server.

例えば、レプリカデータベースにデータを書き込むタイミングがマスターデータベースと完全に同期が取れている場合には、レプリカデータベースは、マスターサーバから送信される差分データを損失しないと考えられる。   For example, when the timing of writing data to the replica database is completely synchronized with the master database, the replica database is considered not to lose the differential data transmitted from the master server.

しかしながら、ネットワークを他のサーバや他のレプリカデータベースと共有することによりネットワーク自体が高負荷となる場合や、1つのレプリカデータベースに想定外の負荷が繰り返しかかる場合には、完全な同期が取れていないことによってデータの損失を生じることがあった。   However, if the network itself is heavily loaded by sharing the network with other servers or other replica databases, or if an unexpected load is repeatedly applied to one replica database, perfect synchronization is not achieved. Data loss may occur.

そこで、データの損失を生じることなく、かつシステム全体の負荷を最適化することができるデータベース管理システムおよびデータベース管理システムにおける書き込み方式管理方法が要望されている。   Therefore, there is a demand for a database management system and a writing method management method in the database management system that can optimize the load on the entire system without causing data loss.

本実施の形態に係るデータベース管理システムは、マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、を備える。前記書込方式切替部は、前記第1の閾値時間よりも短い時間が設定された第2の閾値時間を有し、前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替える。また、前記書込方式切替部は、前記完全同期の書き込み方式に切り替えた後、所定の時間内に前記完全同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間から第1の調整時間だけ引き下げた時間に前記第2の閾値時間を更新する。 The database management system according to the present embodiment is a database management system including a master server having a master-side database and a slave server having a slave-side database, and writing data to the master-side database A processing time calculation processing unit that receives a command and writes the data to the master-side database and calculates a response time for the data by writing the data from the master server to the slave server And a load estimation unit that calculates a response processing time for each writing method based on the processing time and the response time, and the response processing time is preset in the case of a completely synchronous writing method. If the time is less than the threshold time, the completely synchronous writing method is used. A write mode switching unit that writes data to the slave side database when the response processing time is equal to or longer than the first threshold time while writing data to the slave side database; . The writing method switching unit has a second threshold time set to a time shorter than the first threshold time, and after the switching to the semi-synchronous writing method, the response processing time When the threshold time is less than 2, the semi-synchronous writing method is switched to the fully synchronous writing method. In addition, when the write method switching unit switches the write method from the fully synchronous write method to the semi-synchronized write method within a predetermined time after switching to the fully synchronous write method, The second threshold time is updated to a time obtained by lowering the second adjustment time by the first adjustment time.

本実施形態に係るデータベース管理システムの一例を示す概略構成図。1 is a schematic configuration diagram illustrating an example of a database management system according to an embodiment. 本実施形態にかかるデータベース管理システムの機能を示した機能ブロック図。The functional block diagram which showed the function of the database management system concerning this embodiment. マスターサーバが完全同期の書き込み方式でスレーブデータベースにデータを書き込むシーケンスを示したシーケンス図。The sequence diagram which showed the sequence in which a master server writes data in a slave database by a completely synchronous writing system. マスターサーバが半同期の書き込み方式でスレーブデータベースにデータを書き込むシーケンスを示したシーケンス図。The sequence diagram which showed the sequence in which a master server writes data in a slave database with a semi-synchronous writing method. マスターサーバが非同期の書き込み方式でスレーブデータベースにデータを書き込むシーケンスを示したシーケンス図。The sequence diagram which showed the sequence in which a master server writes data in a slave database by an asynchronous writing system. マスターサーバの書込方式切替部が、データベース管理システムの負荷により、書き込み方式を切り替えることを示した説明図。Explanatory drawing which showed that the write-system switching part of a master server switched write-in method by the load of a database management system. 半同期の書き込み方式から完全同期の書き込み方式に書き込み方式を切り替える場合を示した説明図。Explanatory drawing which showed the case where a writing system is switched from a semi-synchronous writing system to a completely synchronous writing system. データベース管理システムの負荷に応じて、3種類の書き込み方式から最適な書き込み方式に切り替える切替方法を示した説明図。Explanatory drawing which showed the switching method which switches from three types of writing systems to the optimal writing system according to the load of a database management system. 本実施形態に係るマスターサーバのハードウエアの構成を示したハードウエアブロック図。A hardware block diagram showing a hardware configuration of a master server according to the present embodiment. 本実施形態に係るスレーブサーバのハードウエアの構成を示したハードウエアブロック図。The hardware block diagram which showed the hardware constitutions of the slave server which concerns on this embodiment. データベース管理システムの方式切替判断部が書き込み方式を切り替える書込方式切替処理を示したフローチャート。The flowchart which showed the writing system switching process in which the system switching judgment part of a database management system switches a writing system. データベース管理システムの方式切替判断部が、書き込み方式を非同期の書き込み方式か半同期の書き込み方式に切り替える書込方式切替処理を示したフローチャート。The flowchart which showed the write system switching process in which the system switch judgment part of a database management system switches a write system to an asynchronous write system or a semi-synchronous write system. スレーブサーバの方式変更要求受付部が、マスターサーバの書込方式切替部から送信された書込方式切替要求に応じて書込命令受信部に設定されている書き込み方式を切り替える書込方式切替処理を示したフローチャート。The method change request reception unit of the slave server performs a write method switching process for switching the write method set in the write command receiving unit in response to the write method switch request transmitted from the write method switch unit of the master server. The flowchart shown.

本実施形態に係るデータベース管理システムは、マスター側のデータベース(以下、これをマスターデータベースともいう。)を具備するマスターサーバと、スレーブ側のデータベース(以下、これをスレーブデータベースともいう。)を具備するスレーブサーバと、を備えている。   The database management system according to the present embodiment includes a master server having a master-side database (hereinafter also referred to as a master database) and a slave-side database (hereinafter also referred to as a slave database). And a slave server.

また、本実施形態に係るデータベース管理システムは、マスターデータベースにデータを書き込む書込命令を受け付けてマスターデータベースにデータを書き込む処理時間と、マスターサーバからスレーブサーバにデータの書込命令を行って、その書込命令に対する応答時間とを算出する処理時間算出処理部と、その算出された処理時間と応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出し、マスターサーバとスレーブサーバとを含むシステム全体の負荷を書き込み方式ごとに推定する負荷推定部と、完全同期の書き込み方式のときにおいて、応答処理時間が予め設定された第1の閾値時間未満の場合は、完全同期の書き込み方式のままスレーブデータベースにデータを書き込む一方、応答処理時間が第1の閾値時間以上の場合には、半同期の書き込み方式でスレーブデータベースにデータを書き込むように切り替える書込方式切替部と、を備えている。   Further, the database management system according to the present embodiment receives a write command for writing data to the master database and writes the data to the master database, and performs a data write command from the master server to the slave server. A processing time calculation processing unit that calculates a response time to a write command, and calculates a response processing time for each writing method based on the calculated processing time and response time, and includes a master server and a slave server When the response processing time is less than a preset first threshold time in the case of a completely synchronous writing method and a load estimating unit that estimates the entire system load for each writing method, the completely synchronous writing method remains If the response processing time is greater than or equal to the first threshold time while writing data to the slave database In comprises a a writing mode switching unit that switches to write the data to the slave database in a semi-synchronous write mode.

これにより、本実施形態に係るデータベース管理システムは、システム全体の負荷の状況に応じて、完全同期の書き込み方式または半同期の書き込み方式に書き込み方式を切り替えてスレーブデータベースにデータを書き込むことができるようになっている。   As a result, the database management system according to the present embodiment can write data to the slave database by switching the writing method to the completely synchronous writing method or the semi-synchronous writing method according to the load condition of the entire system. It has become.

図1は、本実施形態に係るデータベース管理システム500の一例を示す概略構成図である。   FIG. 1 is a schematic configuration diagram illustrating an example of a database management system 500 according to the present embodiment.

図1に示すように、データベース管理システム500は、クライアント端末100、マスターサーバ200、スレーブサーバ300およびネットワーク400などを備えて構成されている。   As shown in FIG. 1, the database management system 500 includes a client terminal 100, a master server 200, a slave server 300, a network 400, and the like.

データベース管理システム500は、例えば、列車の座席予約システム、銀行の勘定系システム(一般的には、経理会計業務システム、特に銀行の基幹系システム)などに利用される。列車の座席予約システムでは、1つの列車における利用者の座席予約の情報以外にも列車の運行情報などを管理することができるようになっている。   The database management system 500 is used, for example, for a train seat reservation system, a bank billing system (generally, an accounting / accounting system, particularly a bank core system). In the train seat reservation system, it is possible to manage the train operation information in addition to the user seat reservation information in one train.

クライアント端末100は、例えば、列車の座席予約を行うためにユーザが入力を行うクライアント端末である。   The client terminal 100 is, for example, a client terminal that a user inputs to make a seat reservation for a train.

マスターサーバ200は、例えば、記憶領域や記憶媒体から構成されるマスターデータベースに記憶されている列車の座席の予約状況を管理する管理サーバである。   The master server 200 is a management server that manages the reservation status of train seats stored in a master database composed of storage areas and storage media, for example.

スレーブサーバ300は、例えば、マスターデータベースに記憶されている列車の予約状況の複製(レプリカ)の作成とデータの管理に機能を絞った管理サーバである。なお、予約状況の複製の作成とデータを管理する機能のことをレプリケーション(replication)ともいう。   The slave server 300 is, for example, a management server whose functions are limited to creation of replicas (replicas) of train reservation statuses stored in the master database and data management. Note that the function of creating a reservation status replica and managing data is also referred to as replication.

ネットワーク400は、クライアント端末100、マスターサーバ200およびスレーブサーバ300を、相互に接続するためのネットワークである。   The network 400 is a network for connecting the client terminal 100, the master server 200, and the slave server 300 to each other.

なお、クライアント端末100、マスターサーバ200およびスレーブサーバ300は、例えば、情報処理を行う情報処理装置やパーソナルコンピュータから構成されている。   In addition, the client terminal 100, the master server 200, and the slave server 300 are comprised from the information processing apparatus and personal computer which perform information processing, for example.

図2は、本実施形態にかかるデータベース管理システム500の機能を示した機能ブロック図である。   FIG. 2 is a functional block diagram showing functions of the database management system 500 according to the present embodiment.

クライアント端末100は、アプリケーションの機能により、クライアント端末100からマスターサーバ200のマスターデータベース215にデータを書き込む依頼を行う。例えば、クライアント端末100は、SQL(Structured Query Language)を用いて列車の座席の予約をマスターデータベースに行うようになっている。   The client terminal 100 requests to write data to the master database 215 of the master server 200 from the client terminal 100 by the function of the application. For example, the client terminal 100 reserves train seats in the master database using SQL (Structured Query Language).

マスターサーバ200は、書込実行部210、マスターデータベース215、レプリケーション実行部220および方式切替判断部255などを備えて構成されている。   The master server 200 includes a write execution unit 210, a master database 215, a replication execution unit 220, a method switching determination unit 255, and the like.

書込実行部210は、書込命令受付部212と書込処理部214とを備えて構成されている。書込命令受付部212は、クライアント端末100から送信された書込命令を受け付ける受付機能を備えている。書込処理部214は、書込命令受付部212において受け付けた書込命令に基づいて、マスターデータベース215にデータを書き込むようになっている。また、書込実行部210は、クライアント端末100から書込命令を受け付けた時間及びマスターデータベース215に書き込みが終了した時間と、マスターサーバ200からスレーブサーバ300にデータの書込命令を行ってその書込命令に対する応答時間に関する情報を記憶する機能を備えている。   The write execution unit 210 includes a write command reception unit 212 and a write processing unit 214. The write command receiving unit 212 has a receiving function for receiving a write command transmitted from the client terminal 100. The write processing unit 214 writes data in the master database 215 based on the write command received by the write command receiving unit 212. Further, the write execution unit 210 issues a data write command from the master server 200 to the slave server 300 when the write command is received from the client terminal 100, the time when the write to the master database 215 is completed, and the write. It has a function of storing information related to response time for embedded commands.

マスターデータベース215は、マスターサーバ200が備えるマスターデータベースである。   The master database 215 is a master database provided in the master server 200.

レプリケーション実行部220は、書込命令送信部222と応答受信部224とを備えて構成されている。   The replication execution unit 220 includes a write command transmission unit 222 and a response reception unit 224.

書込命令送信部222は、書込実行部210の書込命令受付部212から書込命令を取得すると、現在設定されている書き込み方式でスレーブサーバ300に書込命令を送信する。書き込み方式には、完全同期の書き込み方式および半同期の書き込み方式が該当し、さらに非同期の書き込み方式を備えるようにしてもよい。   When the write command transmission unit 222 acquires the write command from the write command reception unit 212 of the write execution unit 210, the write command transmission unit 222 transmits the write command to the slave server 300 using the currently set writing method. As the writing method, a completely synchronous writing method and a semi-synchronous writing method are applicable, and an asynchronous writing method may be provided.

例えば、マスターデータベース215に書き込み処理が終了した後、書込命令送信部222は、完全同期の書き込み方式および半同期の書き込み方式の場合は、スレーブサーバ300に書込命令を送信する一方、非同期の書き込み方式の場合には、所定のタイミングで書込命令を送信する。   For example, after the write processing to the master database 215 is completed, the write command transmission unit 222 transmits a write command to the slave server 300 in the case of the fully synchronous write method and the semi-synchronous write method, while the asynchronous In the case of the write method, a write command is transmitted at a predetermined timing.

応答受信部224は、スレーブサーバ300から書込命令によるデータの書込処理が終了した場合にその書込命令の結果を受信するようになっている。また、応答受信部224は、書込命令の結果をクライアント端末100に送信するため、書込処理部214に書込命令の結果を送信し、書込命令受付部212を介してクライアント端末100に書込命令の結果を送信するようになっている。   The response receiving unit 224 receives the result of the write command when the data write process by the write command is completed from the slave server 300. Further, the response receiving unit 224 transmits the result of the write command to the write processing unit 214 in order to transmit the result of the write command to the client terminal 100, and sends the result of the write command to the client terminal 100 via the write command receiving unit 212. The result of the write command is transmitted.

方式切替判断部255は、処理時間算出処理部230、負荷推定部240および書込方式切替部250とを備えて構成されている。   The method switching determination unit 255 includes a processing time calculation processing unit 230, a load estimation unit 240, and a writing method switching unit 250.

処理時間算出処理部230は、書込実行部210に記憶されているクライアント端末100から書込命令を受け付けた時間及びマスターデータベース215に書き込みが終了した時間からマスターデータベース215の書き込みに要した処理時間を算出する。また、処理時間算出処理部230は、書込実行部210に記憶されているマスターサーバ200からスレーブサーバ300にデータの書込命令を行ってその書込命令に対する応答時間に関する情報から、書込命令に対する応答時間を算出する機能を有している。   The processing time calculation processing unit 230 is the processing time required to write the master database 215 from the time when the write command is received from the client terminal 100 stored in the write execution unit 210 and the time when the writing to the master database 215 is completed. Is calculated. In addition, the processing time calculation processing unit 230 performs a data write command from the master server 200 stored in the write execution unit 210 to the slave server 300 and uses the information related to the response time with respect to the write command to write command It has a function to calculate the response time for.

負荷推定部240は、処理時間算出処理部230で算出した処理時間と応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出し、マスターサーバ200とスレーブサーバ300とを含むデータベース管理システム500全体(システム全体)の負荷を書き込み方式ごとに推定する機能を有している。また、負荷推定部240は、このシステムの負荷をシステム負荷指標値とすることができる。   The load estimation unit 240 calculates a response processing time for each writing method based on the processing time and the response time calculated by the processing time calculation processing unit 230, and the database management system 500 including the master server 200 and the slave server 300. It has a function to estimate the load of the entire system (the entire system) for each writing method. Further, the load estimation unit 240 can use the system load as a system load index value.

書込方式切替部250は、完全同期の書き込み方式のときにおいて、応答処理時間が予め設定された第1の閾値時間未満の場合は、完全同期の書き込み方式のままスレーブサーバ300のデータベース315にデータを書き込む一方、応答処理時間が第1の閾値時間以上の場合には、半同期の書き込み方式でスレーブサーバ300のデータベース315にデータを書き込むように切り替える機能を有している。   When the response processing time is less than the preset first threshold time in the completely synchronous writing method, the writing method switching unit 250 stores data in the database 315 of the slave server 300 with the completely synchronous writing method. On the other hand, when the response processing time is equal to or longer than the first threshold time, there is a function of switching to write data to the database 315 of the slave server 300 by a semi-synchronous writing method.

本実施形態では、方式切替判断部255は、負荷推定部240で推定したデータベース管理システム500全体の負荷(すなわち、システム負荷指標値である。)に基づいて、書込方式切替部250で書き込み方式を決定し、レプリケーション実行部220と、スレーブサーバ300の書込命令受信部310の書込み方式を設定するようになっている。   In the present embodiment, the method switching determination unit 255 uses the writing method switching unit 250 to write based on the load of the entire database management system 500 estimated by the load estimation unit 240 (that is, the system load index value). The write execution method of the replication execution unit 220 and the write command reception unit 310 of the slave server 300 is set.

なお、本実施形態は、これに限定されるものではなく、例えば、マスターサーバ200からスレーブサーバ300に非同期のタイミングでデータを書き込む要求を行う非同期の書き込み方式をさらに備えるようにしてもよい。   Note that the present embodiment is not limited to this. For example, the master server 200 may further include an asynchronous writing method that makes a request to write data from the master server 200 to the slave server 300 at an asynchronous timing.

この場合、方式切替判断部255は、半同期の書き込み方式のときにおいて、応答処理時間が第1の閾値時間未満の場合は、半同期の書き込み方式のままスレーブデータベース315にデータを書き込む一方、応答処理時間が第1の閾値時間以上の場合には、非同期の書き込み方式でスレーブデータベース315にデータを書き込むように切り替える。 In this case, mode switching determination unit 255, at the time of writing method of semi-asynchronous, if response processing time is less than the first threshold time while writing data to the left slave database 315 of the semi-synchronous write mode, When the response processing time is equal to or longer than the first threshold time, switching is performed so that data is written to the slave database 315 by an asynchronous writing method.

スレーブサーバ300は、書込命令受信部310、スレーブデータベース315、応答返信部320および方式変更要求受付部330を備えて構成されている。   The slave server 300 includes a write command receiving unit 310, a slave database 315, a response reply unit 320, and a method change request receiving unit 330.

書込命令受信部310は、マスターサーバ200のレプリケーション実行部220から書込命令を受信する機能を有している。書込命令受信部310は、書込命令を受信すると、スレーブデータベース315にデータを書き込むようになっている。また、書込命令受信部310は、スレーブデータベース315にデータを書き込むと、その書込結果を応答返信部320に送出する。   The write command receiving unit 310 has a function of receiving a write command from the replication execution unit 220 of the master server 200. When receiving the write command, the write command receiving unit 310 writes data in the slave database 315. In addition, when the write command receiving unit 310 writes data to the slave database 315, the write command receiving unit 310 sends the write result to the response reply unit 320.

応答返信部320は、書込命令受信部310から書込結果を取得すると、マスターサーバ200の応答受信部224にその書込結果を送信する。この場合、スレーブサーバ300は、マスターサーバ200の書込実行部210とレプリケーション実行部220を介して、クライアント端末100に書込結果を送信する。   When the response reply unit 320 obtains the write result from the write command receiving unit 310, the response reply unit 320 transmits the write result to the response receiving unit 224 of the master server 200. In this case, the slave server 300 transmits the write result to the client terminal 100 via the write execution unit 210 and the replication execution unit 220 of the master server 200.

方式変更要求受付部330は、マスターサーバ200の書込方式切替部250から書き込み方式を切り替える切替変更指示を受け付けるようになっている。方式変更要求受付部330は、書込方式切替部250から切替変更指示を受け付けると、その切替変更指示に基づいて書込命令受信部310に切替変更指示を出し、書込命令受信部310の書き込み方式を変更させる機能を有している。   The method change request accepting unit 330 is configured to accept a change instruction for switching the write method from the write method switching unit 250 of the master server 200. Upon receiving the switching change instruction from the writing method switching unit 250, the method change request receiving unit 330 issues a switching change instruction to the write command receiving unit 310 based on the switching change instruction, and the write command receiving unit 310 writes It has a function to change the method.

次に、データベース管理システム500において、マスターサーバ200がスレーブサーバ300のスレーブデータベース315にデータを書き込む書き込み方式について説明する。   Next, a writing method in which the master server 200 writes data to the slave database 315 of the slave server 300 in the database management system 500 will be described.

図3は、マスターサーバ200が完全同期の書き込み方式(以下、これを完全同期式ともいう。)でスレーブデータベース315にデータを書き込むシーケンスを示したシーケンス図である。図3において、Sに数字を付した符号は、シーケンス図の各ステップを示している。   FIG. 3 is a sequence diagram showing a sequence in which the master server 200 writes data to the slave database 315 by a completely synchronous writing method (hereinafter also referred to as a completely synchronized method). In FIG. 3, reference numerals with numbers added to S indicate steps in the sequence diagram.

まず、クライアント端末100は、ネットワーク400を介してマスターサーバ200に書込命令を送信する(ステップS001)。   First, the client terminal 100 transmits a write command to the master server 200 via the network 400 (step S001).

マスターサーバ200は、書込実行部210において書込命令を受け付けると、マスターデータベース215にデータを書き込む書込処理を実行する(ステップS003)。マスターサーバ200は、マスターデータベース215にデータの書込処理が完了すると、その書き込みが完了した時間情報を書込実行部210において記憶し、レプリケーション実行部220がスレーブサーバ300に書込命令を送信する(ステップS005)。   When the write execution unit 210 receives a write command, the master server 200 executes a write process for writing data to the master database 215 (step S003). When the data writing process is completed in the master database 215, the master server 200 stores the time information when the writing is completed in the write execution unit 210, and the replication execution unit 220 transmits a write command to the slave server 300. (Step S005).

スレーブサーバ300は、書込命令受信部310において書込命令を受信し、スレーブデータベース315にデータを書き込む(ステップS007)。   The slave server 300 receives the write command at the write command receiving unit 310 and writes the data in the slave database 315 (step S007).

スレーブサーバ300は、書込命令受信部310がスレーブデータベース315に書込処理を行った後、応答返信部320から書込結果を(例えば、書込成功)マスターサーバ200に返信する(ステップS009)。   After the write command receiving unit 310 performs a write process on the slave database 315, the slave server 300 returns a write result (for example, successful writing) from the response reply unit 320 to the master server 200 (step S009). .

マスターサーバ200は、スレーブサーバ300から受信した書込結果(例えば、書込成功)を、レプリケーション実行部220と書込実行部210を介してクライアント端末100に送信する(ステップS011)。マスターサーバ200は、レプリケーション実行部220から書込命令を送信し、応答返信部320から応答を受信するまでの時間情報を書込命令に対する応答時間に関する情報として書込実行部210において記憶する。   The master server 200 transmits the write result (for example, write success) received from the slave server 300 to the client terminal 100 via the replication execution unit 220 and the write execution unit 210 (step S011). The master server 200 transmits a write command from the replication execution unit 220 and stores time information until receiving a response from the response reply unit 320 in the write execution unit 210 as information related to a response time for the write command.

このように、マスターサーバ200は、マスターデータベース215にデータを書き込んだ後、スレーブサーバ300のスレーブデータベース315にデータを書き込み、スレーブサーバ300のスレーブデータベース315においてデータの書込処理が成功すると、クライアント端末100に応答を送信するようになっている。   As described above, after the master server 200 writes data to the master database 215, the master server 200 writes data to the slave database 315 of the slave server 300, and when the data writing process is successful in the slave database 315 of the slave server 300, the client terminal A response is sent to 100.

なお、データベース管理システム500の初期設定は、完全同期の書き込み方式が設定されているものとする。次に、半同期の書き込み方式について説明する。   Note that the initial setting of the database management system 500 is set to a completely synchronous writing method. Next, a semi-synchronous writing method will be described.

図4は、マスターサーバ200が半同期の書き込み方式(以下、これを半同期式ともいう。)でスレーブデータベース315にデータを書き込むシーケンスを示したシーケンス図である。図4において、Sに数字を付した符号は、シーケンス図の各ステップを示している。なお、図3と同じステップの箇所には同一の符号を付し、適宜、説明を省略する。   FIG. 4 is a sequence diagram showing a sequence in which the master server 200 writes data to the slave database 315 by a semi-synchronous writing method (hereinafter also referred to as a semi-synchronous method). In FIG. 4, reference numerals with numbers added to S indicate steps in the sequence diagram. In addition, the same code | symbol is attached | subjected to the location of the same step as FIG. 3, and description is abbreviate | omitted suitably.

図4に示す半同期の書き込み方式による書込処理が、図3に示す完全同期の書き込み方式による書込処理と異なる点は、マスターサーバ200においてステップS003の書込処理が完了した後の処理が異なる。   The difference between the semi-synchronous writing method shown in FIG. 4 and the completely synchronous writing method shown in FIG. 3 is that the processing after the completion of the writing process in step S003 in the master server 200 is performed. Different.

具体的には、マスターサーバ200は、レプリケーション実行部220からスレーブサーバ300に書込命令を送信するとともに(ステップS005)、クライアント端末100に書込結果(例えば、書込成功)を送信する送信処理を行う点である(ステップS101)。   Specifically, the master server 200 transmits a write command from the replication execution unit 220 to the slave server 300 (step S005) and transmits a write result (for example, write success) to the client terminal 100. (Step S101).

この場合、マスターサーバ200は、スレーブサーバ300からの書込結果(いわゆる応答)を待たないでクライアント端末100に書込結果を送信するので(ステップS101)、完全同期の書き込み方式よりも高速にクライアント端末100に書込結果を送信することができる。また、ステップS005のタイミングとステップS101のタイミングは、同時であってもよい。   In this case, the master server 200 transmits the write result to the client terminal 100 without waiting for the write result (so-called response) from the slave server 300 (step S101), so that the client is faster than the completely synchronous write method. The writing result can be transmitted to the terminal 100. Moreover, the timing of step S005 and the timing of step S101 may be simultaneous.

また、本実施形態では、完全同期の書き込み方式と半同期の書き込み方式の他に非同期の書き込み方式(以下、これを非同期式ともいう。)をさらに備えることができる。次に、非同期の書き込み方式について説明する。   In this embodiment, in addition to the completely synchronous writing method and the semi-synchronous writing method, an asynchronous writing method (hereinafter also referred to as an asynchronous method) can be further provided. Next, an asynchronous writing method will be described.

図5は、マスターサーバ200が非同期の書き込み方式でスレーブデータベース315にデータを書き込むシーケンスを示したシーケンス図である。図5において、Sに数字を付した符号は、シーケンス図の各ステップを示している。なお、図3と同じステップの箇所には同一の符号を付し、適宜、説明を省略する。   FIG. 5 is a sequence diagram showing a sequence in which the master server 200 writes data to the slave database 315 by an asynchronous writing method. In FIG. 5, reference numerals with numbers added to S indicate steps in the sequence diagram. In addition, the same code | symbol is attached | subjected to the location of the same step as FIG. 3, and description is abbreviate | omitted suitably.

図5に示す非同期の書き込み方式による書込処理が、図3に示す完全同期の書き込み方式による書込処理と異なる点は、マスターサーバ200においてステップS003の書込処理が完了した後、マスターサーバ200は、スレーブサーバ300に書込命令をすぐには送信せず、一定時間の経過後または一定量の書込命令が一定量蓄積されるまで待機した後、まとめて書込命令を送信する点である。   The difference between the writing process by the asynchronous writing method shown in FIG. 5 and the writing process by the completely synchronous writing method shown in FIG. 3 is that, after the writing process of step S003 is completed in the master server 200, the master server 200 Does not immediately send a write command to the slave server 300, but waits until a certain amount of write commands are accumulated after a certain period of time has elapsed, and then sends the write commands collectively. is there.

具体的には、マスターサーバ200は、書込命令を受信して書込処理が完了すると(ステップS003)、スレーブサーバ300に書込命令を出さずクライアント端末100に書込結果(例えば、書込成功)を送信する(ステップS201)。   Specifically, when the master server 200 receives the write command and completes the write process (step S003), the master server 200 does not issue the write command to the slave server 300, and the write result (for example, write) Success) is transmitted (step S201).

また、次にクライアント端末100がマスターサーバ200に書込命令を送信すると(ステップS021)、マスターサーバ200は、マスターデータベース215に書込処理を行い(ステップS023)、書込処理が終了する度にクライアント端末100に書込結果(例えば、書込成功)を送信する(ステップS221)。   Next, when the client terminal 100 transmits a write command to the master server 200 (step S021), the master server 200 performs a write process on the master database 215 (step S023), and every time the write process ends. A writing result (for example, writing success) is transmitted to the client terminal 100 (step S221).

その後、マスターサーバ200は、一定時間の経過後または一定量の書込命令が蓄積された後に、スレーブサーバ300に書込命令をまとめて送信する(ステップS205)。スレーブサーバ300は、スレーブデータベース315にデータを書き込む書込処理を一括して行った後(ステップS207)、マスターサーバ200に書込結果(例えば、書込成功)を送信する(ステップS209)。   Thereafter, the master server 200 collectively transmits the write commands to the slave server 300 after a certain time has elapsed or after a certain amount of write commands have been accumulated (step S205). The slave server 300 collectively performs a writing process for writing data to the slave database 315 (step S207), and then transmits a writing result (for example, writing success) to the master server 200 (step S209).

非同期の書き込み方式の場合は、マスターサーバ200は、クライアント端末100に早期に応答を送信する一方、スレーブサーバ300に書込命令を送信するタイミングを所定のタイミングに設定したり一定量の書込命令をまとめて送信する。また、これに限定されるものではなく、例えば、データベース管理システム500のシステムの負荷が軽いとき、すなわち応答処理時間が短いときに書込命令を送信するように設定することもできる。このように、マスターサーバ200は、書き込み方式が非同期の書き込み方式の場合には、スレーブデータベース315にシステム全体の負荷が軽い状態で、データを書き込むことができる。   In the case of an asynchronous writing method, the master server 200 transmits a response to the client terminal 100 at an early stage, while setting a timing for transmitting a write command to the slave server 300 to a predetermined timing or a fixed amount of write commands. Are sent together. Further, the present invention is not limited to this, and for example, it can be set to transmit a write command when the system load of the database management system 500 is light, that is, when the response processing time is short. As described above, when the writing method is an asynchronous writing method, the master server 200 can write data to the slave database 315 with a light load on the entire system.

次に、方式切替判断部255がデータベース管理システム500の負荷に応じて書き込み方式を変更する方法について、説明する。   Next, a method in which the method switching determination unit 255 changes the writing method according to the load of the database management system 500 will be described.

なお、本実施形態では、完全同期の書き込み方式、半同期の書き込み方式および非同期の書き込み方式の3つの方式について書き込み方式を切り替える場合について説明するが、本実施形態はこれに限定されるものではない。例えば、完全同期の書き込み方式と半同期の書き込み方式の2つの方式を備え、この2つの書き込み方式を切り替えるように設定してもよい。 In the present embodiment, the case of switching the write method among three methods of a completely synchronous write method, a semi- synchronous write method, and an asynchronous write method will be described, but the present embodiment is not limited to this. . For example, two writing methods, a completely synchronous writing method and a semi- synchronous writing method, may be provided, and the two writing methods may be switched.

図6は、マスターサーバ200の方式切替判断部255が、データベース管理システム500の負荷により、書き込み方式を切り替えることを示した説明図である。   FIG. 6 is an explanatory diagram showing that the method switching determination unit 255 of the master server 200 switches the writing method depending on the load of the database management system 500.

図6では、負荷推定部240が推定するデータベース管理システム500の負荷により、書き込み方式を3つの方式の中うち、いずれかの方式に切り替えることを示している。ここで、図6の横軸は、推定されたシステム全体の負荷を示す一方、縦軸では、応答処理時間を示している。また、初期設定は、完全同期の書き込み方式である。   FIG. 6 shows that the writing method is switched to one of the three methods depending on the load of the database management system 500 estimated by the load estimating unit 240. Here, the horizontal axis of FIG. 6 indicates the estimated load of the entire system, while the vertical axis indicates the response processing time. The initial setting is a completely synchronous writing method.

負荷推定部240は、処理時間算出処理部230において算出された書き込みに要する処理時間とスレーブサーバ300からの応答時間に基づいて、応答処理時間からシステム全体の負荷を推定しており、データベース管理システム500のシステム全体の負荷が大きくなると、処理時間算出処理部230で算出される応答処理時間は、線形的に遅くなる。   The load estimation unit 240 estimates the load of the entire system from the response processing time based on the processing time required for writing calculated by the processing time calculation processing unit 230 and the response time from the slave server 300. When the load on the entire system 500 becomes large, the response processing time calculated by the processing time calculation processing unit 230 is linearly delayed.

また、本実施形態に係るデータベース管理システム500では、一定の書込み性能を維持するために、応答時間に対して設定された性能保証ラインSLが設定されており、方式切替判断部255では、その性能保証ラインSLを超えないように、固定値である閾値α(第1の閾値時間)が予め設定される。   In the database management system 500 according to the present embodiment, the performance guarantee line SL set for the response time is set in order to maintain a constant write performance. A threshold value α (first threshold time) that is a fixed value is set in advance so as not to exceed the guaranteed line SL.

ここで、データベース管理システム500を最初に稼働させたときは、まず完全同期の書き込み方式(完全同期式)で稼働し、処理時間算出処理部230で算出した処理時間と応答時間に基づくシステム全体の負荷が閾値α以上となるとき、方式切替判断部255は、書込み方式を完全同期の書き込み方式(完全同期式)から半同期の書き込み方式(半同期式)に切り替える。データベース管理システム500は、書き込み方式を半同期の書き込み方式に変更することにより、データベース管理システム500の負荷を小さくして、書込命令を実行することができる。   Here, when the database management system 500 is first operated, the database management system 500 is first operated in a completely synchronous writing method (completely synchronous method), and the entire system based on the processing time and the response time calculated by the processing time calculation processing unit 230 is operated. When the load is equal to or greater than the threshold value α, the method switching determination unit 255 switches the writing method from the completely synchronous writing method (fully synchronous method) to the semi-synchronous writing method (semi-synchronous method). The database management system 500 can execute a write command with a reduced load on the database management system 500 by changing the writing method to a semi-synchronous writing method.

また、書き込み方式を半同期の書き込み方式に変更した後でデータベース管理システム500の負荷が大きくなると、処理時間算出処理部230で算出される応答処理時間は、遅くなる。例えば、方式切替判断部255は、応答時間が遅くなることによってシステムの負荷を示す応答処理時間が閾値α以上になるときは、半同期の書き込み方式(半同期式)から非同期の書き込み方式(非同期式)に書き込み方式を切り替える。このように、データベース管理システム500は、書き込み方式を半同期の書き込み方式に変更することにより、書込命令処理を実行することができる。   Further, when the load on the database management system 500 increases after the writing method is changed to the semi-synchronous writing method, the response processing time calculated by the processing time calculation processing unit 230 is delayed. For example, when the response processing time indicating the system load becomes greater than or equal to the threshold value α due to the slow response time, the method switching determination unit 255 changes from the semi-synchronous writing method (semi-synchronous method) to the asynchronous writing method (asynchronous method). Switch the writing method to As described above, the database management system 500 can execute the write command process by changing the write method to the semi-synchronous write method.

また、本実施形態では、データベース管理システム500の負荷が軽減した場合にも、書き込み方式を切り替えて変更することができるようになっている。具体的には、データベース管理システム500は、システム全体の負荷の軽減によって書き込み方式を非同期の書き込み方式から半同期の書き込み方式に切り替えたり、書き込み方式を半同期の書き込み方式から完全同期の書き込み方式に切り替えることができる。以下、どのように書き込み方式を切り替えるか説明する。   In the present embodiment, even when the load on the database management system 500 is reduced, the writing method can be switched and changed. Specifically, the database management system 500 switches the writing method from the asynchronous writing method to the semi-synchronous writing method by reducing the load on the entire system, or changes the writing method from the semi-synchronous writing method to the fully synchronous writing method. Can be switched. Hereinafter, how to switch the writing method will be described.

図7は、半同期の書き込み方式から完全同期の書き込み方式に書き込み方式を切り替える場合を示した説明図である。   FIG. 7 is an explanatory diagram showing a case where the writing method is switched from the semi-synchronous writing method to the fully synchronous writing method.

図7に示すように、半同期の書き込み方式が設定されているデータベース管理システム500全体の負荷が閾値β未満になった場合、方式切替判断部255は、書き込み方式を完全同期の書き込み方式に切り替えることを示している。   As shown in FIG. 7, when the load of the entire database management system 500 in which the semi-synchronous writing method is set becomes less than the threshold β, the method switching determination unit 255 switches the writing method to the completely synchronous writing method. It is shown that.

これは、データベース管理システム500におけるシステムの負荷が下がったことに伴い、マスターサーバ200の書込要求に対し、性能保証ラインSLを超えない範囲で一定の性能を満たしつつ、完全同期の書き込み方式にてデータを書き込むように書き込み方式を切り替えることを意味している。   This is because the system load in the database management system 500 is reduced and the write request of the master server 200 satisfies a certain performance within a range not exceeding the performance guarantee line SL, and is in a completely synchronous writing method. This means that the writing method is switched to write data.

なお、データベース管理システム500が非同期の書き込み方式で設定されている場合にも同様に、システム全体の負荷を示す応答時間が閾値β未満まで下がった場合は、方式切替判断部255は、書き込み方式を半同期の書き込み方式に変更することができる。   Similarly, when the database management system 500 is set by an asynchronous writing method, when the response time indicating the load of the entire system falls below the threshold β, the method switching determination unit 255 changes the writing method. It can be changed to a semi-synchronous writing method.

図8は、データベース管理システム500の負荷に応じて、3種類の書き込み方式のうち、いずれかの最適な書き込み方式に切り替える切替方法を示した説明図である。   FIG. 8 is an explanatory diagram showing a switching method for switching to any one of the three write methods according to the load of the database management system 500.

データベース管理システム500の処理時間算出処理部230(図2)は、例えば、1分間に1回や2分間に1回など定期的に応答処理時間の平均値を算出している。図8に示すように、処理時間算出処理部230で算出した応答処理時間の平均値がそれぞれの書き込み方式に割り当てられた閾値に到達したとき、方式切替判断部255は、書込方式切替部250において書き込み方式を切り替える。   The processing time calculation processing unit 230 (FIG. 2) of the database management system 500 calculates an average value of response processing times periodically, for example, once per minute or once every two minutes. As shown in FIG. 8, when the average value of the response processing times calculated by the processing time calculation processing unit 230 reaches the threshold value assigned to each writing method, the method switching determination unit 255 displays the writing method switching unit 250. To switch the writing method.

具体的には、方式切替判断部255は、完全同期の書き込み方式の場合において応答処理時間が閾値α以上になる場合には半同期の書き込み方式に切り替える一方、半同期の書き込み方式の場合において応答処理時間が閾値β1未満になる場合には、完全同期の書き込み方式に切り替える。また、方式切替判断部255は、半同期の書き込み方式の場合において応答処理時間が閾値α以上になる場合には非同期の書き込み方式に切り替える一方、非同期の書き込み方式の場合において応答処理時間が閾値β2未満になる場合には、半同期の書き込み方式に切り替える。   Specifically, the method switching determination unit 255 switches to the semi-synchronous writing method when the response processing time is equal to or greater than the threshold value α in the case of the completely synchronous writing method, while responding in the case of the semi-synchronous writing method. When the processing time is less than the threshold β1, the mode is switched to a completely synchronous writing method. Further, the method switching determination unit 255 switches to the asynchronous writing method when the response processing time is equal to or greater than the threshold value α in the case of the semi-synchronous writing method, while the response processing time is set to the threshold value β2 in the case of the asynchronous writing method. If it is less, switch to the semi-synchronous writing method.

なお、図8の閾値β1は、半同期の書き込み方式における下限を示す時間であり、閾値β2は、非同期の書き込み方式における下限を示す時間である。そのため、閾値β1と閾値β2は同値であってもよく、また、異なる値であってもよい。   Note that the threshold β1 in FIG. 8 is a time indicating the lower limit in the semi-synchronous writing method, and the threshold β2 is a time indicating the lower limit in the asynchronous writing method. Therefore, the threshold value β1 and the threshold value β2 may be the same value or different values.

また、システム全体の負荷を示す応答処理時間は、マスターデータベース215にデータを書き込む処理時間と、スレーブサーバ300からの応答時間とによって算出されているので、例えば、スレーブサーバ300からの応答時間に基づいて、閾値β1や閾値β2を設定するようにしてもよい。具体的には、半同期の書き込み方式の場合において最初に得られた応答時間の50%の時間を閾値β1とし、非同期の書き込み方式の場合において最初に得られた応答時間の50%の時間を閾値β2とすることができる。   Further, the response processing time indicating the load of the entire system is calculated based on the processing time for writing data in the master database 215 and the response time from the slave server 300. For example, the response processing time is based on the response time from the slave server 300. Thus, the threshold value β1 and the threshold value β2 may be set. Specifically, 50% of the response time obtained first in the case of the semi-synchronous writing method is set as a threshold value β1, and 50% of the response time obtained first in the case of the asynchronous writing method is set as the threshold value β1. The threshold value β2 can be set.

また、本実施形態では、閾値β1と閾値β2を有するだけでなく、書き込み方式を切り替えたときに閾値β1と閾値β2の値を動的に調整し、書き込み方式の切り替えによって切替処理が振動しないように閾値β1と閾値β2に調整時間を加算したり引き算するようにしてもよい。   In the present embodiment, not only has the threshold β1 and the threshold β2, but also the values of the threshold β1 and the threshold β2 are dynamically adjusted when the writing method is switched so that the switching process does not vibrate by switching the writing method. The adjustment time may be added to or subtracted from the threshold value β1 and the threshold value β2.

例えば、方式切替判断部255は、完全同期の書き込み方式に切り替えた後、システム全体の負荷に基づいて、所定の時間内に完全同期の書き込み方式から半同期の書き込み方式に書き込み方式を切り替えた場合は、閾値β1(第2の閾値時間)から第1の調整時間だけ引き下げた時間に第2の閾値時間を更新する。   For example, after switching to the completely synchronous writing method, the method switching determining unit 255 switches the writing method from the fully synchronous writing method to the semi-synchronous writing method within a predetermined time based on the load of the entire system. Updates the second threshold time to a time reduced from the threshold β1 (second threshold time) by the first adjustment time.

これにより、データベース管理システム500は、方式切替判断部255により半同期の書き込み方式に切り替えられたとき、書込み方式を半同期の書き込み方式で安定させることができる。なお、この場合、第1の調整時間は、例えば、5msとすることができる。また、所定の時間とは、1分や2分を設定することができる。   Thereby, the database management system 500 can stabilize the writing method with the semi-synchronous writing method when the method switching determination unit 255 switches to the semi-synchronous writing method. In this case, the first adjustment time can be set to 5 ms, for example. The predetermined time can be set to 1 minute or 2 minutes.

また、方式切替判断部255は、半同期の書き込み方式に切り替えた後、システム全体の負荷に基づいて、半同期の書き込み方式から完全同期の書き込み方式に書き込み方式を切り替えた場合は、閾値β1に第2の調整時間を加算した時間に閾値β1を更新する。   Further, after switching to the semi-synchronous writing method, the method switching determining unit 255 sets the threshold β1 when the writing method is switched from the semi-synchronous writing method to the fully synchronous writing method based on the load of the entire system. The threshold value β1 is updated to the time obtained by adding the second adjustment time.

これにより、データベース管理システム500は、方式切替判断部255によって書き込み方式が切り替えた後、閾値β1の値を動的に調整することにより、半同期の書き込み方式から完全同期の書き込み方式に切り替えられやすくする。この場合、第2の調整時間は、例えば、2msとすることができる。   Thus, the database management system 500 can easily switch from the semi-synchronous writing method to the fully synchronous writing method by dynamically adjusting the value of the threshold value β1 after the writing method is switched by the method switching determination unit 255. To do. In this case, the second adjustment time can be set to 2 ms, for example.

なお、方式切替判断部255は、第1の調整時間には、第2の調整時間よりも大きい調整時間を設定することが望ましい。   In addition, it is desirable that the method switching determination unit 255 sets an adjustment time that is larger than the second adjustment time as the first adjustment time.

また、閾値β1について動的に調整する方法について説明したが、閾値β2についても同様に、動的に調整することができる。   Further, although the method of dynamically adjusting the threshold value β1 has been described, the threshold value β2 can also be adjusted dynamically in the same manner.

具体的には、方式切替判断部255は、半同期の書き込み方式に切り替えた後、システム全体の負荷に基づいて、所定の時間内に半同期の書き込み方式から非同期の書き込み方式に書き込み方式を切り替えた場合は、閾値β2(第3の閾値時間)から第3の調整時間だけ引き下げた時間に閾値β2を更新する。   Specifically, after switching to the semi-synchronous writing method, the method switching determination unit 255 switches the writing method from the semi-synchronous writing method to the asynchronous writing method within a predetermined time based on the load of the entire system. If the threshold value β2 is updated, the threshold value β2 is updated to a time obtained by lowering the threshold value β2 (third threshold time) by the third adjustment time.

また、方式切替判断部255は、非同期の書き込み方式に切り替えた後、システム全体の負荷に基づいて、非同期の書き込み方式から半同期の書き込み方式に書き込み方式を切り替えた場合は、閾値β2に第4の調整時間を加算した時間に閾値β2を更新するようにしてもよい。   In addition, after switching to the asynchronous writing method, the method switching determining unit 255 sets the threshold β2 to the fourth threshold when the writing method is switched from the asynchronous writing method to the semi-synchronous writing method based on the load of the entire system. The threshold value β2 may be updated at a time obtained by adding the adjustment times.

なお、第3の調整時間は、第1の調整時間と同等の時間を設定することができ、また、第4の調整時間は、第2の調整時間と同等の時間を設定することができる。   The third adjustment time can be set to the same time as the first adjustment time, and the fourth adjustment time can be set to the same time as the second adjustment time.

次に、マスターサーバ200とスレーブサーバ300のハードウエアの構成について、それぞれ説明する。   Next, the hardware configuration of the master server 200 and the slave server 300 will be described.

図9は、本実施形態に係るマスターサーバ200のハードウエアの構成を示したハードウエアブロック図である。   FIG. 9 is a hardware block diagram showing a hardware configuration of the master server 200 according to the present embodiment.

図9に示すように、マスターサーバ200は、CPU(Central Processing Unit)260、ROM(Read Only Memory)262、RAM(Random Access Memory)264、ネットワークインターフェース部266、操作入力部268、表示部270、記憶部272、内部バス274などを備えて構成されている。   As shown in FIG. 9, the master server 200 includes a CPU (Central Processing Unit) 260, a ROM (Read Only Memory) 262, a RAM (Random Access Memory) 264, a network interface unit 266, an operation input unit 268, a display unit 270, A storage unit 272, an internal bus 274, and the like are provided.

CPU260は、ROM262に格納されている各種プログラムをRAM264にロードして、そのプログラムを展開することにより、各種プログラムの機能を実現することできる。RAM264は、ワークエリア(作業用メモリ)として利用されるようになっている。ROM262は、各種プログラムを格納するようになっている。ROM262に格納されている各種プログラムには、図2で示した各種機能を実現するためのプログラムが含まれる。   The CPU 260 can implement various program functions by loading various programs stored in the ROM 262 into the RAM 264 and expanding the programs. The RAM 264 is used as a work area (working memory). The ROM 262 stores various programs. Various programs stored in the ROM 262 include programs for realizing various functions shown in FIG.

ネットワークインターフェース部266は、ネットワーク400(図1)を介して、クライアント端末100(図2)から書込命令を受信したり、スレーブサーバ300に書込命令を送信するためのインターフェース部である。   The network interface unit 266 is an interface unit for receiving a write command from the client terminal 100 (FIG. 2) and transmitting the write command to the slave server 300 via the network 400 (FIG. 1).

操作入力部268は、スレーブサーバ300(図2)をマスターサーバ200に登録するための設定登録を行ったり、クライアント端末100の書込命令を受け付けるための登録情報を編集するための入力装置である。なお、この操作入力部268は、キーボードやマウスなどにより構成されている。   The operation input unit 268 is an input device for performing setting registration for registering the slave server 300 (FIG. 2) in the master server 200 and editing registration information for receiving a write command of the client terminal 100. . The operation input unit 268 includes a keyboard, a mouse, and the like.

表示部270は、書込命令の受信状況やスレーブサーバ300に書込命令を実施している際の進行状況などを表示するための表示装置である。この表示部は、液晶ディスプレイやモニタなどにより構成されている。   The display unit 270 is a display device for displaying the reception status of the write command and the progress status when the slave server 300 is executing the write command. This display unit is configured by a liquid crystal display, a monitor, or the like.

記憶部272は、マスターデータベース215(図2)を構成する記憶領域であり、RAMやハードディスクなどにより構成されている。   The storage unit 272 is a storage area that configures the master database 215 (FIG. 2), and includes a RAM, a hard disk, and the like.

内部バス274は、CPU260がマスターサーバ200全体を統括制御するように、各構成要素と接続されている。   The internal bus 274 is connected to each component so that the CPU 260 controls the entire master server 200.

図10は、本実施形態に係るスレーブサーバ300のハードウエアの構成を示したハードウエアブロック図である。   FIG. 10 is a hardware block diagram showing a hardware configuration of the slave server 300 according to the present embodiment.

図10に示すように、スレーブサーバ300は、CPU340、ROM342、RAM344、ネットワークインターフェース部346、操作入力部348、表示部350、記憶部352、内部バス354などを備えて構成されている。   As shown in FIG. 10, the slave server 300 includes a CPU 340, a ROM 342, a RAM 344, a network interface unit 346, an operation input unit 348, a display unit 350, a storage unit 352, an internal bus 354, and the like.

CPU340は、ROM342に格納されている各種プログラムをRAM344にロードして、そのプログラムを展開することにより、各種プログラムの機能を実現することできる。RAM344は、ワークエリア(作業用メモリ)として利用されるようになっている。ROM342は、各種プログラムを格納するようになっている。ROM342に格納されている各種プログラムには、図2で示した各種機能を実現するためのプログラムが含まれる。   The CPU 340 can implement various program functions by loading various programs stored in the ROM 342 into the RAM 344 and expanding the programs. The RAM 344 is used as a work area (working memory). The ROM 342 stores various programs. The various programs stored in the ROM 342 include programs for realizing the various functions shown in FIG.

ネットワークインターフェース部346は、ネットワーク400(図1)を介して、マスターサーバ200から書込命令を受信したり、マスターサーバ200(図2)に書込応答を送信するためのインターフェース部である。   The network interface unit 346 is an interface unit for receiving a write command from the master server 200 and transmitting a write response to the master server 200 (FIG. 2) via the network 400 (FIG. 1).

操作入力部348は、マスターサーバ200の設定登録を行ったり、クライアント端末100(図2)の書込命令を受け付けるための登録情報を編集するための入力装置である。なお、この操作入力部348は、キーボードやマウスなどにより構成されている。   The operation input unit 348 is an input device for performing setting registration of the master server 200 and editing registration information for receiving a write command of the client terminal 100 (FIG. 2). The operation input unit 348 includes a keyboard, a mouse, and the like.

表示部350は、書込命令の受信状況やスレーブサーバ300に書込命令を実施している進行状況などを表示することができる表示装置である。この表示部は、液晶ディスプレイやモニタなどにより構成されている。   The display unit 350 is a display device that can display the reception status of the write command and the progress status of executing the write command on the slave server 300. This display unit is configured by a liquid crystal display, a monitor, or the like.

記憶部352は、スレーブデータベース315を構成する記憶領域であり、RAMやハードディスクなどにより構成されている。   The storage unit 352 is a storage area that configures the slave database 315, and includes a RAM, a hard disk, and the like.

内部バス354は、CPU340がスレーブサーバ300全体を統括制御するように、各構成要素に接続されている。   The internal bus 354 is connected to each component so that the CPU 340 controls the entire slave server 300.

(書込方式切替処理)
次に、データベース管理システム500において、方式切替判断部255が書き込み方式を切り替える書込方式切替処理について説明する。
(Writing method switching process)
Next, a writing method switching process in which the method switching determination unit 255 switches the writing method in the database management system 500 will be described.

図11は、データベース管理システム500の方式切替判断部255が書き込み方式を切り替える書込方式切替処理を示したフローチャートである。図11において、Sに数字を付した符号は、フローチャートの各ステップを示している。   FIG. 11 is a flowchart showing a writing method switching process in which the method switching determination unit 255 of the database management system 500 switches the writing method. In FIG. 11, reference numerals with numbers added to S indicate steps in the flowchart.

図11に示すように、マスターサーバ200の方式切替判断部255は、応答処理時間を算出するために、所定の一定時間が経過したか否か待ち受ける(ステップS301)。なお、所定の一定時間とは、例えば、1分や2分などの時間を所定の一定時間として設定する。また、書き込み方式の初期値は、完全同期の書き込み方式が設定されている。   As illustrated in FIG. 11, the method switching determination unit 255 of the master server 200 waits for a predetermined fixed time to calculate the response processing time (step S301). Note that the predetermined constant time is set, for example, as a predetermined constant time such as 1 minute or 2 minutes. The initial value of the writing method is set to a completely synchronous writing method.

方式切替判断部255は、所定の一定時間が経過した場合(ステップS301のYes)、処理時間算出処理部230において、書込実行部210に記憶されているデータベース215書き込み要した処理時間と書込命令に対する応答時間とを算出(取得)する。そして、方式切替判断部255は、負荷推定部240において、処理時間と応答時間とに基づいて、応答処理時間の平均値(これを平均応答処理時間ともいう。)を算出する(ステップS303)。 When the predetermined switching time has elapsed (Yes in step S301), the method switching determination unit 255 determines the processing time required for writing in the database 215 stored in the writing execution unit 210 in the processing time calculation processing unit 230. The response time for the write command is calculated (obtained). Then, the system switching determination unit 255 calculates an average value of response processing times (also referred to as average response processing time) based on the processing time and the response time in the load estimation unit 240 (step S303).

方式切替判断部255は、負荷推定部240において平均応答処理時間を算出すると(ステップS303)、その平均応答処理時間からシステム全体(データベース管理システム500全体)の負荷を推定する。方式切替判断部255は、書き込み方式の初期値が完全同期の書き込み方式(完全同期式)に設定されているため(ステップS305のNo)、完全同期の書き込み方式であって、かつ平均応答処理時間が閾値α以上か否かを判定する(ステップS307)。   When the load estimation unit 240 calculates the average response processing time (step S303), the method switching determination unit 255 estimates the load of the entire system (the entire database management system 500) from the average response processing time. Since the initial value of the writing method is set to a completely synchronous writing method (completely synchronous method) (No in step S305), the method switching determination unit 255 is a completely synchronous writing method and has an average response processing time. Is greater than or equal to the threshold value α (step S307).

方式切替判断部255は、書き込み方式が完全同期の書き込み方式であって、かつデータベース管理システム500全体の負荷を示す平均応答処理時間が閾値α未満の場合には(ステップS307のNo)、半同期の書き込み方式に切り替えるほどはシステム全体の負荷は大きくないと判定し、ステップS301に戻り、完全同期の書き込み方式でデータのレプリケーションを実行する。   When the writing method is a completely synchronous writing method and the average response processing time indicating the load of the entire database management system 500 is less than the threshold value α (No in step S307), the method switching determination unit 255 is semi-synchronous. It is determined that the load on the entire system is not so large as to switch to the write method, and the process returns to step S301, and data replication is executed using the completely synchronous write method.

一方、方式切替判断部255は、現在の書き込み方式が完全同期の書き込み方式(完全同期式)で、かつ平均応答処理時間が閾値α以上の場合には(ステップS307のYes)、データベース管理システム500全体の負荷では半同期の書き込み方式が適切と判定し、マスターサーバ200がスレーブデータベース315に半同期の書き込み方式(半同期式)で書き込むように切り替えを決定する(ステップS309)。   On the other hand, when the current writing method is a completely synchronous writing method (completely synchronous method) and the average response processing time is equal to or greater than the threshold value α (Yes in step S307), the method switching determination unit 255 is the database management system 500. It is determined that the semi-synchronous writing method is appropriate for the entire load, and switching is determined so that the master server 200 writes to the slave database 315 by the semi-synchronous writing method (semi-synchronous method) (step S309).

また、本実施形態実施に係るデータベース管理システム500では、半同期の書き込み方式に切り替えを決定した場合には、閾値β1の時間(第2の閾値時間)から所定の時間(第1の調整時間)だけ引き下げて、その引き下げた値に閾値β1を更新する(ステップS311)。例えば、方式切替判断部255は、閾値β1の時間から5msを引き下げた値を閾値β1とする。   Further, in the database management system 500 according to the present embodiment, when switching to the semi-synchronous writing method is determined, a predetermined time (first adjustment time) from the time of the threshold value β1 (second threshold time). The threshold value β1 is updated to the lowered value (step S311). For example, the method switching determination unit 255 sets a value obtained by lowering 5 ms from the time of the threshold value β1 as the threshold value β1.

これにより、本実施形態に係るデータベース管理システム500は、閾値β1をシステム全体の負荷(システム負荷指標値)に基づいて動的に調整することができるので、閾値β1の近傍で書き込み方式を切り替えることによる不安定な振動(バタツキ動作)を回避することができる。   Thereby, the database management system 500 according to the present embodiment can dynamically adjust the threshold value β1 based on the load of the entire system (system load index value), so that the writing method is switched in the vicinity of the threshold value β1. Unstable vibration (flapping operation) due to can be avoided.

データベース管理システム500では、方式切替判断部255の判定結果に基づいて、書込方式切替部250からスレーブサーバ300の方式変更要求受付部330に書き込み方式を切り替える書込方式切替要求(切替変更指示)を送信する(ステップS313)。   In the database management system 500, based on the determination result of the method switching determination unit 255, a writing method switching request (switching change instruction) for switching the writing method from the writing method switching unit 250 to the method change request reception unit 330 of the slave server 300. Is transmitted (step S313).

そして、書込方式切替部250では、スレーブサーバ300の方式変更要求受付部330から書き込み方式を切り替えた旨の応答を待ち受けており(ステップS315)、書き込み方式を切り替えた旨の応答を受信した場合には(ステップS315のYes)、レプリケーション実行部220の書込命令送信部222の書き込み方式を半同期の書込み方式に切り替えて(ステップS317)、ステップS301に戻る。   Then, the writing method switching unit 250 waits for a response indicating that the writing method has been switched from the method change request accepting unit 330 of the slave server 300 (step S315), and has received a response indicating that the writing method has been switched. (Yes in step S315), the write method of the write command transmission unit 222 of the replication execution unit 220 is switched to the semi-synchronous write method (step S317), and the process returns to step S301.

ステップS301に戻った以降の処理は、書込み方式が半同期の書き込み方式に切り替えられているので、方式切替判断部255は、所定の一定時間経過ごとに平均応答処理時間を算出し(ステップS303)、システム全体の負荷を判定する(ステップS305)。   In the processing after returning to step S301, since the writing method is switched to the semi-synchronous writing method, the method switching determination unit 255 calculates the average response processing time every predetermined time (step S303). The load on the entire system is determined (step S305).

すなわち、方式切替判断部255は、書き込み方式が半同期の書き込み方式で、かつ平均応答処理時間が閾値β1よりも小さい場合には(ステップS305のYes)、データベース管理システム500全体の負荷は軽いと判定し、スレーブサーバ300の書き込み方式を半同期の書き込み方式から完全同期の書き込み方式(完全同期式)に切り替えを決定する(ステップS319)。   In other words, when the writing method is a semi-synchronous writing method and the average response processing time is smaller than the threshold β1 (Yes in step S305), the method switching determination unit 255 determines that the load on the entire database management system 500 is light. It is determined, and switching of the writing method of the slave server 300 from the semi-synchronous writing method to the fully synchronous writing method (fully synchronous method) is determined (step S319).

この場合、データベース管理システム500は、システム全体の負荷に基づいて、閾値αの時間(第1の閾値時間)内にスレーブサーバ300がスレーブデータベース315に所定のデータを書き込むことができると判定し、スレーブサーバ300のスレーブデータベース315に完全同期の書き込み方式で書き込むように切り替えを決定する。   In this case, the database management system 500 determines that the slave server 300 can write predetermined data in the slave database 315 within the time of the threshold value α (first threshold time) based on the load of the entire system. The switching is determined so as to write to the slave database 315 of the slave server 300 by a completely synchronous writing method.

また、本実施形態実施に係るデータベース管理システム500では、半同期の書き込み方式から完全同期の書き込み方式に切り替えを決定した場合は、閾値β1の時間に所定の時間(第2の調整時間)を加算した閾値β1の値に更新する(ステップS321)。例えば、方式切替判断部255は、閾値β1の時間に2msを加算した値を閾値β1とする。また、第1の調整時間と第2の調整時間との関係では、第1の調整時間には、第2の調整時間よりも大きい調整時間を設定することが望ましい。   In addition, in the database management system 500 according to the present embodiment, when switching from the semi-synchronous writing method to the fully synchronous writing method is determined, a predetermined time (second adjustment time) is added to the time of the threshold β1. The updated threshold value β1 is updated (step S321). For example, the method switching determination unit 255 sets a value obtained by adding 2 ms to the time of the threshold value β1 as the threshold value β1. Further, in the relationship between the first adjustment time and the second adjustment time, it is desirable to set an adjustment time that is larger than the second adjustment time as the first adjustment time.

これにより、本実施形態に係るデータベース管理システム500は、閾値β1(第2の閾値時間)をシステム全体の負荷に基づいて動的に調整することができるので、閾値β1の近傍で書き込み方式を切り替えることによる不安定な振動(バタツキ動作)を回避することができる。   As a result, the database management system 500 according to the present embodiment can dynamically adjust the threshold value β1 (second threshold time) based on the load of the entire system, so the write method is switched in the vicinity of the threshold value β1. Unstable vibration (fluttering operation) due to this can be avoided.

一方、現在の書き込み方式が半同期の書き込み方式(半同期式)で、かつ平均応答処理時間が閾値β1未満でない場合は(ステップS305のNo)、方式切替判断部255は、データベース管理システム500全体の負荷は完全同期の書き込み方式に切り替えるほどは軽くないと判定し、システム全体の負荷がそれぞれの閾値を満たすまで継続して上記フローを繰り返す。   On the other hand, if the current writing method is a semi-synchronous writing method (semi-synchronous method) and the average response processing time is not less than the threshold value β1 (No in step S305), the method switching determination unit 255 performs the entire database management system 500. It is determined that the load is not light enough to switch to the completely synchronous writing method, and the above-described flow is repeated until the load of the entire system satisfies the respective thresholds.

以上説明したように、本実施形態実施に係るデータベース管理システム500は、方式切替判断部255において平均応答処理時間を算出し、その算出された平均応答処理時間に基づいて、データベース管理システム500全体の負荷を推定する。そして、方式切替判断部255は、完全同期の書き込み方式のときにおいて、平均応答処理時間が予め設定された閾値α未満の場合は、完全同期の書き込み方式のままスレーブデータベース315にデータを書き込む一方、平均応答処理時間が閾値α以上の場合には、半同期の書き込み方式でスレーブデータベース315にデータを書き込むように切り替える。   As described above, the database management system 500 according to the present embodiment calculates the average response processing time in the method switching determination unit 255, and based on the calculated average response processing time, the database management system 500 as a whole. Estimate the load. Then, when the average response processing time is less than the preset threshold value α in the completely synchronous writing method, the method switching determining unit 255 writes data to the slave database 315 while maintaining the completely synchronized writing method. When the average response processing time is equal to or greater than the threshold value α, switching is performed so that data is written to the slave database 315 by a semi-synchronous writing method.

これにより、本実施形態に係るデータベース管理システム500は、完全同期の書き込み方式で書き込むことができる状態が多くなり、スレーブサーバ300のスレーブデータベース315に、書き込むべきデータの損失する可能性を低減させることができる。   As a result, the database management system 500 according to the present embodiment increases the number of states in which data can be written using a completely synchronous writing method, and reduces the possibility of data to be written lost in the slave database 315 of the slave server 300. Can do.

また、本実施形態では、非同期の書き込み方式を組み合わせて設けることができるので、非同期の書き込み方式が設けられた場合の非同期の書き込み方式と、半同期の書き込み方式とを切り替える処理について説明する。   In the present embodiment, since asynchronous writing methods can be provided in combination, a process of switching between an asynchronous writing method and a semi-synchronous writing method when the asynchronous writing method is provided will be described.

なお、この場合の書き込み方式を切り替える処理については、図11と似たような処理になるため、説明を適宜省略し、異なる処理のみについて異なる符号を付して説明する。具体的には、図11のフローチャートにおいて、ステップS305からステップS311までの処理と、ステップS319およびステップ321が異なるため、これらの処理を中心に説明する。   Note that the processing for switching the writing method in this case is similar to that in FIG. 11, and thus description thereof will be omitted as appropriate, and only different processing will be described with different reference numerals. Specifically, in the flowchart of FIG. 11, the processes from step S305 to step S311 are different from steps S319 and 321, and therefore, these processes will be mainly described.

図12は、データベース管理システム500の方式切替判断部255が、書き込み方式を非同期の書き込み方式か半同期の書き込み方式に切り替える書込方式切替処理を示したフローチャートである。図12において、Sに数字を付した符号は、フローチャートの各ステップを示している。   FIG. 12 is a flowchart showing a writing method switching process in which the method switching determination unit 255 of the database management system 500 switches the writing method to an asynchronous writing method or a semi-synchronous writing method. In FIG. 12, reference numerals with numbers added to S indicate steps in the flowchart.

図12に示すように、例えば、マスターサーバ200の方式切替判断部255は、半同期の書き込み方式が設定されている場合において、処理時間算出処理部230において、書き込みに要した処理時間とスレーブサーバ300からの応答時間とを算出すると、負荷推定部240において平均応答処理時間を算出し、システム全体の負荷を推定する(ステップS303)。方式切替判断部255は、半同期の書き込み方式が設定されているため(ステップS401のNo)、半同期の書き込み方式であって、かつ平均応答処理時間が閾値α以上か否かを判定する(ステップS403)。   As shown in FIG. 12, for example, when the semi-synchronous writing method is set, the method switching determination unit 255 of the master server 200 uses the processing time required for writing and the slave server in the processing time calculation processing unit 230. When the response time from 300 is calculated, the load estimation unit 240 calculates the average response processing time and estimates the load of the entire system (step S303). Since the semi-synchronous writing method is set (No in step S401), the method switching determining unit 255 determines whether the method is a semi-synchronous writing method and the average response processing time is equal to or greater than the threshold value α ( Step S403).

方式切替判断部255は、書き込み方式が半同期の書き込み方式であって、かつデータベース管理システム500全体の負荷を示す平均応答処理時間が閾値α未満の場合には(ステップS403のNo)、非同期の書き込み方式に切り替えるほどシステム全体の負荷は大きくないと判定し、ステップS301に戻り、半同期の書き込み方式でデータのレプリケーションを実行する。   If the write method is a semi-synchronous write method and the average response processing time indicating the overall load of the database management system 500 is less than the threshold value α (No in step S403), the method switching determination unit 255 is asynchronous. It is determined that the load on the entire system is not so large as to switch to the writing method, and the process returns to step S301 to execute data replication by the semi-synchronous writing method.

一方、方式切替判断部255は、現在の書き込み方式が半同期の書き込み方式(半同期式)で、かつ平均応答処理時間が閾値α以上の場合には(ステップS403のYes)、データベース管理システム500全体の負荷では非同期の書き込み方式が適切と判定し、マスターサーバ200がスレーブデータベース315に非同期の書き込み方式(非同期式)で書き込むように切り替えを決定する(ステップS405)。   On the other hand, when the current writing method is a semi-synchronous writing method (semi-synchronous method) and the average response processing time is equal to or greater than the threshold value α (Yes in step S403), the method switching determination unit 255 determines the database management system 500. It is determined that the asynchronous writing method is appropriate for the entire load, and switching is determined so that the master server 200 writes data to the slave database 315 using the asynchronous writing method (asynchronous method) (step S405).

また、本実施形態実施に係るデータベース管理システム500では、非同期の書き込み方式に切り替えを決定した場合には、閾値β2の時間(第3の閾値時間)から所定の時間(第3の調整時間)だけ引き下げて、その引き下げた値に閾値β2を更新する(ステップS407)。例えば、方式切替判断部255は、閾値β2の時間から5msを引き下げた値を閾値β2とする。   In addition, in the database management system 500 according to the present embodiment, when switching to the asynchronous writing method is determined, only a predetermined time (third adjustment time) from the time of the threshold β2 (third threshold time). The threshold value β2 is updated to the lowered value (step S407). For example, the method switching determination unit 255 sets a value obtained by lowering 5 ms from the time of the threshold value β2 as the threshold value β2.

このように、本実施形態に係るデータベース管理システム500は、閾値β2をシステム全体の負荷(システム負荷指標値)に基づいて動的に調整することができるので、閾値β2の近傍で書き込み方式を切り替えることによる不安定な振動(バタツキ動作)を回避することができる。   As described above, the database management system 500 according to the present embodiment can dynamically adjust the threshold value β2 based on the load of the entire system (system load index value), so that the writing method is switched in the vicinity of the threshold value β2. Unstable vibration (fluttering operation) due to this can be avoided.

また、ステップS405で非同期式に切り替えを決定し、その後、ステップS317で書き込み方式を切り替えた後にステップS301に戻ってきた場合には、書き込み方式が非同期の書き込み方式に切り替えられている。方式切替判断部255は、所定の一定時間経過ごとに平均応答処理時間を算出して(ステップS303)、システムの負荷を判定する(ステップS401)。   In addition, when switching to the asynchronous method is determined in step S405, and then the writing method is switched in step S317 and then the process returns to step S301, the writing method is switched to the asynchronous writing method. The method switching determination unit 255 calculates an average response processing time every predetermined time (step S303) and determines the system load (step S401).

方式切替判断部255は、書き込み方式が非同期の書き込み方式で、かつ平均応答処理時間が閾値β2よりも小さい場合は(ステップS401のYes)、データベース管理システム500全体の負荷は軽いと判定し、スレーブサーバ300の書き込み方式を非同期の書き込み方式から半同期の書き込み方式(半同期式)に切り替えを決定する(ステップS409)。   If the writing method is an asynchronous writing method and the average response processing time is smaller than the threshold β2 (Yes in step S401), the method switching determination unit 255 determines that the load on the entire database management system 500 is light, and the slave The server 300 determines to switch the writing method from the asynchronous writing method to the semi-synchronous writing method (semi-synchronous method) (step S409).

この場合、データベース管理システム500は、システム全体の負荷に基づいて、閾値αの時間(第1の閾値時間)内にスレーブサーバ300がスレーブデータベース315に所定のデータを書き込むことができると判定し、スレーブサーバ300のスレーブデータベース315に半同期の書き込み方式で書き込むように切り替えを決定する。   In this case, the database management system 500 determines that the slave server 300 can write predetermined data in the slave database 315 within the time of the threshold value α (first threshold time) based on the load of the entire system. Switching is determined so as to write to the slave database 315 of the slave server 300 by a semi-synchronous writing method.

また、本実施形態実施に係るデータベース管理システム500では、非同期の書き込み方式から半同期の書き込み方式に切り替えを決定した場合には、閾値β2の時間に所定の時間(第4の調整時間)を加算した閾値β2の値に更新する(ステップS411)。例えば、方式切替判断部255は、閾値β2の時間に2msを加算した値を閾値β2とする。また、第3の調整時間と第4の調整時間との関係では、第3の調整時間には、第4の調整時間よりも大きい調整時間を設定することが望ましい。   In the database management system 500 according to the present embodiment, when it is determined to switch from the asynchronous write method to the semi-synchronous write method, a predetermined time (fourth adjustment time) is added to the time of the threshold β2. The updated threshold value β2 is updated (step S411). For example, the method switching determination unit 255 sets a value obtained by adding 2 ms to the time of the threshold value β2 as the threshold value β2. Further, in the relationship between the third adjustment time and the fourth adjustment time, it is desirable to set an adjustment time larger than the fourth adjustment time as the third adjustment time.

これにより、本実施形態に係るデータベース管理システム500は、閾値β2(第3の閾値時間)をシステム全体の負荷に基づいて動的に調整することができるので、閾値β2の近傍で書き込み方式を切り替えることによる不安定な振動(バタツキ動作)を回避することができる。   As a result, the database management system 500 according to the present embodiment can dynamically adjust the threshold value β2 (third threshold time) based on the load of the entire system, so the write method is switched in the vicinity of the threshold value β2. Unstable vibration (fluttering operation) due to this can be avoided.

一方、現在の書き込み方式が非同期の書き込み方式(非同期式)で、かつ平均応答処理時間が閾値β2未満でない場合は(ステップS401のNo)、方式切替判断部255は、データベース管理システム500全体の負荷は半同期の書き込み方式に切り替えるほど軽くないと判定し、システム全体の負荷がそれぞれの閾値を満たすまで継続して上記フローを繰り返す。   On the other hand, when the current writing method is an asynchronous writing method (asynchronous method) and the average response processing time is not less than the threshold β2 (No in step S401), the method switching determination unit 255 determines the load on the entire database management system 500. Is determined not to be light enough to switch to the semi-synchronous writing method, and the above flow is repeated until the load of the entire system satisfies the respective thresholds.

そして、書き込み方式の切り替えが決定された場合、データベース管理システム500は、マスターサーバ200のレプリケーション実行部220からスレーブサーバ300の書込命令受信部310に書き込み方式を切り替える書込方式切替要求を送信する(ステップS317)。   Then, when switching of the write method is determined, the database management system 500 transmits a write method switch request for switching the write method from the replication execution unit 220 of the master server 200 to the write command receiving unit 310 of the slave server 300. (Step S317).

このように、本実施形態に係るデータベース管理システム500は、方式切替判断部255が推定するシステム全体の負荷に基づいて、書き込み方式を非同期の書き込み方式か半同期の書き込み方式かに切り替えることができる。   As described above, the database management system 500 according to the present embodiment can switch the writing method to the asynchronous writing method or the semi-synchronous writing method based on the overall system load estimated by the method switching determination unit 255. .

なお、図11のステップS311およびS321と図12のステップS407およびS411において、それぞれ調整時間を加算や減算することにより閾値β1および閾値β2の引き上げや引き下げを行っていたが、書込み方式を切り替えた場合のみ実行すればよく、書込み方式を変更しない場合には、閾値の引き上げや引き下げを行う必要はない。   Note that in steps S311 and S321 in FIG. 11 and steps S407 and S411 in FIG. 12, the threshold values β1 and β2 were raised or lowered by adding or subtracting the adjustment time, respectively. If the writing method is not changed, the threshold value need not be raised or lowered.

上述した図11および図12のフローチャートでは、データベース管理システム500におけるマスターサーバ200の動作を説明したが、次に、スレーブサーバ300の動作について説明する。   11 and FIG. 12, the operation of the master server 200 in the database management system 500 has been described. Next, the operation of the slave server 300 will be described.

(スレーブの書込方式切替処理)
データベース管理システム500におけるスレーブサーバ300が、送信された書込方式切替要求(切替変更指示)に応じて書込命令受信部310に設定されている書き込み方式を切り替える書込方式切替処理について説明する。
(Slave writing method switching process)
A writing method switching process in which the slave server 300 in the database management system 500 switches the writing method set in the writing command receiving unit 310 according to the transmitted writing method switching request (switching change instruction) will be described.

図13は、スレーブサーバ300の方式変更要求受付部330が、マスターサーバ200の書込方式切替部250から送信された書込方式切替要求に応じて書込命令受信部310に設定されている書き込み方式を切り替える書込方式切替処理を示したフローチャートである。なお、図13において、Sに数字を付した符号は、フローチャートの各ステップを示している。   FIG. 13 shows the write that is set in the write command receiving unit 310 by the method change request accepting unit 330 of the slave server 300 in response to the write method switching request transmitted from the write method switching unit 250 of the master server 200. It is the flowchart which showed the writing system switching process which switches a system. In FIG. 13, reference numerals with numerals added to S indicate steps in the flowchart.

図13に示すように、スレーブサーバ300の方式変更要求受付部330は、マスターサーバ200の書込方式切替部250から送信される書込方式切替要求を待ち受けるようになっている(ステップS501)。そして、方式変更要求受付部330は、書込方式切替部250から書込方式切替要求を受信した場合は(ステップS501のYes)、書込命令受信部310の書き込み方式を、受信した書き込み方式に切り替える(ステップS503)。   As shown in FIG. 13, the method change request accepting unit 330 of the slave server 300 waits for a write method switching request transmitted from the write method switching unit 250 of the master server 200 (step S501). When the method change request accepting unit 330 receives the write method switching request from the writing method switching unit 250 (Yes in step S501), the writing method receiving unit 310 changes the writing method to the received writing method. Switching (step S503).

書込命令受信部310の書き込み方式が、書込方式切替要求に対応する書き込み方式に切り替えられた後、スレーブサーバ300は、方式変更要求受付部330から、その書き込み方式に切り替えた旨の応答を、方式切替判断部255の書込方式切替部250に送信し、処理を終了する(ステップS505)。   After the write method of the write command receiving unit 310 is switched to the write method corresponding to the write method switching request, the slave server 300 sends a response from the method change request accepting unit 330 indicating that the write method has been switched. Then, the data is transmitted to the writing method switching unit 250 of the method switching determination unit 255, and the process is terminated (step S505).

なお、本実施形態では、書込命令受信部310の書き込み方式を変更した後、方式変更要求受付部330を介して書込方式切替部250に応答を返信するようになっているが、これに限定されるものではない。例えば、書込命令受信部310は、応答返信部320とレプリケーション実行部220を介して、方式切替判断部255の書込方式切替部250に応答を返信するようにしてもよい。   In this embodiment, after changing the writing method of the write command receiving unit 310, a response is returned to the writing method switching unit 250 via the method change request receiving unit 330. It is not limited. For example, the write command receiving unit 310 may return a response to the writing method switching unit 250 of the method switching determination unit 255 via the response reply unit 320 and the replication execution unit 220.

また、本実施形態では、データベース管理システム500において書き込み方式を切り替える処理について説明したが、本実施形態はこれに限定されるものではない。例えば、マスターサーバ200単体のみを用いて、システム全体の負荷に基づいて書き込み方式を切り替えるサーバを実現するようにしてもよい。   In the present embodiment, the process of switching the writing method in the database management system 500 has been described. However, the present embodiment is not limited to this. For example, a server that switches the writing method based on the load of the entire system may be realized using only the master server 200 alone.

また、本実施形態では、上記の内容に限定されるものではない。具体的には、マスターデータベース215に書き込むデータに優先度を割り当てて、書込方式切替部250は、割り当てられたその優先度に応じて、優先度の高いデータは、完全同期の書き込み方式が選択されるように、優先度の低いデータよりも閾値β(第2の閾値時間)を高く設定するようにしてもよい。   Moreover, in this embodiment, it is not limited to said content. Specifically, a priority is assigned to data to be written to the master database 215, and the writing method switching unit 250 selects a completely synchronous writing method for high-priority data according to the assigned priority. As described above, the threshold value β (second threshold time) may be set higher than that of low priority data.

また、マスターデータベース215に書き込むデータのうち指定された所定のデータについては、書き込み方式を完全同期の書き込み方式に固定するようにしてもよい。   In addition, with respect to predetermined data designated among data to be written to the master database 215, the writing method may be fixed to a completely synchronous writing method.

なお、本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   In addition, although some embodiment of this invention was described, these embodiment is shown as an example and is not intending limiting the range of invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

また、本発明の実施形態では、フローチャートの各ステップは、記載された順序に沿って時系列的に行われる処理の例を示したが、必ずしも時系列的に処理されなくとも、並列的あるいは個別実行される処理をも含むものである。   Further, in the embodiment of the present invention, each step of the flowchart shows an example of processing that is performed in time series in the order described. The process to be executed is also included.

100 クライアント端末
200 マスターサーバ
210 書込実行部
212 書込命令受付部
214 書込処理部
215 マスターデータベース
220 レプリケーション実行部
222 書込命令送信部
224 応答受信部
230 応答時間算出部
233 応答時間算出処理部
240 負荷推定部
250 書込方式切替部
255 方式切替判断部
300 スレーブサーバ
310 書込命令受信部
315 スレーブデータベース
320 応答返信部
330 方式変更要求受付部
400 ネットワーク
500 データベース管理システム
100 Client terminal 200 Master server 210 Write execution unit 212 Write command reception unit 214 Write processing unit 215 Master database 220 Replication execution unit 222 Write command transmission unit 224 Response reception unit 230 Response time calculation unit 233 Response time calculation processing unit 240 Load Estimator 250 Writing Method Switching Unit 255 Method Switching Determination Unit 300 Slave Server 310 Write Command Receiving Unit 315 Slave Database 320 Response Reply Unit 330 Method Change Request Accepting Unit 400 Network 500 Database Management System

Claims (17)

マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、
を備え、
前記書込方式切替部は、
前記第1の閾値時間よりも短い時間が設定された第2の閾値時間を有し、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替え、
前記完全同期の書き込み方式に切り替えた後、所定の時間内に前記完全同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間から第1の調整時間だけ引き下げた時間に前記第2の閾値時間を更新する
ータベース管理システム。
A database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing unit for calculating time;
Based on the processing time and the response time, a load estimation unit that calculates a response processing time for each writing method,
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching unit for switching to write data to the slave database in a semi-synchronous writing method,
With
The writing method switching unit
Having a second threshold time set to a time shorter than the first threshold time;
After switching to the semi-synchronous writing method, if the response processing time is less than the second threshold time, switch from the semi-synchronous writing method to the fully synchronous writing method,
When the write method is switched from the fully synchronous write method to the semi-synchronous write method within a predetermined time after switching to the fully synchronous write method, the first adjustment time is changed from the second threshold time. Update the second threshold time to a time reduced by
Database management systems.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、
を備え、
前記書込方式切替部は、
前記第1の閾値時間よりも短い時間が設定された第2の閾値時間を有し、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替え、
前記半同期の書き込み方式に切り替えた後、前記半同期の書き込み方式から前記完全同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間に第2の調整時間を加算した時間に前記第2の閾値時間を更新する
ータベース管理システム。
A database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing unit for calculating time;
Based on the processing time and the response time, a load estimation unit that calculates a response processing time for each writing method,
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching unit for switching to write data to the slave database in a semi-synchronous writing method,
With
The writing method switching unit
Having a second threshold time set to a time shorter than the first threshold time;
After switching to the semi-synchronous writing method, if the response processing time is less than the second threshold time, switch from the semi-synchronous writing method to the fully synchronous writing method,
After switching to the semi-synchronous writing method, when the writing method is switched from the semi-synchronous writing method to the fully synchronous writing method, a time obtained by adding a second adjustment time to the second threshold time Update the second threshold time
Database management systems.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、
を備え、
前記書込方式切替部は、
前記第1の閾値時間よりも短い時間が設定された第2の閾値時間を有し、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替え、
前記完全同期の書き込み方式に切り替えた後、所定の時間内に前記完全同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間から第1の調整時間だけ引き下げた時間に前記第2の閾値時間を更新する一方、
前記半同期の書き込み方式に切り替えた後、前記半同期の書き込み方式から前記完全同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間に第2の調整時間を加算した時間に前記第2の閾値時間を更新し、
前記第1の調整時間には、前記第2の調整時間よりも大きい調整時間を設定する
ータベース管理システム。
A database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing unit for calculating time;
Based on the processing time and the response time, a load estimation unit that calculates a response processing time for each writing method,
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching unit for switching to write data to the slave database in a semi-synchronous writing method,
With
The writing method switching unit
Having a second threshold time set to a time shorter than the first threshold time;
After switching to the semi-synchronous writing method, if the response processing time is less than the second threshold time, switch from the semi-synchronous writing method to the fully synchronous writing method,
When the write method is switched from the fully synchronous write method to the semi-synchronous write method within a predetermined time after switching to the fully synchronous write method, the first adjustment time is changed from the second threshold time. While updating the second threshold time to a time reduced by only
After switching to the semi-synchronous writing method, when the writing method is switched from the semi-synchronous writing method to the fully synchronous writing method, a time obtained by adding a second adjustment time to the second threshold time Updating the second threshold time;
An adjustment time that is larger than the second adjustment time is set as the first adjustment time.
Database management systems.
前記第1の閾値時間は、前記マスター側データベースにデータの書込みを保証するために設けられた固定された閾値であり、
前記第2の閾値時間は、前記応答処理時間に基づいて、動的に変動して調整された閾値である
請求項1ないし3のいずれか1項に記載のデータベース管理システム。
The first threshold time is a fixed threshold provided to guarantee writing of data to the master side database;
The database management system according to any one of claims 1 to 3, wherein the second threshold time is a threshold that is dynamically changed and adjusted based on the response processing time.
前記マスター側データベースに書き込むデータに優先度を割り当てて、
前記書込方式切替部は、
割り当てられた優先度に応じて、優先度の高いデータは、前記完全同期の書き込み方式が選択されるように、優先度の低いデータよりも前記第2の閾値時間を高く設定する
請求項1ないしのいずれか1項に記載のデータベース管理システム。
Assign priority to the data to be written to the master side database,
The writing method switching unit
The second threshold time is set higher for data with high priority than data with low priority so that the completely synchronous writing method is selected according to the assigned priority. 5. The database management system according to any one of 4 .
前記書込方式切替部は、
前記マスター側データベースに書き込むデータのうち指定された所定のデータについては、前記完全同期の書き込み方式に固定する
請求項1ないしのいずれか1項に記載のデータベース管理システム。
The writing method switching unit
The database management system according to any one of claims 1 to 5 , wherein predetermined predetermined data among data to be written to the master side database is fixed to the completely synchronous writing method.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、
を備え、
前記書込方式切替部は、
前記第1の閾値時間よりも短い時間が設定された第2の閾値時間と、前記第1の閾値時間よりも短い時間が設定された第3の閾値時間とを有するとともに、前記マスターサーバから前記スレーブサーバに非同期のタイミングでデータを書き込む要求を行う非同期の書き込み方式をさらに備え、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替え、
前記半同期の書き込み方式のときにおいて、前記応答処理時間が前記第1の閾値時間未満の場合は、前記半同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、前記非同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替え、
前記非同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第3の閾値時間未満の場合には、前記非同期の書き込み方式から前記半同期の書き込み方式に切り替え、
前記半同期の書き込み方式に切り替えた後、所定の時間内に前記半同期の書き込み方式から前記非同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間から第3の調整時間だけ引き下げた時間に前記第3の閾値時間を更新する
ータベース管理システム。
A database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing unit for calculating time;
Based on the processing time and the response time, a load estimation unit that calculates a response processing time for each writing method,
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching unit for switching to write data to the slave database in a semi-synchronous writing method,
With
The writing method switching unit
A second threshold time set to a time shorter than the first threshold time, and a third threshold time set to a time shorter than the first threshold time, and from the master server Asynchronous writing method that requests to write data to the slave server at asynchronous timing is further provided.
After switching to the semi-synchronous writing method, if the response processing time is less than the second threshold time, switch from the semi-synchronous writing method to the fully synchronous writing method,
In the case of the semi-synchronous writing method, when the response processing time is less than the first threshold time, the data is written to the slave side database in the semi-synchronous writing method, while the response processing time is If the time is equal to or longer than the first threshold time, the asynchronous write method is switched to write data to the slave-side database.
After switching to the asynchronous write method, if the response processing time is less than the third threshold time, switch from the asynchronous write method to the semi-synchronous write method,
After switching to the semi-synchronous write method, when the write method is switched from the semi-synchronous write method to the asynchronous write method within a predetermined time, only the third adjustment time from the third threshold time Update the third threshold time to the reduced time
Database management systems.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、
を備え、
前記書込方式切替部は、
前記第1の閾値時間よりも短い時間が設定された第2の閾値時間と、前記第1の閾値時間よりも短い時間が設定された第3の閾値時間とを有するとともに、前記マスターサーバから前記スレーブサーバに非同期のタイミングでデータを書き込む要求を行う非同期の書き込み方式をさらに備え、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替え、
前記半同期の書き込み方式のときにおいて、前記応答処理時間が前記第1の閾値時間未満の場合は、前記半同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、前記非同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替え、
前記非同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第3の閾値時間未満の場合には、前記非同期の書き込み方式から前記半同期の書き込み方式に切り替え、
前記非同期の書き込み方式に切り替えた後、前記非同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間に第4の調整時間を加算した時間に前記第3の閾値時間を更新する
ータベース管理システム。
A database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing unit for calculating time;
Based on the processing time and the response time, a load estimation unit that calculates a response processing time for each writing method,
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching unit for switching to write data to the slave database in a semi-synchronous writing method,
With
The writing method switching unit
A second threshold time set to a time shorter than the first threshold time, and a third threshold time set to a time shorter than the first threshold time, and from the master server Asynchronous writing method that requests to write data to the slave server at asynchronous timing is further provided.
After switching to the semi-synchronous writing method, if the response processing time is less than the second threshold time, switch from the semi-synchronous writing method to the fully synchronous writing method,
In the case of the semi-synchronous writing method, when the response processing time is less than the first threshold time, the data is written to the slave side database in the semi-synchronous writing method, while the response processing time is If the time is equal to or longer than the first threshold time, the asynchronous write method is switched to write data to the slave-side database.
After switching to the asynchronous write method, if the response processing time is less than the third threshold time, switch from the asynchronous write method to the semi-synchronous write method,
After switching to the asynchronous write method, when the write method is switched from the asynchronous write method to the semi-synchronous write method, the fourth adjustment time is added to the third threshold time. Update the threshold time of 3
Database management systems.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムであって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理部と、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定部と、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替部と、
を備え、
前記書込方式切替部は、
前記第1の閾値時間よりも短い時間が設定された第2の閾値時間と、前記第1の閾値時間よりも短い時間が設定された第3の閾値時間とを有するとともに、前記マスターサーバから前記スレーブサーバに非同期のタイミングでデータを書き込む要求を行う非同期の書き込み方式をさらに備え、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替え、
前記半同期の書き込み方式のときにおいて、前記応答処理時間が前記第1の閾値時間未満の場合は、前記半同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、前記非同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替え、
前記非同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第3の閾値時間未満の場合には、前記非同期の書き込み方式から前記半同期の書き込み方式に切り替え、
前記半同期の書き込み方式に切り替えた後、所定の時間内に前記半同期の書き込み方式から前記非同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間から第3の調整時間だけ引き下げた時間に前記第3の閾値時間を更新する一方、
前記非同期の書き込み方式に切り替えた後、前記非同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間に第4の調整時間を加算した時間に前記第3の閾値時間を更新し、
前記第3の調整時間には、前記第4の調整時間よりも大きい調整時間を設定する
ータベース管理システム。
A database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing unit for calculating time;
Based on the processing time and the response time, a load estimation unit that calculates a response processing time for each writing method,
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching unit for switching to write data to the slave database in a semi-synchronous writing method,
With
The writing method switching unit
A second threshold time set to a time shorter than the first threshold time, and a third threshold time set to a time shorter than the first threshold time, and from the master server Asynchronous writing method that requests to write data to the slave server at asynchronous timing is further provided.
After switching to the semi-synchronous writing method, if the response processing time is less than the second threshold time, switch from the semi-synchronous writing method to the fully synchronous writing method,
In the case of the semi-synchronous writing method, when the response processing time is less than the first threshold time, the data is written to the slave side database in the semi-synchronous writing method, while the response processing time is If the time is equal to or longer than the first threshold time, the asynchronous write method is switched to write data to the slave-side database.
After switching to the asynchronous write method, if the response processing time is less than the third threshold time, switch from the asynchronous write method to the semi-synchronous write method,
After switching to the semi-synchronous write method, when the write method is switched from the semi-synchronous write method to the asynchronous write method within a predetermined time, only the third adjustment time from the third threshold time While updating the third threshold time to the reduced time,
After switching to the asynchronous write method, when the write method is switched from the asynchronous write method to the semi-synchronous write method, the fourth adjustment time is added to the third threshold time. Update the threshold time of 3,
For the third adjustment time, an adjustment time larger than the fourth adjustment time is set.
Database management systems.
前記第3の閾値時間は、前記応答処理時間に基づいて、動的に変動して調整された閾値である
請求項7ないし9のいずれか1項に記載のデータベース管理システム。
The database management system according to any one of claims 7 to 9, wherein the third threshold time is a threshold that is dynamically changed and adjusted based on the response processing time.
前記マスター側データベースに書き込むデータに優先度を割り当てて、
前記書込方式切替部は、
割り当てられた優先度に応じて、優先度の高いデータは、前記非同期の書き込み方式よりも前記半同期の書き込み方式のほうが選択されやすいように、優先度の低いデータよりも前記第3の閾値時間を高く設定する
請求項ないし10のいずれか1項に記載のデータベース管理システム。
Assign priority to the data to be written to the master side database,
The writing method switching unit
Depending on the assigned priority, the third threshold time is higher than the lower priority data so that the higher priority data is more easily selected for the semi-synchronous write method than for the asynchronous write method. database management system according to any one of claims 7 to 10, the high setting.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムにおける書き込み方式管理方法であって、
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理ステップと、
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定ステップと、
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合は、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替ステップと、
を有し、
前記書込方式切替ステップは、
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替えるステップと、
前記完全同期の書き込み方式に切り替えた後、所定の時間内に前記完全同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間から第1の調整時間だけ引き下げた時間に前記第2の閾値時間を更新するステップと、
を含む、
データベース管理システムにおける書き込み方式管理方法。
A write method management method in a database management system comprising a master server comprising a master database and a slave server comprising a slave database,
A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing step for calculating time;
A load estimation step for calculating a response processing time for each writing method based on the processing time and the response time;
When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching step for switching to write data to the slave database in a semi-synchronous writing method;
Have
The writing method switching step includes:
After the switching to the semi-synchronous writing method, when the response processing time is shorter than the second threshold time shorter than the first threshold time, the semi-synchronous writing method is changed to the fully synchronous writing method. Step to switch to
When the write method is switched from the fully synchronous write method to the semi-synchronous write method within a predetermined time after switching to the fully synchronous write method, the first adjustment time is changed from the second threshold time. Updating the second threshold time to a time reduced by
including,
Write method management method in database management system.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムにおける書き込み方式管理方法であって、  A write method management method in a database management system comprising a master server comprising a master database and a slave server comprising a slave database,
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理ステップと、  A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing step for calculating time;
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定ステップと、  A load estimation step for calculating a response processing time for each writing method based on the processing time and the response time;
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合は、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替ステップと、  When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching step for switching to write data to the slave database in a semi-synchronous writing method;
を有し、  Have
前記書込方式切替ステップは、  The writing method switching step includes:
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替えるステップと、  After the switching to the semi-synchronous writing method, when the response processing time is shorter than the second threshold time shorter than the first threshold time, the semi-synchronous writing method is changed to the fully synchronous writing method. Step to switch to
前記半同期の書き込み方式に切り替えた後、前記半同期の書き込み方式から前記完全同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間に第2の調整時間を加算した時間に前記第2の閾値時間を更新するステップと、  After switching to the semi-synchronous writing method, when the writing method is switched from the semi-synchronous writing method to the fully synchronous writing method, a time obtained by adding a second adjustment time to the second threshold time Updating the second threshold time;
を含む、  including,
データベース管理システムにおける書き込み方式管理方法。  Write method management method in database management system.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムにおける書き込み方式管理方法であって、  A write method management method in a database management system comprising a master server comprising a master database and a slave server comprising a slave database,
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理ステップと、  A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing step for calculating time;
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定ステップと、  A load estimation step for calculating a response processing time for each writing method based on the processing time and the response time;
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合は、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替ステップと、  When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is the first threshold time or more, a writing method switching step for switching to write data to the slave database in a semi-synchronous writing method;
を有し、  Have
前記書込方式切替ステップは、  The writing method switching step includes:
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替えるステップと、  After the switching to the semi-synchronous writing method, when the response processing time is shorter than the second threshold time shorter than the first threshold time, the semi-synchronous writing method is changed to the fully synchronous writing method. Step to switch to
前記完全同期の書き込み方式に切り替えた後、所定の時間内に前記完全同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間から第1の調整時間だけ引き下げた時間に前記第2の閾値時間を更新する一方、前記半同期の書き込み方式に切り替えた後、前記半同期の書き込み方式から前記完全同期の書き込み方式に書き込み方式を切り替えた場合は、前記第2の閾値時間に前記第1の調整時間以下の長さの第2の調整時間を加算した時間に前記第2の閾値時間を更新するステップと、  When the write method is switched from the fully synchronous write method to the semi-synchronous write method within a predetermined time after switching to the fully synchronous write method, the first adjustment time is changed from the second threshold time. The second threshold time is updated at a time that is reduced only while the semi-synchronous write method is switched to the fully synchronous write method after switching to the semi-synchronous write method. Updating the second threshold time to a time obtained by adding a second adjustment time having a length equal to or shorter than the first adjustment time to a second threshold time;
を含む、  including,
データベース管理システムにおける書き込み方式管理方法。  Write method management method in database management system.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムにおける書き込み方式管理方法であって、  A write method management method in a database management system comprising a master server comprising a master database and a slave server comprising a slave database,
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理ステップと、  A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing step for calculating time;
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定ステップと、  A load estimation step for calculating a response processing time for each writing method based on the processing time and the response time;
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替ステップと、  When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is a writing method switching step for switching to write data to the slave-side database in a semi-synchronous writing method when the time is equal to or longer than the first threshold time;
を有し、  Have
前記書込方式切替ステップは、  The writing method switching step includes:
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替えるステップと、  After the switching to the semi-synchronous writing method, when the response processing time is shorter than the second threshold time shorter than the first threshold time, the semi-synchronous writing method is changed to the fully synchronous writing method. Step to switch to
前記半同期の書き込み方式のときにおいて、前記応答処理時間が前記第1の閾値時間未満の場合は、前記半同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、前記マスターサーバから前記スレーブサーバに非同期のタイミングでデータを書き込む要求を行う方式である非同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替えるステップと、  In the case of the semi-synchronous writing method, when the response processing time is less than the first threshold time, the data is written to the slave side database in the semi-synchronous writing method, while the response processing time is When the time is equal to or longer than the first threshold time, the master server switches to write data to the slave-side database by an asynchronous write method, which is a method for requesting data to be written to the slave server at an asynchronous timing; ,
前記非同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第3の閾値時間未満の場合には、前記非同期の書き込み方式から前記半同期の書き込み方式に切り替えるステップと、  After the switching to the asynchronous writing method, when the response processing time is shorter than the third threshold time shorter than the first threshold time, the asynchronous writing method is switched to the semi-synchronous writing method. Steps,
前記半同期の書き込み方式に切り替えた後、所定の時間内に前記半同期の書き込み方式から前記非同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間から第3の調整時間だけ引き下げた時間に前記第3の閾値時間を更新するステップと、  After switching to the semi-synchronous write method, when the write method is switched from the semi-synchronous write method to the asynchronous write method within a predetermined time, only the third adjustment time from the third threshold time Updating the third threshold time to a reduced time;
を含む、  including,
データベース管理システムにおける書き込み方式管理方法。  Write method management method in database management system.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムにおける書き込み方式管理方法であって、  A write method management method in a database management system comprising a master server comprising a master database and a slave server comprising a slave database,
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理ステップと、  A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing step for calculating time;
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定ステップと、  A load estimation step for calculating a response processing time for each writing method based on the processing time and the response time;
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替ステップと、  When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is a writing method switching step for switching to write data to the slave-side database in a semi-synchronous writing method when the time is equal to or longer than the first threshold time;
を有し、  Have
前記書込方式切替ステップは、  The writing method switching step includes:
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替えるステップと、  After the switching to the semi-synchronous writing method, when the response processing time is shorter than the second threshold time shorter than the first threshold time, the semi-synchronous writing method is changed to the fully synchronous writing method. Step to switch to
前記半同期の書き込み方式のときにおいて、前記応答処理時間が前記第1の閾値時間未満の場合は、前記半同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、前記マスターサーバから前記スレーブサーバに非同期のタイミングでデータを書き込む要求を行う方式である非同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替えるステップと、  In the case of the semi-synchronous writing method, when the response processing time is less than the first threshold time, the data is written to the slave side database in the semi-synchronous writing method, while the response processing time is When the time is equal to or longer than the first threshold time, the master server switches to write data to the slave-side database by an asynchronous write method, which is a method for requesting data to be written to the slave server at an asynchronous timing; ,
前記非同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第3の閾値時間未満の場合には、前記非同期の書き込み方式から前記半同期の書き込み方式に切り替えるステップと、  After the switching to the asynchronous writing method, when the response processing time is shorter than the third threshold time shorter than the first threshold time, the asynchronous writing method is switched to the semi-synchronous writing method. Steps,
前記非同期の書き込み方式に切り替えた後、前記非同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間に第4の調整時間を加算した時間に前記第3の閾値時間を更新するステップと、  After switching to the asynchronous write method, when the write method is switched from the asynchronous write method to the semi-synchronous write method, the fourth adjustment time is added to the third threshold time. Updating the threshold time of 3;
を含む、  including,
データベース管理システムにおける書き込み方式管理方法。  Write method management method in database management system.
マスター側データベースを具備するマスターサーバと、スレーブ側データベースを具備するスレーブサーバと、を備えるデータベース管理システムにおける書き込み方式管理方法であって、  A write method management method in a database management system comprising a master server comprising a master database and a slave server comprising a slave database,
前記マスター側データベースにデータを書き込む書込命令を受け付けて前記マスター側データベースに前記データを書き込む処理時間と、前記マスターサーバから前記スレーブサーバに前記データの書込命令を行ってその書込命令に対する応答時間とを算出する処理時間算出処理ステップと、  A processing time for receiving a write command for writing data to the master side database and writing the data to the master side database, and a response to the write command by issuing the data write command from the master server to the slave server A processing time calculation processing step for calculating time;
前記処理時間と前記応答時間とに基づいて、書き込み方式ごとに応答処理時間を算出する負荷推定ステップと、  A load estimation step for calculating a response processing time for each writing method based on the processing time and the response time;
完全同期の書き込み方式のときにおいて、前記応答処理時間が予め設定された第1の閾値時間未満の場合は、前記完全同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、半同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替える書込方式切替ステップと、  When the response processing time is less than a preset first threshold time in the case of a completely synchronous write method, data is written to the slave side database in the complete synchronous write method, while the response processing time Is a writing method switching step for switching to write data to the slave-side database in a semi-synchronous writing method when the time is equal to or longer than the first threshold time;
を有し、  Have
前記書込方式切替ステップは、  The writing method switching step includes:
前記半同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第2の閾値時間未満の場合には、前記半同期の書き込み方式から前記完全同期の書き込み方式に切り替えるステップと、  After the switching to the semi-synchronous writing method, when the response processing time is shorter than the second threshold time shorter than the first threshold time, the semi-synchronous writing method is changed to the fully synchronous writing method. Step to switch to
前記半同期の書き込み方式のときにおいて、前記応答処理時間が前記第1の閾値時間未満の場合は、前記半同期の書き込み方式のまま前記スレーブ側データベースにデータを書き込む一方、前記応答処理時間が前記第1の閾値時間以上の場合には、前記マスターサーバから前記スレーブサーバに非同期のタイミングでデータを書き込む要求を行う方式である非同期の書き込み方式で前記スレーブ側データベースにデータを書き込むように切り替えるステップと、  In the case of the semi-synchronous writing method, when the response processing time is less than the first threshold time, the data is written to the slave side database in the semi-synchronous writing method, while the response processing time is When the time is equal to or longer than the first threshold time, the master server switches to write data to the slave-side database by an asynchronous write method, which is a method for requesting data to be written to the slave server at an asynchronous timing; ,
前記非同期の書き込み方式に切り替えられた後、前記応答処理時間が前記第1の閾値時間よりも短い第3の閾値時間未満の場合には、前記非同期の書き込み方式から前記半同期の書き込み方式に切り替えるステップと、  After the switching to the asynchronous writing method, when the response processing time is shorter than the third threshold time shorter than the first threshold time, the asynchronous writing method is switched to the semi-synchronous writing method. Steps,
前記半同期の書き込み方式に切り替えた後、所定の時間内に前記半同期の書き込み方式から前記非同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間から第3の調整時間だけ引き下げた時間に前記第3の閾値時間を更新する一方、前記非同期の書き込み方式に切り替えた後、前記非同期の書き込み方式から前記半同期の書き込み方式に書き込み方式を切り替えた場合は、前記第3の閾値時間に前記第3の調整時間以下の長さの第4の調整時間を加算した時間に前記第3の閾値時間を更新するステップと、  After switching to the semi-synchronous write method, when the write method is switched from the semi-synchronous write method to the asynchronous write method within a predetermined time, only the third adjustment time from the third threshold time While the third threshold time is updated at the reduced time, after switching to the asynchronous write method, the write method is switched from the asynchronous write method to the semi-synchronous write method. Updating the third threshold time to a time obtained by adding a fourth adjustment time having a length equal to or shorter than the third adjustment time to a threshold time;
を含む、  including,
データベース管理システムにおける書き込み方式管理方法。  Write method management method in database management system.
JP2013102186A 2013-05-14 2013-05-14 Database management system and writing method management method thereof Active JP6239264B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013102186A JP6239264B2 (en) 2013-05-14 2013-05-14 Database management system and writing method management method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013102186A JP6239264B2 (en) 2013-05-14 2013-05-14 Database management system and writing method management method thereof

Publications (2)

Publication Number Publication Date
JP2014222451A JP2014222451A (en) 2014-11-27
JP6239264B2 true JP6239264B2 (en) 2017-11-29

Family

ID=52121942

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013102186A Active JP6239264B2 (en) 2013-05-14 2013-05-14 Database management system and writing method management method thereof

Country Status (1)

Country Link
JP (1) JP6239264B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123967A (en) * 2016-11-28 2018-06-05 中国石油天然气股份有限公司 Data synchronization method and system for a cluster system
CN112527809B (en) * 2020-12-10 2023-10-27 盛立安元科技(杭州)股份有限公司 Database data writing method, device, equipment and storage medium
CN121542325A (en) * 2026-01-19 2026-02-17 天翼云科技有限公司 Data synchronization methods, apparatus, computer equipment, and readable storage media

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09288631A (en) * 1996-04-24 1997-11-04 Hitachi Ltd High-speed LAN control method
JP3580355B2 (en) * 1999-07-29 2004-10-20 日本電気株式会社 Information processing system and data copy method
JP2005242403A (en) * 2004-02-24 2005-09-08 Hitachi Ltd Computer system
JP4699091B2 (en) * 2005-05-31 2011-06-08 株式会社日立製作所 Disaster recovery method and system
JP2007078417A (en) * 2005-09-12 2007-03-29 Denso Corp Current sensor and current detection method
JP5418812B2 (en) * 2009-02-18 2014-02-19 株式会社ジェイテクト Power steering device

Also Published As

Publication number Publication date
JP2014222451A (en) 2014-11-27

Similar Documents

Publication Publication Date Title
CN109684358B (en) Data query method and device
JP4612715B2 (en) Information processing system, data update method, and data update program
US9489440B2 (en) Opportunistic, priority-based object synchronization
US9477618B2 (en) Information processing device, information processing system, storage medium storing program for controlling information processing device, and method for controlling information processing device
EP3252617A1 (en) Transaction processing method, processing node, central node and cluster
TW201627882A (en) Deterministic database system and data transferring method thereof
EP3811231B1 (en) Reducing data loss in remote databases
US9589007B2 (en) Method for issuing multipart receipts in connection to extensive database operations
US9135064B2 (en) Fine grained adaptive throttling of background processes
CN108737573A (en) A kind of distributed storage cluster and its service response control method, device and equipment
KR20150039524A (en) Cloud system, method for controlling thereof, management server and method for controlling thereof
CN107451853A (en) Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
JP6239264B2 (en) Database management system and writing method management method thereof
CN111131076A (en) Multipurpose data receiving method and system based on message queue and computer equipment
CN107395443A (en) A kind of distributed type assemblies management method, apparatus and system
CN115774621A (en) Request processing method, system, equipment and computer readable storage medium
US11467971B2 (en) Systems and methods for accelerating data computation
US9607068B2 (en) Parallel truncation point management for log based replication
WO2019042298A1 (en) Method and device for achieving smart caching, and computer-readable storage medium and computer device thereof
JP2015064850A (en) Database monitoring apparatus, database monitoring method, and computer program
CN113553074B (en) Applet distribution control method, device, electronic equipment and storage medium
CN108243228B (en) Method for data scheduling and intelligent servo cluster
WO2016090938A1 (en) Data communication method and apparatus, and computer storage medium
JP6412462B2 (en) Transaction management method and transaction management apparatus
CN112463322B (en) Method and related equipment for controlling requests in distributed system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160328

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170310

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170321

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20170517

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170606

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170808

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170922

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171101

R151 Written notification of patent or utility model registration

Ref document number: 6239264

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151