JP2009037544A - Data base processing method, and implementation system and program therefor - Google Patents
Data base processing method, and implementation system and program therefor Download PDFInfo
- Publication number
- JP2009037544A JP2009037544A JP2007203272A JP2007203272A JP2009037544A JP 2009037544 A JP2009037544 A JP 2009037544A JP 2007203272 A JP2007203272 A JP 2007203272A JP 2007203272 A JP2007203272 A JP 2007203272A JP 2009037544 A JP2009037544 A JP 2009037544A
- Authority
- JP
- Japan
- Prior art keywords
- lock
- program
- database
- time
- average
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明はデータベースに対するロック形式の選択やリクエストのキュー制御を行うデータベース処理技術に関するものである。 The present invention relates to a database processing technique for selecting a lock format for a database and controlling a queue of requests.
従来技術では、アプリケーションがJDBC(Java Database Connectivity)等のAPI(Application Programming Interface)を直接使用しデータベースを操作する場合は、SQL文をユーザが直接ソースコードに記述する方法が主であり、そのためSQL文が各ソースに散在してしまい、管理が煩雑になる。また、データベースに対するロック形式もユーザが手動でテーブル毎に設定する必要がある。 In the prior art, when an application directly uses an API (Application Programming Interface) such as JDBC (Java Database Connectivity) to operate a database, a method in which an SQL statement is directly written in a source code by a user is mainly used. Sentences are scattered in each source, and management becomes complicated. Also, the lock format for the database must be manually set for each table by the user.
一方、登場したObject/Relationalマッピング(以下、O/Rマッピング)は、オブジェクトとリレーショナルデータベースのテーブルのレコードのマッピングを行うフレームワークであり、レコード単位の排他制御はO/Rマッピングフレームワーク若しくはDataBase Management System(以下、DBMS)が管理する。一般的に排他制御を行う方式には、Pessimistic方式とOptimistic方式の2つがあり、ユーザはオブジェクト毎にどちらの方式かを指定する。 On the other hand, the Object / Relational mapping (hereinafter referred to as O / R mapping) that has appeared is a framework that performs mapping of objects and records in a relational database table, and exclusive control in units of records can be performed by O / R mapping framework or DataBase Management. Managed by a system (hereinafter, DBMS). In general, there are two methods of performing exclusive control, the pessimistic method and the optimistic method, and the user specifies which method for each object.
Pessimistic方式は、最初にデータを読み取る時からロックをかけるため、更新処理は必ず成功する。その代わり、ロックの取得時間が長いため、同じレコードにアクセスするトランザクションが存在する場合、ロックの競合が発生して、同時実行性が低下する可能性がある。 In the pessimistic method, since the lock is applied from when data is first read, the update process is always successful. Instead, because the lock acquisition time is long, if there is a transaction that accesses the same record, lock contention may occur and concurrency may be reduced.
共有ロックを取得するOptimisticの特徴は、排他の範囲が狭いため、ロックの競合が発生する可能性が低く、同時実行性に優れている。但し、同じデータを変更する複数のトランザクションが存在する場合は、更新に失敗する可能性が高くなる。 The Optimistic feature of acquiring a shared lock is that the exclusion range is narrow, so there is little possibility of lock contention, and concurrency is excellent. However, if there are multiple transactions that change the same data, there is a high possibility that the update will fail.
リレーショナルデータベースのレコードとオブジェクトをマッピングするO/Rマッピングは、レコードをオブジェクトとして扱い、データベースのレコードを意識することなく扱える様にする。ユーザがデータベースのレコードを操作するには、O/Rマッピングフレームワークが提供するAPIを使用してオブジェクトを操作することでデータベースのレコードを操作する。 The O / R mapping that maps a relational database record to an object treats the record as an object so that it can be handled without being aware of the record in the database. In order to operate a database record, a user operates a database record by operating an object using an API provided by the O / R mapping framework.
ユーザはアプリケーションの特徴やシステム構成、性能要件に応じて、O/Rマッピングフレームワークに対して手動でロック方式を設定しなければならないため、手間がかかる。 Since the user has to manually set the lock method for the O / R mapping framework according to the characteristics of the application, the system configuration, and the performance requirements, it takes time and effort.
本発明の目的は、適切なロック形式を導き出して、動的に適切なロック形式をO/Rマッピングフレームワークに対して設定することであり、状況(アクセスの傾向、負荷)に応じてロック形式を動的に選択することである。 An object of the present invention is to derive an appropriate lock type and dynamically set an appropriate lock type for the O / R mapping framework. The lock type is set according to the situation (access tendency, load). Is to select dynamically.
また、動的に適切なロック方式を選択したとしても、同一データに対するアクセスが多く、ロックの衝突率が改善されない場合は、ロックを取得できない他のトランザクションによるロック待ちが頻繁に発生すると、リソースを有効に使えず、システム全体のパフォーマンスが低下する。 In addition, even if an appropriate lock method is dynamically selected, if there are many accesses to the same data and the lock collision rate is not improved, resources will be saved if lock waits frequently occur by other transactions that cannot acquire the lock. It cannot be used effectively and the overall performance of the system is degraded.
本発明の目的では、ロック方式の変更だけでなく、同一データにアクセスするリクエストの流動制御(同時実行数の変更)を行うことにより、システム全体のパフォーマンスを向上させることが可能である。 For the purpose of the present invention, it is possible to improve the performance of the entire system by not only changing the lock method but also performing flow control (change of the number of simultaneous executions) of requests accessing the same data.
本発明は、データベースに対するロック形式を選択してデータベース処理を管理する計算機システムにおいて、トレースログとマッピングテーブルを解析してオブジェクトのロック形式を判定しロック形式の設定を行うものである。 The present invention is a computer system that selects a lock format for a database and manages database processing, analyzes a trace log and a mapping table, determines an object lock format, and sets the lock format.
上記目的を達成する為に、本発明の計算機システムでは、障害解析で用いるトレースログとマッピングテーブルを解析することによってオペレーション対応テーブル及びオブジェクト管理テーブルを作成する。そして、そのトレースログとマッピングテーブルの解析結果であるオペレーション対応テーブル及びオブジェクト管理テーブルから随時適切なロック形式を判定し、動的にロック形式の変更を行う。更に本発明の管理サーバは、オペレーション対応テーブル及びオブジェクト管理テーブルからキューの同時実行数の制御を行い、スケジューラが効率的にリクエストをキューに割り振ることにより、ロックの競合率を抑える処理を行う。 In order to achieve the above object, the computer system of the present invention creates an operation correspondence table and an object management table by analyzing a trace log and a mapping table used for failure analysis. Then, an appropriate lock format is determined from the operation correspondence table and the object management table, which are analysis results of the trace log and the mapping table, and the lock format is dynamically changed. Furthermore, the management server of the present invention controls the number of concurrent executions of the queue from the operation correspondence table and the object management table, and the scheduler efficiently allocates requests to the queue, thereby performing a process of suppressing the lock contention rate.
本発明では、主に障害解析で用いているトレースを分析することによって、データベースに対する排他制御の適切なロック形式を自動的に判定することができる。
また、管理サーバが自動的に適切なロック形式をデータベースに対して設定することにより、ユーザはデータベースに対する設定作業を軽減することができる。
更に、ロック形式を変更するだけでなく、同一データにアクセスするリクエストの流動制御を行うことで、アプリケーションサーバに効率的にリクエストを割り振り、システム全体のパフォーマンスを向上させることができる。
In the present invention, it is possible to automatically determine an appropriate lock type of exclusive control for a database by analyzing a trace mainly used in failure analysis.
In addition, the management server automatically sets an appropriate lock format for the database, so that the user can reduce the setting work for the database.
Furthermore, not only changing the lock format, but also performing flow control of requests that access the same data, it is possible to efficiently allocate requests to the application server and improve the performance of the entire system.
以下にデータベースに対するロック形式を選択してデータベース処理を管理する一実施形態の計算機システムについて説明する。 A computer system according to an embodiment for managing database processing by selecting a lock format for the database will be described below.
図1は本実施形態の複数のプログラム実行装置(アプリケーションサーバ)を管理する計算機システムの構成を示す図である。図1の基本構成の概略図に示す様に、ロードバランサ101は、リクエストを受信するとロードバランサの規則に従い受信したリクエストをスケジューラ102に割り振る。リクエストがロードバランサ101によりスケジューラ102に割り振られた場合、スケジューラ102は、リクエストをどのキューに割り当てるか判定するため、キューテーブル104を参照して、リクエストをキュー103に格納する。
FIG. 1 is a diagram showing a configuration of a computer system that manages a plurality of program execution devices (application servers) according to the present embodiment. As shown in the schematic diagram of the basic configuration of FIG. 1, when receiving a request, the
キュー103に格納されているリクエストが存在する場合、コンテナ126はリクエストをキュー103から取り出して処理を開始する。コンテナ126は、リクエストの処理に応じてトレースを取得するタイミングになった場合、トレーサ114を使用してトレースログ115を取得する。そしてコンテナ126は、リクエストをアプリケーション106に渡す。
If there is a request stored in the queue 103, the container 126 takes out the request from the queue 103 and starts processing. The container 126 acquires the trace log 115 using the
アプリケーション106はユーザオブジェクト107を操作し、ユーザオブジェクト107は、アプリケーション106からユーザオブジェクト107に対して行われた操作をO/Rマッピングフレームワーク108に通知する。
The
O/Rマッピングフレームワーク108は、マッピングテーブル111を参照して操作されたユーザオブジェクト107のロック形式を取得する。そしてO/Rマッピングフレームワーク108は、ロック形式に従った操作を参照部109、更新部110に対して行う。 The O / R mapping framework 108 acquires the lock format of the user object 107 operated with reference to the mapping table 111. The O / R mapping framework 108 performs an operation according to the lock format on the reference unit 109 and the update unit 110.
すなわち、データベースサーバ113のデータを参照する場合、O/Rマッピングフレームワーク108の参照部109は、データベースアクセス部112に対してデータを参照する命令を出す。データベースアクセス部112では、実際にデータベースサーバ113のテーブル124の操作を行う為に、データベースサーバ113に対して、データベース用の命令を送信する。データベースサーバ113は、受信した命令をDBMS125が解釈して、テーブル124に対して処理を行い、結果を返す。
That is, when referring to the data of the
また、データベースサーバ113のデータを更新する場合には、O/Rマッピングフレームワーク108の更新部110が、データベースアクセス部112に対してデータを更新する命令を出す。データベースアクセス部112はデータベースサーバ113のテーブル124を更新する。
When updating data in the
O/Rマッピングフレームワーク108は、データベースの参照後若しくは更新後、結果をユーザオブジェクト107に対して設定する。更新処理を実行した場合、O/Rマッピングフレームワーク108はユーザオブジェクト107を更新する。 The O / R mapping framework 108 sets the result for the user object 107 after referring to or updating the database. When the update process is executed, the O / R mapping framework 108 updates the user object 107.
そしてアプリケーション106はユーザオブジェクト107の結果を参照し、アプリケーション106はコンテナ126に結果を返す。またコンテナ126は、結果をリクエストの送信元に返す。
The
管理装置である管理サーバ100の解析部116は、マッピングテーブル111とトレースログ115を解析して、オペレーション対応テーブル123、オブジェクト管理テーブル122を作成する。
The analysis unit 116 of the
また管理サーバ100の判定部117は、ロック判定部118とキュー判定部119から構成される。ロック判定部118では、オペレーション対応テーブル123、オブジェクト管理テーブル122から、ユーザオブジェクト107に対して設定する適切なロック形式を判定する。キュー判定部119では、オペレーション対応テーブル123、オブジェクト管理テーブル122から、キューの同時実行数の設定を判定する。
The determination unit 117 of the
管理サーバ100の設定部120は、サーバテーブル121を参照して、設定を行うスケジューラ102を決定して、ロック判定部118が判定した適切なロック形式をO/Rマッピングフレームワーク108に対して設定し、また、キュー判定部119が判定した適切な同時実行数をスケジューラ102に対して設定する。
The
またスケジューラ152は、スケジューラ102と同等の機能を有する。キュー153は、キュー103と同等の機能を有する。キューテーブル154は、キューテーブル104と同等の機能を有する。コンテナ176は、コンテナ126と同等の機能を有する。アプリケーション156は、アプリケーション106と同等の機能を有する。ユーザオブジェクト157は、ユーザオブジェクト107と同等の機能を有する。マッピングテーブル161は、マッピングテーブル111と同等の機能を有する。O/Rマッピングフレームワーク158は、O/Rマッピングフレームワーク108と同等の機能を有し、参照部159と更新部160から構成され、それぞれは参照部109と更新部110と同等の機能を有する。トレーサ164は、トレーサ114と同等の機能を有し、トレースログ165はトレーサ164により出力されるログである。
以下に、図1における各部の説明を行う。
The scheduler 152 has a function equivalent to that of the scheduler 102. The queue 153 has the same function as the queue 103. The queue table 154 has the same function as the queue table 104. The container 176 has a function equivalent to that of the container 126. The application 156 has a function equivalent to that of the
Hereinafter, each part in FIG. 1 will be described.
図5は本実施形態のPessimistic/Optimisticのリクエストの処理の流れを示す図である。本実施形態のPessimistic/Optimisticのリクエストの処理の流れをシーケンスを用いて説明する。 FIG. 5 is a diagram showing a flow of processing of a pessimistic / optimistic request according to the present embodiment. The process flow of the pessimistic / optimistic request of this embodiment will be described using a sequence.
AP層1120は、図1のコンテナ126及びアプリケーション106を指す。OR層1121は、図1のユーザオブジェクト107、O/Rマッピングフレームワーク108を指す。DB層1122は、図1のデータベースサーバ113及びDBMS125、テーブル124を指す。
AP層1120がリクエスト1100を受け取ると、AP層1120は、リクエスト1100の処理を開始することを示すリクエスト開始ポイント1101のトレースログを出力する。
When the
リクエスト1100がAP層からOR層1121に渡され、OR層からDB層にデータの参照を行う場合、OR層はDB層の参照を開始することを示す参照開始ポイント1102のトレースログを出力する。また、OR層はDB層の参照が完了すると、参照を完了したことを示す参照完了ポイント1103のトレースログを出力する。
When the request 1100 is passed from the AP layer to the
OR層からDB層にデータの更新を行う場合、OR層はDB層の更新を開始することを示す更新開始ポイント1104のトレースログを出力する。また、OR層はDB層の更新が完了すると、更新を完了したことを示す更新完了ポイント1105のトレースログを出力する。リクエスト1100の処理が完了するとAP層は、処理が完了したことを示すリクエスト完了ポイント1106のトレースログを出力する。 When updating data from the OR layer to the DB layer, the OR layer outputs a trace log of the update start point 1104 indicating that the update of the DB layer is started. Further, when the update of the DB layer is completed, the OR layer outputs a trace log of the update completion point 1105 indicating that the update is completed. When the processing of the request 1100 is completed, the AP layer outputs a trace log of the request completion point 1106 indicating that the processing is completed.
OR層1121がDB層1122を参照している時間つまり参照時間1107は、参照開始ポイント1102が取得された時間から参照完了ポイント1103が取得された時間の差分と定義する。OR層1121の参照が完了して次の更新を行うまでの時間つまり中間時間1108を参照完了ポイント1103が取得された時間から更新開始ポイントが取得された時間の差分と定義する。OR層1121がDB層1122を更新している時間つまり更新時間1109は、更新開始ポイント1104で取得された時間から更新完了ポイント1105が取得された時間の差分と定義する。待ち時間1111は、参照時間1107と中間時間1108と更新時間1109の和と定義する。処理時間1110は、AP層でのリクエスト開始ポイント1101を取得した時間とリクエスト完了ポイント1106を取得した時間の差分と定義する。処理時間1110の構成要素には、参照時間1107、中間時間1108、更新時間1109が含まれる。
The time when the
図6は本実施形態のPessimisticロック形式の動作例を示す図である。リクエストA1200、リクエストB1210、リクエストC1220は、それぞれ同時期に同一のデータにアクセスが発生した例を示しており、処理の実行順序は、リクエストA1200、リクエストB1210、リクエストC1220の順とする。 FIG. 6 is a diagram illustrating an operation example of the pessimistic lock format according to the present embodiment. The request A1200, the request B1210, and the request C1220 are examples in which the same data is accessed at the same time, and the processing execution order is the order of the request A1200, the request B1210, and the request C1220.
Pessimisticのロック形式の特徴は、リクエストのデータベースの操作開始から完了までロックを取得することである。つまり、リクエストA1200において、データベースアクセス時には、参照開始ポイント1202から更新完了ポイント1205までの間、ロックを取得する。この時、リクエストB1210では、同時期に参照開始ポイント1212で、ロックを取得しようとしているが、リクエストB1210より先にリクエストA1200がロックを取得したため、実際に参照が完了する時点つまり参照完了ポイント1213までの間に、リクエストA1200のロック時間1230つまり参照開始ポイント1202から更新完了ポイント1205までの時間分、ロックの取得を待たされる。
A characteristic of the lock format of Pessimistic is that the lock is acquired from the start to the completion of the operation of the request database. That is, in the request A1200, a lock is acquired between the reference start point 1202 and the
また、リクエストC1220については、リクエストA1200、リクエストB1210のロックが解除されるまで、つまりリクエストAのロック時間1230とリクエストB1210のロック時間の和の時間分、ロックの取得を待たされる。以降のリクエストについても、同様にロックが競合した場合、ロックの取得を待たされる。 Request C1220 is awaited to be locked until request A1200 and request B1210 are unlocked, that is, the sum of the lock time of request A and the lock time of request B1210. Similarly, for subsequent requests, if a lock conflicts, the acquisition of the lock is awaited.
ロック時間1230は、データベースにアクセスを開始した参照開始ポイント1202から更新が完了する更新完了ポイント1205の差分となる。ロックの衝突が発生した場合、ここではリクエストBにおいて、ロック時間とは、参照開始ポイント1212と更新完了ポイント1215の差分からリクエストAのロック時間1230の差分となる。ロック待ち時間1240は、ロックの競合が発生して、他のリクエストによってロックの取得を待たされる時間とする。リクエストBにおいて、ロックの待ち時間は、リクエストAのロック時間に相当する。リクエストCにおいて、ロックの待ち時間は、リクエストAのロック時間とリクエストBのロック時間の和に相当する。
The lock time 1230 is the difference between the reference start point 1202 at which access to the database is started and the
図7は本実施形態のOptimisticロック形式の動作例を示す図である。リクエストA1300、リクエストB1310は、それぞれ同時期に同一のデータにアクセスが発生した場合を示しており、処理の実行順序は、リクエストA1300、リクエストB1310の順とする。 FIG. 7 is a diagram illustrating an operation example of the Optimistic lock format according to this embodiment. A request A 1300 and a request B 1310 indicate cases where the same data is accessed at the same time, and the processing execution order is the order of the request A 1300 and the request B 1310.
Optimisticのロック形式の特徴は、データ参照時に共有ロックを取得して、実際にデータ更新時に、他のリクエストが共有ロックを取得していないか判断して、他のリクエストが共有ロックを取得している場合は、データの更新に失敗することである。失敗したリクエストにおいて、処理をデータ参照時から再びリトライさせる。 The feature of the optimistic lock format is that a shared lock is acquired at the time of data reference, and at the time of data update, it is judged whether another request has acquired the shared lock, and the other request acquires the shared lock. If it is, the data update fails. In the failed request, the process is retried from the time of data reference.
リクエストA1300は参照開始ポイント1302で、リクエストB1310より先に共有ロックを取得する。リクエストB1310は、その後に、参照開始ポイント1312で共有ロックを取得する。リクエストA1300は、ほかのリクエストBが共有ロックを取得しているため、データの更新に失敗し、共有ロックを解放する。この時、AP層は更新エラーポイント1304をトレースログに出力して、再度データ参照からつまり共有ロックの取得からリトライする。
Request A 1300 is a reference start point 1302 and acquires a shared lock before request B 1310. Request B 1310 then acquires a shared lock at reference start point 1312. Request A 1300 fails to update data and releases the shared lock because other request B has acquired the shared lock. At this time, the AP layer outputs the
リクエストA1300が共有ロックを解放すると、リクエストB1310は他のリクエストで共有ロックを保持しているリクエストが存在しないため、実際にデータの更新を行い、処理を完了する。再度データ参照からリトライしているリクエストA1300は、リクエストBがロックを解放する更新完了ポイント1315の後に、共有ロックを取得でき、処理を完了することができる。 When the request A1300 releases the shared lock, the request B1310 does not have any other request that holds the shared lock, so the data is actually updated and the process is completed. The request A 1300 retrying from the data reference again can acquire the shared lock after the update completion point 1315 where the request B releases the lock, and can complete the processing.
この時、リクエストA1300の更新エラーポイント1304から更新が成功する時に取得した共有ロック取得時間つまり参照開始ポイント1305の差分の時間が、最長リトライ時間と定義する。リトライなし時間は、リトライ処理を行わずにリクエストの処理を完了した処理時間と定義する。つまり、リトライなし時間の定義は、処理時間1316と浪費時間1317の差分とする。浪費時間1317の定義は、共有ロックを取得してからロックの衝突が発生して、ロックの再取得を含めて、ロックの取得が無駄になった時間とする。
At this time, the shared lock acquisition time acquired when the update is successful from the
図8は本実施形態の解析部116/判定部117/設定部120の処理概要のフロー例を示す図である。図8に示す様に管理サーバ100は、サーバテーブル121を参照して、全てのアプリケーションサーバについて、次の解析部116、判定部117、設定部120の処理を実行する(1400)。
FIG. 8 is a diagram illustrating a flow example of the processing outline of the analysis unit 116 / determination unit 117 /
まず解析部116は、トレースログ115とマッピングテーブル111を解析して、オペレーション対応テーブル123とオブジェクト管理テーブル122を作成する(1401)。 First, the analysis unit 116 analyzes the trace log 115 and the mapping table 111 to create an operation correspondence table 123 and an object management table 122 (1401).
判定部117を構成するロック判定部118は、オペレーション対応テーブル123とオブジェクト管理テーブル122を参照してオブジェクトの適切なロック形式を判定する(1402)。
判定部117を構成するキュー判定部119は、オペレーション対応テーブル123とオブジェクト管理テーブル122とキューテーブル104を参照して、キューのリクエスト処理の同時実行数の増減を判定する(1403)。
The lock determination unit 118 included in the determination unit 117 refers to the operation correspondence table 123 and the object management table 122 to determine an appropriate lock format for the object (1402).
The queue determination unit 119 constituting the determination unit 117 refers to the operation correspondence table 123, the object management table 122, and the queue table 104, and determines increase / decrease in the number of concurrent executions of queue request processing (1403).
そして設定部120は、ロック判定部118が判定したロック形式をO/Rマッピングフレームワーク108に対して設定し、キュー判定部119が判定したキューのリクエスト処理の同時実行数の増減についてスケジューラ102に対して設定する(1404)。その後、解析部116の処理1401に戻る。
ロック判定部118の詳細なフローは図9、キュー判定部の詳細なフローは図10を用いて説明する。
Then, the
A detailed flow of the lock determination unit 118 will be described with reference to FIG. 9, and a detailed flow of the queue determination unit will be described with reference to FIG.
図9は本実施形態のロック判定部118のフロー例を示す図である。図9に示す様にロック判定部118は、オブジェクトのロック形式がPessimisticかどうか判定する(302)。 FIG. 9 is a diagram illustrating a flow example of the lock determination unit 118 of the present embodiment. As shown in FIG. 9, the lock determination unit 118 determines whether the lock type of the object is pessimistic (302).
オブジェクトのロック形式がPessimisticの場合は、(平均処理時間−平均待ち時間)×(1−衝突率)+(平均処理時間−平均待ち時間+平均参照時間+平均中間時間+リトライ待ち時間)×衝突率で求められる値とPessimisticの平均処理時間の値を比較する(303)。 When the object lock format is Pessimistic, (average processing time−average waiting time) × (1−collision rate) + (average processing time−average waiting time + average reference time + average intermediate time + retry waiting time) × collision The value obtained by the rate is compared with the value of the average processing time of Pessimistic (303).
この式の考え方は、ロック形式がPessimisticの場合、Optimisticでの処理時間を予測することである。ロックの衝突が発生しない場合のOptimisticの処理時間は、待ち時間は発生しないため、(平均処理時間−平均待ち時間)と予測する。また、ロックの衝突が発生した場合のOptimisticの処理時間は、待ち時間は発生せず、ロックの衝突により無駄になった処理及びロック再取得処理があるため、(平均処理時間−平均待ち時間+平均参照時間+平均中間時間+リトライ待ち時間)と予測する。 The idea of this equation is to predict the processing time in Optimistic when the lock format is Pessimistic. When the lock collision does not occur, the Optimistic processing time is predicted as (average processing time−average waiting time) because no waiting time occurs. In addition, since the waiting time does not occur for the Optimistic processing time when a lock collision occurs, there is a process that is wasted due to a lock collision and a lock reacquisition process, so (average processing time−average waiting time + (Average reference time + average intermediate time + retry waiting time)
前記比較の結果、Pessimisticの平均処理時間が大きい場合、ロック判定部118はオブジェクトのロック形式をOptimisticに変更する様にO/Rマッピングフレームワークに命令することをメモリに保持しておく(304)。またPessimisticの平均処理時間が等しいか小さい場合は、判定処理を終了する。 As a result of the comparison, if the average processing time of pessimistic is large, the lock determination unit 118 holds in the memory to instruct the O / R mapping framework to change the lock format of the object to Optimistic (304). . If the average processing time of pessimistic is equal or small, the determination process is terminated.
一方、オブジェクトのロック形式がPessimisticではない場合、リトライなし平均処理時間+(平均参照時間+平均中間時間+平均更新時間)×衝突率+リトライなし平均処理時間×(1−衝突率)よりOptimisticの平均処理時間が大きいか判定する(306)。 On the other hand, if the lock type of the object is not pessimistic, the average processing time without retry + (average reference time + average intermediate time + average update time) × collision rate + average processing time without retry × (1−collision rate) It is determined whether the average processing time is long (306).
Optimisticの平均処理時間が大きい場合、ロック判定部118は、オブジェクトのロック形式をPessimisticに変更する様に、O/Rマッピングフレームワークに命令することをメモリに保持しておく(307)。またOptimisticの平均処理時間が等しいか小さい場合、判定処理を終了する。 When the average processing time of Optimistic is large, the lock determination unit 118 holds in the memory that the O / R mapping framework is instructed to change the lock format of the object to Pessimistic (307). If the average processing time of Optimistic is equal or small, the determination process is terminated.
この処理では、ロック形式がOptimisticの場合、Pessimisticでの処理時間を予測している。すなわち、ロックの衝突が発生しない場合のPessimisticの処理時間は、ロックによる待ち時間が発生しないため、リトライなし平均処理時間と予測し、ロックの衝突が発生した場合の処理時間は、ロックによる待ち時間を(平均参照時間+平均中間時間+平均更新時間)と想定して、リトライなし平均処理時間+(平均参照時間+平均中間時間+平均更新時間)と予測する。 In this process, when the lock format is Optimistic, the processing time in Pseptic is predicted. That is, the pessimistic processing time when there is no lock collision does not cause a waiting time due to locking, so it is predicted as an average processing time without retry, and the processing time when a lock collision occurs is the waiting time due to locking. Is assumed to be (average reference time + average intermediate time + average update time), and the average processing time without retry + (average reference time + average intermediate time + average update time) is predicted.
図10は本実施形態のキュー判定部119のフロー例を示す図である。図10に示す様にキュー判定部119は、まずユーザがスケジューラのキューテーブルに対して設定した閾値を読み込む(401)。そして、オブジェクトのロック形式がPessimisticかどうかの判定する(402)。 FIG. 10 is a diagram illustrating a flow example of the queue determination unit 119 according to the present embodiment. As shown in FIG. 10, the queue determination unit 119 first reads a threshold set by the user in the scheduler queue table (401). Then, it is determined whether the lock type of the object is pessimistic (402).
オブジェクトのロック形式がPessimisticの場合、平均処理時間より閾値が大きいかを判定する(403)。平均処理時間より閾値が大きい場合、キュー判定部119は、スケジューラに対してキューの同時実行数を増やす命令を出すことをメモリに保持しておく(404)。 If the lock type of the object is pessimistic, it is determined whether the threshold is larger than the average processing time (403). When the threshold value is larger than the average processing time, the queue determination unit 119 holds in the memory that an instruction to increase the number of simultaneous executions of the queue is issued to the scheduler (404).
また、平均処理時間より閾値が同じか小さい場合、閾値がリトライなし平均処理時間より大きく、かつ平均処理時間より小さいか判定する(406)。判定の理由は、キューを絞ることで、ロックの衝突が減少して、平均処理時間が短縮され、リトライなし時間に近づけることができると予測するためである。 If the threshold is equal to or smaller than the average processing time, it is determined whether the threshold is larger than the average processing time without retry and smaller than the average processing time (406). The reason for the determination is that by narrowing down the queue, it is predicted that lock collisions will be reduced, the average processing time will be shortened, and it will be possible to approach the retry-free time.
閾値がリトライなし平均処理時間より大きく、かつ平均処理時間より小さい場合、キュー判定部119は、スケジューラに対してキューの同時実行数を減らす命令を出すことをメモリに保持しておく(407)。そして、閾値がリトライなし平均処理時間以下、または平均処理時間以上の場合、判定処理を終了する。 When the threshold value is larger than the average processing time without retry and smaller than the average processing time, the queue determination unit 119 holds in the memory that an instruction for reducing the number of simultaneous executions of the queue is issued to the scheduler (407). If the threshold is equal to or less than the average processing time without retry or equal to or longer than the average processing time, the determination process is terminated.
一方、オブジェクトのロック形式がPessimisticでない場合、平均処理時間より閾値が大きいか判定する(408)。平均処理時間より閾値が大きい場合、キュー判定部119は、スケジューラに対してキューの同時実行数を増やす命令を出すことをメモリに保持しておく(409)。 On the other hand, if the lock format of the object is not pessimistic, it is determined whether the threshold is greater than the average processing time (408). When the threshold value is larger than the average processing time, the queue determination unit 119 holds in the memory that the instruction to increase the number of simultaneous executions of the queue is issued to the scheduler (409).
また、平均処理時間より閾値が等しいか小さい場合、閾値が、平均処理時間−平均待ち時間より大きくかつ平均処理時間より小さいかどうか判定する(410)。判定の理由は、キューを絞ることで、ロックの衝突が減少して、平均処理時間が短縮され、待ち時間なしの平均処理時間に近づけることができると予測するためである。 If the threshold is equal to or smaller than the average processing time, it is determined whether the threshold is larger than the average processing time minus the average waiting time and smaller than the average processing time (410). The reason for the determination is that by narrowing down the queue, it is predicted that lock collisions are reduced, the average processing time is shortened, and the average processing time without waiting time can be approached.
閾値が、平均処理時間−平均待ち時間より大きくかつ平均処理時間より小さい場合、キュー判定部119は、スケジューラに対してキューの同時実行数を減らす命令を出すことをメモリに保持しておく(411)。そして、閾値が、平均処理時間−平均待ち時間より大きくかつ平均処理時間より小さいことを満たさない場合、判定処理を終了する。 When the threshold value is larger than the average processing time-the average waiting time and smaller than the average processing time, the queue determination unit 119 holds in the memory that an instruction to reduce the number of simultaneous executions of the queue is issued to the scheduler (411). ). When the threshold does not satisfy that the average processing time is larger than the average processing time−the average waiting time and is smaller than the average processing time, the determination process is terminated.
図11は本実施形態のリクエストフローの例を示す図である。図11に示す様にロードバランサ101がリクエストを受信すると(501)、ロードバランサ101は、ロードバランサ自身のルールに従い、リクエストをスケジューラに割り振る(502)。
FIG. 11 is a diagram illustrating an example of a request flow according to the present embodiment. As shown in FIG. 11, when the
スケジューラは、リクエストに操作するユーザオブジェクトを特定できる情報がある場合、キューテーブルを参照して、リクエストのオペレーションに対応するキューにリクエストをキューイングし、そうでない場合はキューイングルールに従いキューにリクエストをキューイングする(503)。 When there is information that can identify the user object that operates on the request, the scheduler queues the request to the queue corresponding to the operation of the request by referring to the queue table. Otherwise, the scheduler queues the request according to the queuing rule. Queue (503).
キューにリクエストをキューイングしたとき、キューの最大同時実行数が現在の同時実行数より小さいか判定する(504)。キューの現在の同時実行数が最大同時実行数以上の場合、スケジューラは、キューが同時に実行しているリクエストのいずれか1つが完了するまで新しいリクエストの処理を待機させる(505)。キューの現在の同時実行数が最大同時実行数より小さい場合、スケジューラは、キューにリクエストをキューイングして、キューの現在の同時実行数の値を1つ増やす(506)。 When a request is queued in the queue, it is determined whether the maximum number of concurrent executions in the queue is smaller than the current number of concurrent executions (504). If the current number of concurrent executions in the queue is greater than or equal to the maximum number of concurrent executions, the scheduler waits for the processing of a new request until any one of the requests being concurrently executed by the queue is completed (505). If the current number of concurrent executions in the queue is less than the maximum number of concurrent executions, the scheduler queues the request in the queue and increments the current number of concurrent executions in the queue by one (506).
コンテナは、キューからリクエストを取り出し(507)、コンテナは、トレーサを使用して、リクエストの開始処理を示すトレースログを取得する(508)。そしてコンテナは、取り出したリクエストの処理をアプリケーションに渡す(509)。 The container retrieves the request from the queue (507), and the container uses the tracer to obtain a trace log indicating the request start processing (508). Then, the container passes the processing of the retrieved request to the application (509).
アプリケーションは、ユーザオブジェクトに対してメソッド呼び出しを行う(510)。O/Rマッピングフレームワークは、マッピングテーブルを参照して、ユーザオブジェクトにマッピングされているデータベースサーバのテーブルを知る(511)。 The application makes a method call to the user object (510). The O / R mapping framework refers to the mapping table to know the table of the database server mapped to the user object (511).
コンテナは、トレースを利用してテーブル参照開始を示すトレースログを取得する(512)。O/Rマッピングフレームワークは、参照部を使用して、データベースアクセス部を介して、データベースサーバのテーブルを参照する(513)。コンテナは、トレースを利用して、テーブル参照完了を示すトレースログを取得する(515)。 The container acquires a trace log indicating the start of table reference using the trace (512). The O / R mapping framework uses the reference unit to refer to the database server table via the database access unit (513). The container uses the trace to obtain a trace log indicating completion of the table reference (515).
コンテナは、トレースを利用してテーブル更新開始を示すトレースログを取得する(515)。O/Rマッピングフレームワークは、更新部を利用して、データベースアクセス部を介して、データベースサーバのテーブルを更新する(516)。コンテナは、トレースを利用してテーブル更新完了を示すトレースログを取得する(517)。O/Rマッピングフレームワークは、結果をユーザオブジェクトに対して設定する(518)。 The container acquires a trace log indicating the start of table update using the trace (515). The O / R mapping framework uses the update unit to update the database server table via the database access unit (516). The container acquires a trace log indicating completion of table update using the trace (517). The O / R mapping framework sets the result for the user object (518).
ユーザオブジェクトは結果をアプリケーションに返す(519)。アプリケーションは結果をコンテナに返す(520)。コンテナは、トレースを利用して、リクエストの完了を示すトレースログを取得する(521)。コンテナは、結果をリクエストの送信元に返す(522)。スケジューラは、キューの現在の同時実行数の値を1つ減らす(523)。 The user object returns the result to the application (519). The application returns the result to the container (520). The container acquires a trace log indicating completion of the request using the trace (521). The container returns the result to the transmission source of the request (522). The scheduler decreases the value of the current number of concurrent executions of the queue by one (523).
図12は本実施形態のマッピングテーブル111の構成を示す図である。図12に示す様にマッピングテーブル111は、オブジェクト601、ロック形式602から構成される。O/Rマッピングフレームワーク108は、データベースサーバ113にアクセスする時のユーザオブジェクト107のロック形式602を、オブジェクト601をキーにして取得する。また、解析部116が、オブジェクト管理テーブル122を作成する上で、ユーザオブジェクト107の現在のロック形式602を取得する為に参照される。
FIG. 12 is a diagram showing the configuration of the mapping table 111 of this embodiment. As shown in FIG. 12, the mapping table 111 includes an object 601 and a lock format 602. The O / R mapping framework 108 acquires the lock format 602 of the user object 107 when accessing the
図13は本実施形態のトレースログ115の構成を示す図である。図13に示す様にトレースログ115は、トレースポイント701、時刻702、リクエスト通番703、オペレーション704、オブジェクト705、オブジェクトID706から構成される。
FIG. 13 is a diagram showing the configuration of the trace log 115 of this embodiment. As shown in FIG. 13, the trace log 115 includes a trace point 701, a time 702, a request serial number 703, an operation 704, an object 705, and an
トレースポイント701には、アプリケーションサーバでの処理の開始を示す開始ポイントTRC00001、処理の完了を示す完了ポイントTRC00006、O/Rマッピングフレームワークにおいて、データベースに対してデータの参照の開始を示すポイントTRC00002、参照の完了を示すポイントTRC00003、データの更新の開始を示すポイントTRC00004、更新の完了を示すポイントTRC00005が存在する。 The trace point 701 includes a start point TRC00001 indicating the start of processing in the application server, a completion point TRC00006 indicating the completion of processing, a point TRC00002 indicating the start of data reference to the database in the O / R mapping framework, There are a point TRC00003 indicating the completion of reference, a point TRC00004 indicating the start of data update, and a point TRC00005 indicating the completion of update.
時刻702は、トレースポイント701を取得した時点の現在時刻とする。なお、本システムを構成するサーバ間の時刻合わせは行われていることを前提とする。リクエスト通番703は、一つのリクエストに対して一意の通番がトレーサによって割り振られる。リクエスト通番でフィルタリングを行うことにより、リクエストの処理の流れが確認できる。 Time 702 is the current time when the trace point 701 is acquired. Note that it is assumed that time adjustment is performed between servers constituting this system. In the request sequence number 703, a unique sequence number is assigned to one request by the tracer. By filtering with the request serial number, the flow of request processing can be confirmed.
オペレーション704は、リクエストに含まれている情報である。例えば、URL等を指す。トレースポイントTRC00001及びTRC00006のみで取得可能である。オブジェクト705は、リクエストの処理で実際に操作されるデータベースのデータにマッピングされているオブジェクトである。オブジェクトID706は、オブジェクト705を示す一意のIDである。オブジェクト705、オブジェクトIDはトレースポイントTRC00002、TRC00003、TRC00004、TRC00005で取得可能である。
Operation 704 is information included in the request. For example, it refers to a URL or the like. Only trace points TRC00001 and TRC00006 can be obtained. An object 705 is an object that is mapped to database data that is actually manipulated in the processing of a request. The
図14は本実施形態のキューテーブル104の構成を示す図である。図14に示す様にキューテーブル104は、キュー名801、オペレーション802、閾値803から構成される。 FIG. 14 is a diagram showing the configuration of the queue table 104 of this embodiment. As shown in FIG. 14, the queue table 104 includes a queue name 801, an operation 802, and a threshold value 803.
キュー名801は、スケジューラが管理するキューの名前を指す。オペレーション802は、キューにキューイングされたリクエストに含まれている情報である。閾値803は、キュー判定部で使用され、ユーザにより入力される情報である。 The queue name 801 indicates the name of a queue managed by the scheduler. Operation 802 is information included in the requests queued in the queue. The threshold value 803 is information used by the queue determination unit and input by the user.
図15は本実施形態のオペレーション対応テーブル123の構成を示す図である。図15に示す様にオペレーション対応テーブル123は、オペレーション901、オブジェクト902から構成される。 FIG. 15 is a diagram showing the configuration of the operation correspondence table 123 of this embodiment. As shown in FIG. 15, the operation correspondence table 123 includes operations 901 and objects 902.
オペレーション901は、リクエストに含まれる情報である。オブジェクト902は、リクエストの処理で実際に操作されるデータベースのデータにマッピングされているオブジェクトである。1つのオペレーションに対して、複数のオブジェクトを操作することもある。 Operation 901 is information included in the request. An object 902 is an object that is mapped to database data that is actually manipulated in the processing of a request. A plurality of objects may be manipulated for one operation.
図16は本実施形態のオブジェクト管理テーブル122の構成を示す図である。図16に示す様にオブジェクト管理テーブル122は、オブジェクト1001、ロック形式1002、平均処理時間1003、平均参照時間1004、平均中間時間1005、平均更新時間1006、平均待ち時間1007、ロック衝突率1008から構成される。
FIG. 16 is a diagram showing the configuration of the object management table 122 of this embodiment. As shown in FIG. 16, the object management table 122 includes an object 1001, a lock format 1002, an average processing time 1003, an average reference time 1004, an average intermediate time 1005, an average update time 1006, an
オブジェクト1001は、リクエストの処理で実際に操作されるデータベースのデータにマッピングされているオブジェクトである。ロック形式1002は、オブジェクト1001をキーに、キューテーブルから取得したロック形式602である。 An object 1001 is an object that is mapped to database data that is actually manipulated in the processing of a request. The lock format 1002 is a lock format 602 acquired from the queue table using the object 1001 as a key.
平均処理時間1003は、同一のオブジェクトにおける現在までの処理時間の平均値である。平均参照時間1004は、同一のオブジェクトにおける現在までの参照時間の平均値である。平均中間時間1005は、同一のオブジェクトにおける現在までの中間時間の平均値である。平均更新時間1006は、同一のオブジェクトにおける現在までの更新時間の平均値である。 The average processing time 1003 is an average value of processing times up to the present time for the same object. The average reference time 1004 is an average value of reference times up to the present time for the same object. The average intermediate time 1005 is an average value of the intermediate time up to the present in the same object. The average update time 1006 is an average value of update times up to the present time for the same object.
平均待ち時間1007は、同一のオブジェクトにおける現在までの待ち時間の平均値である。ロック衝突率1008は、同一のオブジェクトに対するロックの衝突率である。リトライなし平均処理時間1009は、同一オブジェクトにおいて、ロック形式Optsmisticである場合、ロックの衝突が起きずに、リクエストが処理された平均時間であり、ロックの衝突が発生した場合にリトライされる時間を含まない時間である。
The
図17は本実施形態のサーバテーブル121の構成を示す図である。図17に示す様にサーバテーブル1703は、サーバ名1701、スケジューラ1702から構成される。サーバ名1701は、管理サーバ100が管理しているサーバ群を指す。設定部120がロック形式またはキューの同時実行数の設定を行う場合に、サーバ名1701をキーに、設定対象となるスケジューラ102を取得する。
FIG. 17 is a diagram showing the configuration of the server table 121 of this embodiment. As shown in FIG. 17, the server table 1703 includes a
本実施形態の情報処理装置は、図2のアプリケーションサーバ105、図3の管理サーバ100、データベースサーバ113から構成される。
The information processing apparatus according to this embodiment includes the application server 105 in FIG. 2, the
図2は本実施形態のアプリケーションサーバ105のハードウェア構成を示す図である。図2において、アプリケーションサーバ105は、メモリ202、CPU201、記憶装置203、通信インターフェイス204から構成される。メモリ202には、コンテナ126、キューテーブル104、スケジューラ102、キュー103、アプリケーション106、マッピングテーブル111、ユーザオブジェクト107、データベースアクセス部112、トレーサ114、O/Rマッピングフレームワーク108、参照部109、更新部110が格納されており、各々CPU201によって実行される。記憶装置203には、トレースログ115が格納されおり、必要に応じてメモリ202にロードされる。
FIG. 2 is a diagram illustrating a hardware configuration of the application server 105 according to the present embodiment. 2, the application server 105 includes a memory 202, a
図3は本実施形態の管理サーバ100のハードウェア構成を示す図である。図3において、管理サーバ100は、メモリ233、CPU242、通信インターフェイス231から構成される。メモリ233には、判定部117、ロック判定部118、キュー判定部119、解析部116、設定部120、オペレーション対応テーブル123、オブジェクト管理テーブル122、サーバテーブル121が格納されており、各々CPU242によって実行される。
FIG. 3 is a diagram illustrating a hardware configuration of the
本実施形態において、解析部116等の各処理部としてコンピュータを機能させる為のプログラムは、CD−ROM等の記録媒体に記録され磁気ディスク等に格納された後、メモリにロードされて実行されるものとする。なお前記プログラムを記録する記録媒体はCD−ROM以外の他の記録媒体でも良い。また前記プログラムを当該記録媒体からコンピュータにインストールして使用しても良いし、ネットワークを通じて当該記録媒体にアクセスして前記プログラムを使用するものとしても良い。 In the present embodiment, a program for causing a computer to function as each processing unit such as the analysis unit 116 is recorded on a recording medium such as a CD-ROM and stored in a magnetic disk or the like, and then loaded into a memory and executed. Shall. The recording medium for recording the program may be a recording medium other than the CD-ROM. Further, the program may be used by installing it from a recording medium in a computer, or the program may be used by accessing the recording medium through a network.
図4は本実施形態のデータベースサーバ113のハードウェア構成を示す図である。図4において、データベースサーバ113は、メモリ263、CPU261、記憶装置264、通信インターフェイス262から構成される。メモリ263には、DBMS125が格納されており、CPU261によって実行される。記憶装置264には、データベースのテーブル124が格納されており、必要に応じてメモリ263にロードされる。
FIG. 4 is a diagram showing a hardware configuration of the
従来技術では、アプリケーションの特徴やシステム構成、性能要件に応じて、手動でO/Rマッピングフレームワークに対してロック形式を手動で設定しており、ロック形式はO/Rマッピングフレームワークの定義ファイルに記載する等、ユーザが手動で設定を記述する必要があった。 In the prior art, the lock format is manually set for the O / R mapping framework according to the application characteristics, system configuration, and performance requirements, and the lock format is a definition file for the O / R mapping framework. It was necessary for the user to describe the settings manually.
本実施形態では、管理サーバが自動で適切なロック形式を判定して、設定するため、ユーザが手動で定義ファイルを記述する必要がなくなり、O/Rマッピングフレームワークの設定作業を軽減できる。 In this embodiment, since the management server automatically determines and sets an appropriate lock format, it is not necessary for the user to manually write a definition file, and the setting work of the O / R mapping framework can be reduced.
以上説明した様に本実施形態のデータベース処理装置によれば、トレースログとマッピングテーブルを解析してオブジェクトのロック形式を判定しロック形式の設定を行うので、データベース処理における適切なロック形式を導き出して、動的に適切なロック形式をO/Rマッピングフレームワークに対して設定することが可能である。 As described above, according to the database processing apparatus of the present embodiment, the lock format of the object is determined by analyzing the trace log and the mapping table, and the lock format is set. It is possible to dynamically set an appropriate lock format for the O / R mapping framework.
また本実施形態のデータベース処理装置によれば、トレースログとマッピングテーブルを解析してキューのリクエスト処理の同時実行数の増減を判定し同時実行数の設定を行うので、データベース処理におけるシステム全体のパフォーマンスを向上させることが可能である。 Further, according to the database processing apparatus of this embodiment, the trace log and the mapping table are analyzed to determine the increase / decrease in the number of simultaneous executions of queue request processing, and the number of simultaneous executions is set. It is possible to improve.
100…管理サーバ、101…ロードバランサ、102…スケジューラ、103…キュー、104…キューテーブル、105…アプリケーションサーバ、106…アプリケーション、107…ユーザオブジェクト、108…O/Rマッピングフレームワーク、109…参照部、110…更新部、111…マッピングテーブル、112…データベースアクセス部、113…データベースサーバ、114…トレーサ、115…トレースログ、116…解析部、117…判定部、118…ロック判定部、119…キュー判定部、120…設定部、121…サーバテーブル、122…オブジェクト管理テーブル、123…オペレーション対応テーブル、124…テーブル、125…DBMS、126…コンテナ、152…スケジューラ、153…キュー、154…キューテーブル、156…アプリケーション、157…ユーザオブジェクト、158…O/Rマッピングフレームワーク、159…参照部、160…更新部、161…マッピングテーブル、162…データベースアクセス部、164…トレーサ、165…トレースログ、176…コンテナ、201…CPU、202…メモリ、203…記憶装置、204…通信インターフェイス、231…通信インターフェイス、233…メモリ、242…CPU、261…CPU、262…通信インターフェイス、263…メモリ、264…記憶装置、1100…リクエスト、1101…リクエスト開始ポイント、1102…参照開始ポイント、1103…参照完了ポイント、1104…更新開始ポイント、1105…更新完了ポイント、1106…リクエスト完了ポイント、1107…参照時間、1108…中間時間、1109…更新時間、1110…処理時間、1111…待ち時間、1120…AP層、1121…OR層、1122…DB層、1200…リクエストA、1202…参照開始ポイント、1205…更新完了ポイント、1210…リクエストB、1212…参照開始ポイント、1213…参照完了ポイント、1215…更新完了ポイント、1220…リクエストC、1230…ロック時間、1240…ロック待ち時間、1300…リクエストA、1302…参照開始ポイント、1304…更新エラーポイント、1305…参照開始ポイント、1310…リクエストB、1312…参照開始ポイント、1315…更新完了ポイント、1316…処理時間、1317…浪費時間、601…オブジェクト、602…ロック形式、701…トレースポイント、702…時刻、703…リクエスト通番、704…オペレーション、705…オブジェクト、706…オブジェクトID、801…キュー名、802…オペレーション、803…閾値、901…オペレーション、902…オブジェクト、1001…オブジェクト、1002…ロック形式、1003…平均処理時間、1004…平均参照時間、1005…平均中間時間、1006…平均更新時間、1007…平均待ち時間、1008…ロック衝突率、1009…リトライなし平均処理時間、1701…サーバ名、1702…スケジューラ、1703…サーバテーブル。
DESCRIPTION OF
Claims (10)
複数のプログラム実行装置(アプリケーションサーバ)は、第1の記憶装置を有し、受け付けたオペレーションに基づいたプログラムの実行により該データベース装置へアクセスするとともにサービスを実現し、
管理装置は、第2の記憶装置を有し、前記複数のプログラム実行装置を管理し、
前記プログラム実行装置は、前記オペレーションを含む前記プログラムのトレースログと、前記プログラムが利用する前記データベースへのアクセス時に用いるロック形式を記憶したマッピングテーブルとを前記第1の記憶装置に格納し、
前記管理装置は、前記第1の記憶装置から前記トレースログと前記マッピングテーブルとを参照して解析し、前記オペレーションとその該オペレーションに基づいて実行されたプログラムと該プログラムのトレースログとを対応付けて前記第2の記憶装置に格納し、該格納した前記オペレーションとその該オペレーションに基づいて実行されたプログラムと該プログラムのトレースログを参照し、前記ロック形式毎に前記オペレーションに対する前記トレースログを評価して前記プログラム実行装置で用いる前記ロック形式を決定し、該決定したロック形式の前記複数のプログラム実行装置への設定を行うことを特徴とするデータベース処理方法。 The database device manages the database,
A plurality of program execution devices (application servers) have a first storage device, access the database device by executing a program based on the accepted operation, and realize a service,
The management device has a second storage device, manages the plurality of program execution devices,
The program execution device stores a trace log of the program including the operation and a mapping table storing a lock format used when accessing the database used by the program in the first storage device,
The management device analyzes the trace log and the mapping table from the first storage device, and associates the operation, a program executed based on the operation, and the trace log of the program. And storing the operation in the second storage device, referring to the stored operation, a program executed based on the operation, and a trace log of the program, and evaluating the trace log for the operation for each lock type. And determining the lock format used by the program execution device and setting the determined lock format to the plurality of program execution devices.
複数のプログラム実行装置(アプリケーションサーバ)は、第1の記憶装置を有し、受け付けたオペレーションに基づいたプログラムの実行により該データベース装置へアクセスするとともにサービスを実現し、
管理装置は、第2の記憶装置を有し、前記複数のプログラム実行装置を管理し、
前記プログラム実行装置は、前記オペレーションを含む前記プログラムのトレースログと、前記プログラムが利用する前記データベースへのアクセス時に用いるロック形式を記憶したマッピングテーブルとを前記第1の記憶装置に格納し、
前記管理装置は、前記第1の記憶装置から前記トレースログと前記マッピングテーブルとを参照して解析し、前記オペレーションとその該オペレーションに基づいて実行されたプログラムと該プログラムのトレースログとを対応付けて前記第2の記憶装置に格納し、該格納した前記オペレーションとその該オペレーションに基づいて実行されたプログラムと該プログラムのトレースログを参照し、前記ロック形式毎に前記オペレーションに対する前記トレースログを評価して前記プログラム実行装置で用いる前記ロック形式を決定し、該決定したロック形式の前記複数のプログラム実行装置への設定を行うことを特徴とする計算機システム。 The database device manages the database,
A plurality of program execution devices (application servers) have a first storage device, access the database device by executing a program based on the accepted operation, and realize a service,
The management device includes a second storage device, manages the plurality of program execution devices,
The program execution device stores a trace log of the program including the operation and a mapping table storing a lock format used when accessing the database used by the program in the first storage device,
The management device analyzes the trace log and the mapping table from the first storage device, and associates the operation, a program executed based on the operation, and the trace log of the program. And storing the operation in the second storage device, referring to the stored operation, a program executed based on the operation, and a trace log of the program, and evaluating the trace log for the operation for each lock type. And determining the lock format used in the program execution device and setting the determined lock format in the plurality of program execution devices.
複数のプログラム実行装置(アプリケーションサーバ)は、第1の記憶装置を有し、受け付けたオペレーションに基づいたプログラムの実行により該データベース装置へアクセスするとともにサービスを実現し、
管理装置は、第2の記憶装置を有し、前記複数のプログラム実行装置を管理し、
前記プログラム実行装置は、前記オペレーションを含む前記プログラムのトレースログと、前記プログラムが利用する前記データベースへのアクセス時に用いるロック形式を記憶したマッピングテーブルとを前記第1の記憶装置に格納し、
前記管理装置は、前記第1の記憶装置から前記トレースログと前記マッピングテーブルとを参照して解析し、前記オペレーションとその該オペレーションに基づいて実行されたプログラムと該プログラムのトレースログとを対応付けて前記第2の記憶装置に格納し、該格納した前記オペレーションとその該オペレーションに基づいて実行されたプログラムと該プログラムのトレースログを参照し、前記ロック形式毎に前記オペレーションに対する前記トレースログを評価して前記プログラム実行装置で用いる前記ロック形式を決定し、該決定したロック形式の前記複数のプログラム実行装置への設定を行うデータベース処理方法をコンピュータに実行させることを特徴とするプログラム。 The database device manages the database,
A plurality of program execution devices (application servers) have a first storage device, access the database device by executing a program based on the accepted operation, and realize a service,
The management device includes a second storage device, manages the plurality of program execution devices,
The program execution device stores a trace log of the program including the operation and a mapping table storing a lock format used when accessing the database used by the program in the first storage device,
The management device analyzes the trace log and the mapping table from the first storage device, and associates the operation, a program executed based on the operation, and the trace log of the program. And storing the operation in the second storage device, referring to the stored operation, a program executed based on the operation, and a trace log of the program, and evaluating the trace log for the operation for each lock type. A program for causing a computer to execute a database processing method for determining the lock format used in the program execution device and setting the determined lock format in the plurality of program execution devices.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007203272A JP5055059B2 (en) | 2007-08-03 | 2007-08-03 | Database processing method, implementation system and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007203272A JP5055059B2 (en) | 2007-08-03 | 2007-08-03 | Database processing method, implementation system and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009037544A true JP2009037544A (en) | 2009-02-19 |
JP5055059B2 JP5055059B2 (en) | 2012-10-24 |
Family
ID=40439367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007203272A Expired - Fee Related JP5055059B2 (en) | 2007-08-03 | 2007-08-03 | Database processing method, implementation system and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5055059B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012150711A (en) * | 2011-01-20 | 2012-08-09 | Nec Corp | Processing time prediction device, processing time prediction method, and processing time prediction program |
DE102012221037A1 (en) | 2011-12-02 | 2013-06-06 | International Business Machines Corporation | Unit and method for realizing a resource lock |
JP2016066333A (en) * | 2014-09-26 | 2016-04-28 | 株式会社野村総合研究所 | Lock control system and method for database |
JP2016095638A (en) * | 2014-11-13 | 2016-05-26 | 日本電気株式会社 | Transaction processor, transaction processing method, and program |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000353101A (en) * | 1999-06-11 | 2000-12-19 | Nec Corp | Device and method for data sharing management |
JP2002244891A (en) * | 2001-01-31 | 2002-08-30 | Hewlett Packard Co <Hp> | Method of automatically improving performance of computer system |
-
2007
- 2007-08-03 JP JP2007203272A patent/JP5055059B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000353101A (en) * | 1999-06-11 | 2000-12-19 | Nec Corp | Device and method for data sharing management |
JP2002244891A (en) * | 2001-01-31 | 2002-08-30 | Hewlett Packard Co <Hp> | Method of automatically improving performance of computer system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012150711A (en) * | 2011-01-20 | 2012-08-09 | Nec Corp | Processing time prediction device, processing time prediction method, and processing time prediction program |
DE102012221037A1 (en) | 2011-12-02 | 2013-06-06 | International Business Machines Corporation | Unit and method for realizing a resource lock |
US8898127B2 (en) | 2011-12-02 | 2014-11-25 | International Business Machines Corporation | Device and method for acquiring resource lock |
US9189512B2 (en) | 2011-12-02 | 2015-11-17 | International Business Machines Corporation | Device and method for acquiring resource lock |
JP2016066333A (en) * | 2014-09-26 | 2016-04-28 | 株式会社野村総合研究所 | Lock control system and method for database |
JP2016095638A (en) * | 2014-11-13 | 2016-05-26 | 日本電気株式会社 | Transaction processor, transaction processing method, and program |
US10303676B2 (en) | 2014-11-13 | 2019-05-28 | Nec Corporation | Transaction processing apparatus, transaction processing method, and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP5055059B2 (en) | 2012-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10810051B1 (en) | Autoscaling using file access or cache usage for cluster machines | |
US7092971B2 (en) | Prefetch appliance server | |
US9430388B2 (en) | Scheduler, multi-core processor system, and scheduling method | |
JP4778035B2 (en) | Computer system and method and computer program for preventing delay in execution time of instructions executed while exclusively using external resources | |
US11899648B2 (en) | Concurrency control for transactions in database systems | |
US8176076B2 (en) | Method and system for controlling accesses to a database | |
JP4961931B2 (en) | Job execution scheduling program, job execution scheduling method, and job execution scheduling apparatus | |
US11809916B2 (en) | Deadlock detection in distributed databases | |
US11709818B2 (en) | Managing concurrent transactions in database systems | |
JP5055059B2 (en) | Database processing method, implementation system and program | |
KR100899527B1 (en) | Muti-thread management system for web service and method therefor | |
US20020042850A1 (en) | System and method for deadlock management in database systems with demultiplexed connections | |
US10599472B2 (en) | Information processing apparatus, stage-out processing method and recording medium recording job management program | |
US11449241B2 (en) | Customizable lock management for distributed resources | |
JP2005107632A (en) | Eai server, and program for eai server | |
US11704305B1 (en) | Optimizations for long-lived statements in a database system | |
US20230195719A1 (en) | Optimizations to read and write transactions for large values in distributed databases | |
US20230325409A1 (en) | Scalable compaction for a distributed database | |
JP5212216B2 (en) | Job processing device | |
CN112328408A (en) | Data processing method, device, system, equipment and storage medium | |
CN116226081A (en) | Database elastic expansion method and device, electronic equipment and storage medium | |
JP2006127362A (en) | Connection allocation method, device, and program | |
KR20030068779A (en) | A Method of the Multi-thread Client Liberary's Operating in Database System | |
KR20050060806A (en) | Multi-database system for integration of heterogeneous data by using messaging system and the simultaneous control method | |
JP2007156796A (en) | Network operation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100114 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120620 |
|
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: 20120703 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120730 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150803 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |