JP2008146420A - Computer program for optimizing processing sequence of i/o request - Google Patents

Computer program for optimizing processing sequence of i/o request Download PDF

Info

Publication number
JP2008146420A
JP2008146420A JP2006333932A JP2006333932A JP2008146420A JP 2008146420 A JP2008146420 A JP 2008146420A JP 2006333932 A JP2006333932 A JP 2006333932A JP 2006333932 A JP2006333932 A JP 2006333932A JP 2008146420 A JP2008146420 A JP 2008146420A
Authority
JP
Japan
Prior art keywords
requests
request
queue
order
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006333932A
Other languages
Japanese (ja)
Other versions
JP4951326B2 (en
Inventor
Hiromi Uwada
弘美 宇和田
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.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute Ltd
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 Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2006333932A priority Critical patent/JP4951326B2/en
Publication of JP2008146420A publication Critical patent/JP2008146420A/en
Application granted granted Critical
Publication of JP4951326B2 publication Critical patent/JP4951326B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To improve the throughput of an I/O control system for optimizing an I/O request processing sequence in the I/O control system. <P>SOLUTION: This computer program includes checking how many and how sequenced I/O requests are lined up in the queue of an I/O control system, and which storage region is pertinent to the I/O destination of each of the I/O requests, and calculating the number of I/O as the number of the I/O requests as the I/O destinations for each of two or more storage regions as the I/O destinations of a plurality of I/O requests lined up in the queue among a plurality of storage regions based on the check result, and rearranging the sequence of the plurality of I/O requests in the queue so that the I/O requests whose I/O destinations belong to the storage regions with the larger number of I/O can be sequenced more earlier. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、I/O要求(入出力要求)の処理順序の最適化に関する。   The present invention relates to optimization of the processing order of I / O requests (input / output requests).

例えば、特許文献1には、アプリケーションからのアクセス要求を一元監視し、アプリケーションを追加した場合の予想負荷データを出力することが開示されている。また、特許文献2には、アクセスが局所的に集中する際に、高速書込みできるバッファに一時蓄積して、シーク/サーチ時間を考慮したスケジューリングを行うことが開示されている。また、特許文献3には、[登録時刻*スケジュールパラメータ]なる評価式を使用してI/O要求の発行順序を決めることが開示されている。さらに、特許文献4には、トランザクション実効効率を最適化すべくDBMSのアクセスプランを生成することが開示されている。   For example, Patent Document 1 discloses that access requests from applications are centrally monitored and expected load data when an application is added is output. Further, Patent Document 2 discloses that when accesses are concentrated locally, scheduling is performed in consideration of seek / search time by temporarily accumulating in a buffer capable of high-speed writing. Patent Document 3 discloses that the order of issuing I / O requests is determined using an evaluation formula [registration time * schedule parameter]. Further, Patent Document 4 discloses that a DBMS access plan is generated to optimize transaction effective efficiency.

特開2005−149283号公報JP 2005-149283 A 特開平10−111762号公報Japanese Patent Laid-Open No. 10-111762 特開平10−289189号公報Japanese Patent Laid-Open No. 10-289189 特開2002−32249号公報JP 2002-32249 A

ところで、I/O要求発行元からI/O要求を受信して一旦キューに蓄積し該キューから出力されたI/O要求について所定の処理が完了した場合に所定の応答をI/O要求発行元に返すI/O制御システムとして、例えば、データベースを管理するソフトウェアであるDBMS(DataBase Management System)が知られている。DBMSは、アプリケーションからのI/O要求に基づいて、データベースに関する操作(以下、「データベース操作」)を行う。データベース操作とは、例えば、データの書込み(更新)、データの読み出し(参照)、データの削除等である。DBMSは、そのI/O要求について所定の処理が完了した場合に、所定の応答を、そのI/O要求の発行元であるアプリケーションに返す。所定の処理としては、例えば、後述する排他制御権の取得、データベース操作の一つとして記憶装置に対してI/Oコマンドを発行する処理がある。   By the way, when an I / O request is received from an I / O request issuer, is temporarily stored in a queue, and predetermined processing is completed for an I / O request output from the queue, a predetermined response is issued. As an I / O control system to be returned to the original, for example, a DBMS (DataBase Management System) which is software for managing a database is known. The DBMS performs an operation related to a database (hereinafter, “database operation”) based on an I / O request from an application. Database operations include, for example, writing (updating) data, reading (referring) data, and deleting data. When a predetermined process is completed for the I / O request, the DBMS returns a predetermined response to the application that issued the I / O request. As the predetermined processing, for example, there is processing for obtaining an exclusive control right described later and issuing an I / O command to the storage device as one of database operations.

DBMSは、一般に、オペレーティングシステム(OS)上で稼動し、OSから認識される複数のプロセスからなるプロセス群として構成される。以下、DBMSにおける個々のプロセスを「DBMSプロセス」と言う。複数のDBMSプロセスは、それぞれ、複数のアプリケーションプロセス(アプリケーションプログラムにおけるプロセス)と通信し、そのアプリケーションプロセスからのI/O要求を処理することになる。このため、複数のDBMSプロセスが、同一の記憶領域に対して同時にアクセスすることが起こりうる。   The DBMS is generally configured as a process group including a plurality of processes that are operated on an operating system (OS) and recognized by the OS. Hereinafter, each process in the DBMS is referred to as a “DBMS process”. Each of the plurality of DBMS processes communicates with a plurality of application processes (processes in the application program), and processes I / O requests from the application processes. For this reason, a plurality of DBMS processes may simultaneously access the same storage area.

これを防ぐために、ミューテックスなどを応用した排他制御が用いられている。この場合、ある記憶領域に対する排他制御権(言い換えればI/O実行権)を取得できたDBMSプロセスのみが、該記憶領域に対してI/Oを実行することができる一方で、同じ記憶領域にI/Oを実行したい他のDBMSプロセスは、記憶領域に対応した排他制御権を取得できるまで、その記憶領域に対するI/Oの実行が待たされることになる。   In order to prevent this, exclusive control using a mutex is used. In this case, only a DBMS process that has acquired an exclusive control right (in other words, an I / O execution right) for a certain storage area can execute I / O for the storage area, while in the same storage area. Another DBMS process that wishes to execute I / O waits for execution of I / O to the storage area until it can acquire the exclusive control right corresponding to the storage area.

一つのI/O要求で複数の記憶領域に対してそれぞれI/Oが発生する場合があるが、その場合は、それら複数の記憶領域の全てについて排他制御権を取得できたときに、それら複数の記憶領域の各々にI/Oを行うことが可能になる。このようなI/O要求についての処理の完了、言い換えれば、I/O要求を発行してから所定の応答をDBMSから受信するまでのアプリケーションにとっての待ち時間は、それら複数の記憶領域のうちの最も遅くに終わる処理に依存する。   There may be cases where I / O is generated for each of a plurality of storage areas with one I / O request. In this case, when the exclusive control right can be acquired for all of the plurality of storage areas, I / O can be performed on each of the storage areas. Completion of processing for such an I / O request, in other words, the waiting time for an application from issuing an I / O request to receiving a predetermined response from the DBMS is the number of storage areas. Depends on the process that ends most recently.

通常、複数のアプリケーションプロセスからそれぞれ発行されたI/O要求は、DBMSで管理されているキュー(典型的にはFIFO(First In First Out)形式のバッファ)に一旦蓄積され、そのキューから出力された順序で処理されるが、このような環境下で、I/O要求を受け付けた順番通りに処理していくと、DBMSのスループットの劣化につながるおそれがある。   Normally, I / O requests issued from multiple application processes are temporarily stored in a queue managed by the DBMS (typically FIFO (First In First Out) buffer) and output from the queue. However, if the processing is performed in the order in which the I / O requests are received in such an environment, the throughput of the DBMS may be deteriorated.

以上のような問題点は、DBMSに限らず、他種の前述したI/O制御システムにも同様に存在し得る。   The problems as described above can be present not only in the DBMS but also in other types of I / O control systems described above.

従って、本発明の目的は、I/O制御システムでのI/O要求処理順序を最適化することでそのI/O制御システムのスループットを向上させることである。   Therefore, an object of the present invention is to improve the throughput of the I / O control system by optimizing the I / O request processing order in the I / O control system.

I/O制御システムのキューにどんな順序でどれだけの数のI/O要求が並んでいて各I/O要求のI/O先はどの記憶領域であるかのチェックを行う。そして、そのチェックの結果を基に、複数の記憶領域のうちの、キュー内に並んでいる複数のI/O要求でI/O先とされる二以上の記憶領域の各々について、I/O先とされるI/O要求の数であるI/O数を算出し、I/O数が多い記憶領域をI/O先とするI/O要求ほど早い順番とするようキュー内での複数のI/O要求の順序を並び替える。   It is checked which number of I / O requests are arranged in what order in the queue of the I / O control system and which storage area is the I / O destination of each I / O request. Then, based on the result of the check, I / O is performed for each of two or more storage areas that are set as I / O destinations in a plurality of I / O requests arranged in the queue among the plurality of storage areas. The number of I / Os, which is the number of I / O requests that are the destination, is calculated. The order of the I / O requests is rearranged.

キューで蓄積されたまま残っている複数のI/O要求でI/O先とされる二以上の記憶領域のそれぞれについてI/O数を算出し、該算出されたI/O数に着目した並び替え、具体的には、I/O数が多い記憶領域をI/O先とするI/O要求ほど優先的に先に処理するような並び替えを行うことにより、I/O制御システムのスループットの向上が期待できる。   The number of I / Os is calculated for each of two or more storage areas that are the I / O destinations of a plurality of I / O requests that remain accumulated in the queue, and attention is paid to the calculated number of I / Os. Rearrangement, specifically, rearrangement is performed so that I / O requests that have a storage area with a large number of I / Os as the I / O destination are processed first. Increased throughput can be expected.

この技術は、I/O制御システムに適用することができる。ここで言う「I/O制御システム」は、DBMSに代表されるコンピュータプログラムであっても良いし、該コンピュータプログラムを読み込んで実行することによりI/O制御機能(例えばDBMSとしての機能)を発揮するコンピュータマシン(例えばサーバマシン)であっても良い。   This technique can be applied to an I / O control system. The “I / O control system” mentioned here may be a computer program typified by a DBMS, and exhibits an I / O control function (for example, a function as a DBMS) by reading and executing the computer program. It may be a computer machine (for example, a server machine).

また、“I/O”とは、入出力の略である。故に、I/O要求は、入力要求であっても良いし、書込み要求であっても良い。また、I/O要求は、直接的に入力或いは出力を要求するものに限らず、入力或いは出力が行われることになる要求であってもよい。例えば、I/O制御システムがDBMSであって、該DBMSが、prepare(SQL文)を受信しそれに応答して所定の準備ができた後にcommitを受信するタイプのDBMSである場合には、prepare及びcommitのうちの少なくとも一方が上述したI/O要求となる。   “I / O” is an abbreviation for input / output. Therefore, the I / O request may be an input request or a write request. Further, the I / O request is not limited to a request for direct input or output, but may be a request for input or output. For example, when the I / O control system is a DBMS and the DBMS is a DBMS of a type that receives a prepare (SQL statement) and receives a commit after receiving a preparation (SQL statement) in response thereto, prepare. And at least one of the commits is the I / O request described above.

また、上記チェックは、定期的に或いは不定期的に行うことができる。I/O要求の順序の並び替えは、典型的には、チェックが行われる都度に行われることになるが、それに限らず、複数回のチェックが行われてから一回の並び替えが行われる方式であっても良い。   The check can be performed regularly or irregularly. The rearrangement of the order of I / O requests is typically performed each time a check is performed, but is not limited to this, and the rearrangement is performed once after a plurality of checks are performed. It may be a method.

<第一の実施形態>   <First embodiment>

以下、本発明の第一の実施形態に係るI/O要求の処理順序の最適化方式について、図面を参照して説明する。なお、以下の説明では、I/O制御システムは、DBMS(特に、リレーショナルデータベース管理システム(RDBMS))であるとする。また、以下、説明を分かり易くするため、一つのI/O要求は、一つのトランザクションであるとし、一つのアプリケーションプロセスから送信され、オペレーティングシステム(OS)からCPU時間が割り当てられた一つのDBMSプロセスによってキューから読み出されて処理されるものとする。   Hereinafter, a method for optimizing the processing order of I / O requests according to the first embodiment of the present invention will be described with reference to the drawings. In the following description, it is assumed that the I / O control system is a DBMS (particularly, a relational database management system (RDBMS)). In addition, hereinafter, for the sake of easy understanding, it is assumed that one I / O request is one transaction, one DBMS process that is transmitted from one application process and assigned CPU time from the operating system (OS). Is read from the queue and processed.

図1は、本実施形態に係るシステム全体の構成を示す図である。   FIG. 1 is a diagram showing a configuration of the entire system according to the present embodiment.

サーバ104と、クライアント101(ここでは、クライアント(1)101a、クライアント(2)101b、クライアント(3)101c)とが、それぞれネットワーク103に接続されている。   A server 104 and a client 101 (here, client (1) 101a, client (2) 101b, client (3) 101c) are connected to the network 103, respectively.

サーバ104は、DBMS107を備えたデータベースサーバとして機能する。各クライアント101のアプリケーション102(ここでは、アプリケーション(1)102a、アプリケーション(2)102b、アプリケーション(3)102c)における一のプロセス(アプリケーションプロセス)は、DBMS107に対して、データベース操作の内容を例えばSQLで記述した要求(以下、「I/O要求」)を送信する。I/O要求を受信したDBMS107は、その受信したI/O要求を待ち受けキュー105(ここではFIFO(First-In First-Out)型のバッファ)に一時蓄積する。DBMS107のプロセス群1071のうちの、OSからCPU時間が割り当てられた一のプロセス(DBMSプロセス)が、待ち受けキュー105の先頭にあるI/O要求を読み出して解釈して、そのI/O要求に対応したデータベース操作を行う。そのデータベース操作により、ストレージ108に対してI/Oコマンドが発行される。なお、ここで、ストレージ108は、例えば、一以上のディスク型記憶装置(以下、単に「ディスク」と言う)1081を備えた装置とすることができる。ストレージ108では、複数のディスク1081でRAID(Redundant Array of Independent (or Inexpensive) Disks)が構成されていても良いし、一以上のディスク1081の記憶空間を利用して論理ユニット(論理的な記憶装置)が用意されていても良い。ディスク1081や論理ユニットに代えて他種の二次記憶装置が採用されても良い(一次記憶装置はサーバ104内の図示しないメモリ)。つまり、二次記憶装置は、物理的な記憶装置であっても良いし論理的な記憶装置であっても良い。   The server 104 functions as a database server provided with the DBMS 107. One process (application process) in the application 102 (here, application (1) 102a, application (2) 102b, application (3) 102c) of each client 101 sends the contents of the database operation to the DBMS 107, for example, SQL. The request described below (hereinafter referred to as “I / O request”) is transmitted. Receiving the I / O request, the DBMS 107 temporarily stores the received I / O request in the waiting queue 105 (here, a FIFO (First-In First-Out) type buffer). Of the process group 1071 of the DBMS 107, one process (DBMS process) to which the CPU time is allocated from the OS reads and interprets the I / O request at the head of the waiting queue 105, and converts it to the I / O request. Perform the corresponding database operation. By this database operation, an I / O command is issued to the storage 108. Here, the storage 108 can be, for example, an apparatus including one or more disk storage devices (hereinafter simply referred to as “disks”) 1081. In the storage 108, a plurality of disks 1081 may form a RAID (Redundant Array of Independent (or Inexpensive) Disks), or a logical unit (logical storage device) using the storage space of one or more disks 1081. ) May be prepared. Instead of the disk 1081 or the logical unit, another type of secondary storage device may be employed (the primary storage device is a memory (not shown) in the server 104). That is, the secondary storage device may be a physical storage device or a logical storage device.

DBMS107では、複数の論理的な記憶領域、並びに、それら複数の論理的な記憶領域の各々とストレージ108における物理的な記憶領域との対応付けを表す情報が管理されている。ここでは、論理的な記憶領域を、ブロック1074とし、複数のブロック1074と複数の物理的な記憶領域との対応付けを表した情報を、ブロック索引1073とする。I/O要求には、例えば、I/O先を表す情報(以下、I/O先情報)として、物理的な記憶領域を表す情報(以下、物理領域情報、例えばアドレス)が記録されていて、DBMS107では、その物理領域情報を用いてブロック索引1073を参照することで、その物理領域情報が表す物理的な記憶領域に対応したブロック1074(つまり、I/O先となるブロック1074)を特定することができる。一つのブロック1074に対応付けられる一つの物理的な記憶領域は、ブロック索引1073においてどのように定義されても良い。具体的には、ストレージ108は、いくつかの物理的な記憶領域に分離され、その分離された記憶領域ごとにデータベース操作が行われる。この分離された記憶領域は、排他制御の単位となるものであり、以下、この領域を排他制御単位と呼ぶ。排他制御単位は、様々な態様をとることができ、例えば、ディスク1081、ファイル1082、レコード1083、及び論理ユニットのうちの少なくとも一つとしても良い(その際、例えば、複数のディスク1081をまたぐ形で定義されても良いし、ディスク1081の一部として定義されても良い)。このような排他制御単位に一つのブロック1074が対応付けられているため、ブロック1074も、排他制御単位となる。   The DBMS 107 manages a plurality of logical storage areas and information indicating the correspondence between each of the plurality of logical storage areas and a physical storage area in the storage 108. Here, the logical storage area is the block 1074, and the information representing the correspondence between the plurality of blocks 1074 and the plurality of physical storage areas is the block index 1073. In the I / O request, for example, information indicating a physical storage area (hereinafter, physical area information, for example, an address) is recorded as information indicating the I / O destination (hereinafter, I / O destination information). The DBMS 107 identifies the block 1074 corresponding to the physical storage area represented by the physical area information (that is, the block 1074 that is the I / O destination) by referring to the block index 1073 using the physical area information. can do. One physical storage area associated with one block 1074 may be defined in any way in the block index 1073. Specifically, the storage 108 is separated into several physical storage areas, and a database operation is performed for each of the separated storage areas. This separated storage area is a unit of exclusive control, and this area is hereinafter referred to as an exclusive control unit. The exclusive control unit may take various forms, and may be, for example, at least one of the disk 1081, the file 1082, the record 1083, and the logical unit (in this case, for example, a form that spans a plurality of disks 1081). Or may be defined as part of the disk 1081). Since one block 1074 is associated with such an exclusive control unit, the block 1074 is also an exclusive control unit.

この実施形態では、例えば以下の流れで、一つのI/O要求(以下、この説明において、「対象I/O要求」と言う)が完結する。
(ステップ1)アプリケーションプロセスがprepare文(SQL)を発行する。
(ステップ2)DBMS107がアプリケーションプロセスからの該SQLを解釈して、対象I/O要求に変換した後、待ち受けキュー105に一旦蓄積する。
(ステップ3)アプリケーションプロセスがcommit文(SQL)を発行する。
(ステップ4)待ち受けキュー105に蓄積された対象I/O要求のcommitフラグを有効にする。
(ステップ5)待ち受けキュー105の前方にあるI/O要求のなかで、commitフラグが有効になっているものがDBMSプロセスによって取り出される都度、それより後方に蓄積されている対象I/O要求の順番が一つ繰り上がる。このような処理が繰り返されることで、commitフラグが有効になっている対象I/O要求が取り出される可能性が高まり、やがて、DBMSプロセスによって、対象I/O要求が待ち受けキュー105から取り出される。DBMSプロセスが、対象I/O要求に含まれている情報とブロック索引1073とを用いて、I/O先のブロック1074(以下、対象ブロック1074)を特定し、対象ブロック1074に対応するミューテックス1072の取得を試みる。取得できなければ、待ちとなる。また、対象ブロック1074が複数個ある場合には、それら複数の対象ブロック1074にそれぞれ対応した複数のミューテックス1072を全て取得できるまで、待ちとなる。
(ステップ6)ミューテックス1072を取得できたならば、DBMSプロセスが、ストレージ108内の、対象ブロック1074に対応した物理的な記憶領域を有する二次記憶装置に対し、該物理的な記憶領域を指定したI/Oコマンドを送信する。該I/Oコマンドに対して所定のコマンド応答(例えばI/O成功)を受信した場合、DBMSプロセスは、ミューテックス1072を解放し、対象I/O要求に対する所定の要求応答(例えば成功)を、アプリケーションプロセスに通知する。
(ステップ7)アプリケーションプロセスが、成功を受信する。
In this embodiment, for example, one I / O request (hereinafter referred to as “target I / O request” in this description) is completed in the following flow.
(Step 1) The application process issues a prepare statement (SQL).
(Step 2) The DBMS 107 interprets the SQL from the application process, converts it into a target I / O request, and temporarily stores it in the standby queue 105.
(Step 3) The application process issues a commit statement (SQL).
(Step 4) The commit flag of the target I / O request accumulated in the waiting queue 105 is validated.
(Step 5) Every time an I / O request in the front of the waiting queue 105 with the commit flag being valid is taken out by the DBMS process, the target I / O request accumulated behind it is retrieved. The order goes up by one. By repeating such processing, the possibility that the target I / O request with the commit flag being valid is extracted is increased. Eventually, the target I / O request is extracted from the standby queue 105 by the DBMS process. The DBMS process uses the information included in the target I / O request and the block index 1073 to identify an I / O destination block 1074 (hereinafter referred to as the target block 1074), and a mutex 1072 corresponding to the target block 1074. Try to get. If it cannot be obtained, it will be waiting. If there are a plurality of target blocks 1074, the process waits until all of the plurality of mutexes 1072 respectively corresponding to the plurality of target blocks 1074 can be acquired.
(Step 6) If the mutex 1072 can be acquired, the DBMS process designates the physical storage area for the secondary storage device having the physical storage area corresponding to the target block 1074 in the storage 108. Sent the I / O command. When a predetermined command response (for example, I / O success) is received in response to the I / O command, the DBMS process releases the mutex 1072, and receives a predetermined request response (for example, success) for the target I / O request. Notify the application process.
(Step 7) The application process receives success.

以上の流れにおいて、(ステップ1)〜(ステップ7)までが、アプリケーションプログラム102にとっての待ち時間である。なお、前述したコマンド応答とは、DBMSが、I/Oコマンドの送信先の二次記憶装置から受信する、該I/Oコマンドに対する応答である。一方、前述した要求応答とは、DBMSが、I/O要求の送信元のアプリケーションに送信する、該I/O要求に対する応答である。   In the above flow, steps (step 1) to (step 7) are waiting times for the application program 102. The command response described above is a response to the I / O command that the DBMS receives from the secondary storage device that is the transmission destination of the I / O command. On the other hand, the above-described request response is a response to the I / O request that the DBMS transmits to the application that is the transmission source of the I / O request.

本実施形態では、待ち受けキュー105に蓄積されている複数のI/O要求についての全体的な待ち時間を短縮することを図るべく、最適化部106が備えられる。最適化部106は、待ち受けキュー105(典型的には、FIFO(First-In First-Out)型のバッファ)で並んでいる複数のI/O要求と、それら複数のI/O要求から特定される複数のブロックとを基にしたマトリクスを作成し、該マトリクス上での並び替えを実行することで、上記の全体的な待ち時間を短縮することができる。最適化部106は、DBMS107同様、サーバ104のCPU(図示せず)で実行されるコンピュータプログラムである。最適化部106は、DBMS107に組み込まれていても良いし、DBMS107と通信可能にDBMS107の外に存在していても良い。   In the present embodiment, an optimization unit 106 is provided in order to reduce the overall waiting time for a plurality of I / O requests accumulated in the standby queue 105. The optimization unit 106 is specified from a plurality of I / O requests arranged in the standby queue 105 (typically, a FIFO (First-In First-Out) buffer) and the plurality of I / O requests. By creating a matrix based on a plurality of blocks and performing rearrangement on the matrix, the overall waiting time can be shortened. The optimization unit 106 is a computer program that is executed by the CPU (not shown) of the server 104, like the DBMS 107. The optimization unit 106 may be incorporated in the DBMS 107 or may exist outside the DBMS 107 so as to be communicable with the DBMS 107.

図2は、最適化部106の機能の説明図である。   FIG. 2 is an explanatory diagram of the function of the optimization unit 106.

最適化部106は、キュー監視蓄積部1061と、I/O性能蓄積部1062と、I/O行列置換部1063とを備える。   The optimization unit 106 includes a queue monitoring storage unit 1061, an I / O performance storage unit 1062, and an I / O matrix replacement unit 1063.

キュー監視蓄積部1061は、待ち受けキュー105の状況を定期的にチェックし、該状況を表す情報(以下、「キュー状況情報」)2611を、所定の記憶域261(例えばサーバ104における図示しないメモリ上の領域)に蓄積する。キュー状況情報2611としては、例えば、待ち受けキュー105に蓄えられているI/O要求の数、順序、各I/O要求の到着時刻、commitフラグ、要求内容等がある。要求内容には、書込み又は読込みといったデータベース操作の種別や、I/O先のブロック1074等の情報が含まれる。   The queue monitoring accumulation unit 1061 periodically checks the status of the standby queue 105, and stores information (hereinafter referred to as “queue status information”) 2611 indicating the status on a predetermined storage area 261 (for example, on a memory (not shown) in the server 104). Area). The queue status information 2611 includes, for example, the number and order of I / O requests stored in the standby queue 105, the arrival time of each I / O request, a commit flag, and request contents. The request content includes information such as the type of database operation such as writing or reading, the I / O destination block 1074, and the like.

I/O性能蓄積部1062は、二次記憶装置ごとに、その二次記憶装置に対応するI/O性能を取得する。ここで言うI/O性能とは、例えば、DBMSプロセスによって二次記憶装置にI/Oコマンドが発行されてから所定の応答がその二次記憶装置から戻ってくるまでの時間長である。I/O性能蓄積部1062は、取得したI/O性能を表す数値(I/O性能値)を用いて、該I/O性能の二次記憶装置に対応したI/O性能情報2612を更新する。I/O性能情報2612は、例えば、所定の記憶域261に二次記憶装置毎に用意される。I/O性能情報2612には、各時点で取得されたI/O性能値と、第一の時点から第二の時点までの複数のI/O性能値の統計(I/O性能統計)とが含まれる。I/O性能統計は、例えば、I/O性能蓄積部1062によって求められる。I/O性能統計は、典型的には、標準正規分布に従うとみなすことができる。このI/O性能統計は、例えば、この第一実施形態に係るシステムで業務を開始する前のテスト稼動において、各ブロックサイズが適切かどうかを管理者が判断するのに有用である。例えば、管理者は、同種の二次記憶装置(例えば、データ転送速度やI/O速度が同程度である二次記憶装置)のI/O性能統計を参照することにより、同種の二次記憶装置であるにも関わらずI/O性能(例えば、平均、標準偏差)に想定誤差以上の差があるか否かを判断し、そのような差がある場合には、I/O性能の低い方の二次記憶装置に対応付けるブロックサイズを、I/O性能の高い方の二次記憶装置に対応付けるブロックサイズに比して、小さくする(言い換えれば、一つのブロックに割り当てる物理的な記憶領域のサイズを小さくする)といったチューニングを施すことができる。上記の判断及びチューニングは、コンピュータプログラム(例えば最適化部106に含まれるプログラム)によって自動的に行われても良い。   The I / O performance accumulating unit 1062 acquires the I / O performance corresponding to the secondary storage device for each secondary storage device. The I / O performance referred to here is, for example, the length of time from when an I / O command is issued to the secondary storage device by the DBMS process until a predetermined response is returned from the secondary storage device. The I / O performance storage unit 1062 updates the I / O performance information 2612 corresponding to the secondary storage device of the I / O performance, using the acquired numerical value (I / O performance value) representing the I / O performance. To do. The I / O performance information 2612 is prepared for each secondary storage device in a predetermined storage area 261, for example. The I / O performance information 2612 includes an I / O performance value acquired at each time point, a plurality of I / O performance value statistics (I / O performance statistics) from the first time point to the second time point, and Is included. The I / O performance statistics are obtained by the I / O performance accumulation unit 1062, for example. I / O performance statistics can typically be considered to follow a standard normal distribution. This I / O performance statistic is useful, for example, for an administrator to determine whether each block size is appropriate in a test operation before starting business in the system according to the first embodiment. For example, the administrator refers to the I / O performance statistics of the same type of secondary storage device (for example, a secondary storage device having the same data transfer rate and I / O rate), thereby allowing the same type of secondary storage device. It is determined whether the I / O performance (for example, average, standard deviation) has a difference greater than the expected error despite being a device, and if there is such a difference, the I / O performance is low. The block size associated with the secondary storage device is made smaller than the block size associated with the secondary storage device with higher I / O performance (in other words, the physical storage area allocated to one block Tuning, such as reducing the size). The above determination and tuning may be automatically performed by a computer program (for example, a program included in the optimization unit 106).

I/O行列置換部1063は、キュー監視蓄積部1061が蓄積したキュー状況情報に基づいて、待ち受けキュー105で並んでいるI/O要求の順序を、例えば図示のように並び替える。   Based on the queue status information accumulated by the queue monitoring accumulation unit 1061, the I / O matrix substitution unit 1063 rearranges the order of I / O requests arranged in the standby queue 105, for example, as illustrated.

以下、図3及び図4を参照して、この並び替え処理の詳細を説明する。なお、各図において、“R”は、Request(要求)の頭文字を意味し、“B”は、Block(ブロック)の頭文字を意味する。また、以下では簡単のために、待ち受けキュー105には、ある時点のスナップショットとして7つのI/O要求R1〜R7が蓄えられていて、I/O要求R1〜R7は、全て、commitフラグが有効になっており、各々のI/O要求は、ブロックB1〜B7の範囲にI/Oを発生せしめるという前提で説明する。   Details of the rearrangement process will be described below with reference to FIGS. 3 and 4. In each figure, “R” means an acronym for Request (request), and “B” means an acronym for Block (block). In the following, for the sake of simplicity, the standby queue 105 stores seven I / O requests R1 to R7 as snapshots at a certain point in time, and all the I / O requests R1 to R7 have a commit flag. Each I / O request is valid and will be described on the assumption that I / O is generated in the range of blocks B1 to B7.

I/O行列置換部1063が、例えば、キュー状況情報を解釈し、該解釈の結果を基に、図3(a)で示されるようなマトリクスを作成する。このマトリクスは、行方向に、待ち受けキュー105に蓄えられているI/O要求R1〜R7を配列し(つまり、キュー状況情報から特定される順序に従ってI/O要求R1〜R7を配列し)、列方向に、ブロックB1〜B7を、それぞれ配列したものである。各行において、その行に対応したI/O要求でI/O先となっているブロックに対応した位置には、所定の値(図では丸印で表している)がセットされる。従って、このマトリクスからは、例えば、I/O要求R1では、ブロックB1及びB5がI/O先とされていることがわかる。   For example, the I / O matrix replacement unit 1063 interprets the queue status information and creates a matrix as shown in FIG. 3A based on the result of the interpretation. This matrix arranges the I / O requests R1 to R7 stored in the standby queue 105 in the row direction (that is, arranges the I / O requests R1 to R7 according to the order specified from the queue status information), Blocks B1 to B7 are arranged in the column direction. In each row, a predetermined value (represented by a circle in the figure) is set at the position corresponding to the block that is the I / O destination in the I / O request corresponding to that row. Therefore, it can be seen from this matrix that, for example, in the I / O request R1, the blocks B1 and B5 are the I / O destinations.

このようなマトリクスを作成した後、列の置換処理と、行の置換処理とが行われる。   After creating such a matrix, column replacement processing and row replacement processing are performed.

列の置換処理は、以下の通りである。すなわち、I/O行列置換部1063が、各ブロック毎のI/O数(丸印の数)を計算する。そして、I/O行列置換部1063は、図3(b)に示すように、I/O数の多いブロック(列)ほど左に寄せる。この結果、左から順に、B1、B6、B2、B5、B4、B7、B3となるように並び替えられる。   The column replacement process is as follows. That is, the I / O matrix replacement unit 1063 calculates the number of I / Os (number of circles) for each block. Then, as shown in FIG. 3B, the I / O matrix replacement unit 1063 moves the block (column) with the larger number of I / Os to the left. As a result, they are rearranged in order from the left to B1, B6, B2, B5, B4, B7, and B3.

行の置換処理では、I/O数の多いブロックに着目して、着目したブロックをI/O先とするI/O要求(行)の順番がなるべく先になるように並び替えられる。その際、その着目しているブロックよりもI/O数の多いブロックに着目した並び(上詰め)を崩さないようにし、崩れるようであれば、行の置換処理を終える。   In the row replacement processing, attention is paid to blocks having a large number of I / Os, and rearrangement is performed so that the order of I / O requests (rows) with the focused block as an I / O destination is as far as possible. At this time, the arrangement (uploading) focused on the block having a larger number of I / Os than the focused block is not broken, and if it is broken, the row replacement process is finished.

具体的には、例えば、まず、図4(a)に示すように、最もI/O数の多いブロックB1に着目して、ブロックB1がI/O先になっているI/O要求が上位にくるように(出力される順番が先になるように)並び替える。ここでは、I/O要求R2のみがブロックB1へのI/Oを行わないため、I/O要求R2に対応した行は最下位へ移動させられる。   Specifically, for example, as shown in FIG. 4A, first, focusing on the block B1 having the largest number of I / Os, the I / O request in which the block B1 is the I / O destination is higher. Rearrange so that it comes to (so that the output order comes first). Here, since only the I / O request R2 does not perform I / O to the block B1, the row corresponding to the I / O request R2 is moved to the lowest order.

次に、図4(b)に示すように、2番目にI/O数の多いブロックB6に着目して、B1の上詰め状態を崩さないようにして、ブロックB6がI/O先になっているI/O要求(行)が上位にくるように並び替える。   Next, as shown in FIG. 4B, paying attention to the block B6 having the second largest number of I / Os, the block B6 becomes the I / O destination so as not to disturb the top-filled state of B1. Rearrange the I / O requests (rows) that are currently in the higher rank.

次に、図4(c)に示すように、3番目にI/O数の多いブロックB2に着目して、B1及びB6の上詰め状態を崩さないようにして、ブロックB2がI/O先になっているI/O要求(行)が上位にくるように並び替える。   Next, as shown in FIG. 4C, paying attention to the block B2 having the third largest number of I / Os, the block B2 is connected to the I / O destination in such a way that the top-packed state of B1 and B6 is not destroyed. Rearrange the I / O requests (rows) at the top.

次に、4番目にI/O数の多いブロックB5に着目して、B1、B6及びB2の上詰め状態を崩さないようにして、ブロックB5がI/O先になっているI/O要求(行)が上位にくるように並び替えることを試みる。しかし、ここでは、ブロックB2に着目した上詰め後のマトリクスである図4(d)のマトリクスからわかるように、ブロックB5をI/O先とするI/O要求R4、R1及びR7のいずれをより上位にしようとすると、B1、B6及びB2のいずれかの上詰め状態が崩れてしまうことになる。   Next, paying attention to the block B5 having the fourth largest number of I / Os, an I / O request in which the block B5 is an I / O destination without disturbing the top-filled state of B1, B6, and B2 Try rearranging so that (row) comes to the top. However, here, as can be seen from the matrix in FIG. 4D, which is the top-padded matrix focusing on the block B2, any of the I / O requests R4, R1, and R7 with the block B5 as the I / O destination is selected. If it is going to be higher, the top-packed state of any of B1, B6 and B2 will be destroyed.

従って、この段階で、行の置換処理を終了する。   Therefore, at this stage, the row replacement process is terminated.

以上の一連の処理によって、I/O要求の処理順序の最適化が完了する。以下、この最適化により期待できる効果を検証する。その際、一つのブロックについてのI/O(具体的には、該ブロックに対応した物理的な記憶領域を有する二次記憶装置に対するI/O)に関する処理で遅れる確率(P)を一律に0.05とする。遅れる確率(P)とは、例えば、その二次記憶装置のI/O性能の標準正規分布(I/O性能情報中の標準正規分布)において、標準偏差(σ)が±2σの範囲から外れる確率である。   Through the series of processes described above, the optimization of the processing order of I / O requests is completed. The effects that can be expected from this optimization will be verified below. At that time, the probability (P) of delay in processing related to I / O for one block (specifically, I / O for a secondary storage device having a physical storage area corresponding to the block) is uniformly 0.05. And The probability of delay (P) is, for example, that the standard deviation (σ) is out of the range of ± 2σ in the standard normal distribution of I / O performance of the secondary storage device (standard normal distribution in the I / O performance information). It is a probability.

(1)並び替え前[図3(a)参照]
・ブロックB1:I/O要求R3〜R7と5つ連続でI/Oが発生しているので、
遅れる確率:PB1=1−(1−0.05)5= 0.2262190625
・ブロックB5:最終のI/O要求R7でI/Oが発生するが、前のI/O要求R6ではブロックB5についてI/Oが発生しないので、
遅れる確率:PB5=0.05
・ブロックB7:最終のI/O要求R7でI/Oが発生するが、前のI/O要求R6ではブロックB7についてI/Oが発生しないので、
遅れる確率:PB7=0.05
他のブロックに関しては、最終I/O要求(R7)が送出されるタイミングでは新たなI/Oが発生しない。それ以前の遅れは、R7のタイムスロットで吸収される。
(1) Before rearrangement [see FIG. 3 (a)]
-Block B1: Since I / O requests R3 to R7 and I / O are continuously generated,
Probability of delay: P B1 = 1− (1−0.05) 5 = 0.2262190625
Block B5: I / O is generated in the final I / O request R7, but I / O is not generated in block B5 in the previous I / O request R6.
Probability of delay: P B5 = 0.05
Block B7: I / O occurs in the final I / O request R7, but no I / O occurs in block B7 in the previous I / O request R6.
Probability of delay: P B7 = 0.05
For other blocks, no new I / O occurs at the timing when the final I / O request (R7) is sent. The earlier delay is absorbed in the R7 time slot.

それぞれの遅れは独立に発生すると考えてよい。そのため、B1、B5及びB7のうち、2つ以上で遅れが同時に発生する確率は、それぞれの確率の積となるため、それらは無視できるほど小さな値になる。故に、最終のI/O要求R7のタイミングで遅れが生じる確率Pは、
P≒PB1+PB5+PB7=0.226 + 0.05 + 0.05 = 0.326
となる。
Each delay may be considered to occur independently. Therefore, the probability that the delay occurs simultaneously in two or more of B1, B5, and B7 is a product of the respective probabilities, and thus becomes a small value that can be ignored. Therefore, the probability P that the delay occurs at the timing of the final I / O request R7 is
P ≒ P B1 + P B5 + P B7 = 0.226 + 0.05 + 0.05 = 0.326
It becomes.

(2)並べ替え後[図4(d)参照]
・ブロックB6:最終のI/O要求R2でI/Oが発生するが、前のI/O要求R7ではブロックB6についてI/Oが発生しないので、
B6=0.05
・ブロックB2:最終のI/O要求R2でI/Oが発生するが、前のI/O要求R7ではブロックB2についてI/Oが発生しないので、
B2=0.05
それぞれの遅れは独立に発生すると考えてよい。そのため、B6及びB2の両方で同時に遅れが発生する確率は、それぞれの確率の積となるが、それらは無視できるほど小さな値になる。故に、最終のI/O要求R2で遅れが生じる確率Pは、
P≒PB6+PB2=0.05 + 0.05=0.1
となる。
(2) After rearrangement [see FIG. 4 (d)]
Block B6: I / O occurs in the final I / O request R2, but no I / O occurs in block B6 in the previous I / O request R7.
P B6 = 0.05
Block B2: I / O is generated in the final I / O request R2, but I / O is not generated for the block B2 in the previous I / O request R7.
P B2 = 0.05
Each delay may be considered to occur independently. Therefore, the probability that the delay occurs simultaneously in both B6 and B2 is the product of the respective probabilities, but they are small enough to be ignored. Therefore, the probability P of delay in the final I / O request R2 is
P ≒ P B6 + P B2 = 0.05 + 0.05 = 0.1
It becomes.

以上、第一の実施形態によれば、待ち受けキュー105で蓄積されたまま残っている複数のI/O要求でI/O先とされる二以上のブロックのそれぞれについてI/O数を算出し、I/O数が多いブロックをI/O先とするI/O要求ほど優先的に先に処理するような並び替えが行われる。これにより、DBMS107のスループットの向上が期待できる。   As described above, according to the first embodiment, the number of I / Os is calculated for each of two or more blocks that are set as I / O destinations in a plurality of I / O requests that remain accumulated in the standby queue 105. Thus, rearrangement is performed such that an I / O request in which a block having a large number of I / Os is an I / O destination is processed first. Thereby, improvement of the throughput of the DBMS 107 can be expected.

<第二の実施形態>   <Second Embodiment>

以下、第二の実施形態について説明する。その際、第一の実施形態との相違点について主に説明し、第一の実施形態との共通点については説明を省略或いは簡略する。   The second embodiment will be described below. At that time, differences from the first embodiment will be mainly described, and description of common points with the first embodiment will be omitted or simplified.

I/O行列置換部1063が、行の合成処理を実行する。以下、それについて、図5(a)を例に採り説明する。I/O行列置換部1063は、行の置換処理後のマトリクス(図4(d)参照)を基に、行ベクトルの内積が 0 になる2つ以上の行があるか否か(I/O先となるブロックが重なり合わないI/O要求)があるか否かを判断する。そのような2つ以上の行があれば、I/O行列置換部1063は、2つ以上の行を合成、すなわち、2つ以上のI/O要求(例えばR2及びR7)を一つのI/O要求にまとめる。これにより、DBMS107のスループットの更なる向上が期待できる。   The I / O matrix replacement unit 1063 executes row composition processing. Hereinafter, this will be described with reference to FIG. Based on the matrix after row replacement processing (see FIG. 4D), the I / O matrix replacement unit 1063 determines whether there are two or more rows in which the inner product of the row vectors is 0 (I / O It is determined whether or not there is an I / O request in which the previous block does not overlap. If there are two or more rows, the I / O matrix replacement unit 1063 combines two or more rows, that is, combines two or more I / O requests (eg, R2 and R7) into one I / O. Summarize in O request. Thereby, further improvement of the throughput of the DBMS 107 can be expected.

なお、このように2つのI/O要求を一つにまとめた場合、それら2つのI/O要求がそれぞれ2つのアプリケーション102から発行されたI/O要求であれば、一つにまとめられたI/O要求の処理が済んだ場合に、DBMS107によって、それら2つのアプリケーション102に、完了が通知される。   When two I / O requests are combined into one as described above, if the two I / O requests are I / O requests issued from two applications 102, they are combined into one. When the processing of the I / O request is completed, the DBMS 107 notifies the completion to the two applications 102.

また、例えばブロックの数が膨大であって、一つのマトリクスで行の置換処理などを行うことが困難な場合、I/O行列置換部1063は、マトリクスを多段で用意し、多段のマトリクスのうちの少なくとも一つで、列の置換処理、行の置換処理、行の合成処理を行っても良い。例えば、図5(b)に例示するように、第一段のマトリクスにおいてN個(Nは2以上の整数)のブロックにそれぞれ対応するN個の位置を、第二段(第一段の一つ上の段)のマトリクスにおいて一つの位置に対応付けても良い。その場合、第二段のマトリクスにおいて、行列が交差する各位置には、その位置に対応するN個のブロックが全てI/O先である場合を1としたときの数値が設定される。図5(b)の例では、第二段のマトリクスの或る位置には、8個のブロックのうちの4個のブロックがI/O先となっているので、0.5という値が設定される。この第二段のマトリクスで、列の置換処理、行の置換処理、行の合成処理を行っても良い。行の合成処理の際は、例えば、I/O行列置換部1063は、行ベクトルの内積が所定値以下になる2つ以上の行があるか否かを判断し(例えば、行の合成処理を行ってもI/O先が重なり合う可能性が0に極めて近い2つ以上の行があるかを判断し)、そのような2つ以上の行があれば、行の合成を行っても良い。   For example, when the number of blocks is enormous and it is difficult to perform row replacement processing in one matrix, the I / O matrix replacement unit 1063 prepares the matrix in multiple stages, At least one of the above, column replacement processing, row replacement processing, and row composition processing may be performed. For example, as illustrated in FIG. 5B, N positions corresponding to N (N is an integer of 2 or more) blocks in the first-stage matrix are assigned to the second stage (one of the first stages). It may be associated with one position in the upper matrix. In that case, in the second-stage matrix, a numerical value is set at each position where the matrix intersects when the number of N blocks corresponding to the position is all I / O destinations. In the example of FIG. 5B, a value of 0.5 is set at a certain position of the second-stage matrix because four of the eight blocks are I / O destinations. Is done. In this second-stage matrix, column replacement processing, row replacement processing, and row composition processing may be performed. In the row composition processing, for example, the I / O matrix replacement unit 1063 determines whether there are two or more rows in which the inner product of the row vectors is equal to or less than a predetermined value (for example, the row composition processing is performed). It is determined whether there are two or more rows that are very close to 0 with the possibility of overlapping I / O destinations even if they are executed). If there are two or more such rows, the rows may be combined.

<第三の実施形態>   <Third embodiment>

この第三の実施形態では、I/O性能統計がより有効に活用される。具体例としては、以下の第一〜第三の例とがある。   In this third embodiment, I / O performance statistics are utilized more effectively. Specific examples include the following first to third examples.

第一の例は、I/O性能の向上化である。例えば、I/O性能蓄積部1062が、定期的に又は不定期的に、図6(a)に例示する処理を実行する。具体的には、例えば、I/O性能蓄積部1062が、同種の二次記憶装置のI/O性能統計を参照することにより、同種の二次記憶装置間でI/O性能(例えば、平均、標準偏差)に想定誤差以上の差があるか否かを判断する(ステップS101)。そのような差がある場合には、I/O性能蓄積部1062は、同種の二次記憶装置のうちのI/O性能の低い方の二次記憶装置に対して最適化処理を実行させる(S102)。   The first example is an improvement in I / O performance. For example, the I / O performance accumulation unit 1062 executes the process illustrated in FIG. 6A periodically or irregularly. Specifically, for example, the I / O performance accumulation unit 1062 refers to the I / O performance statistics of the same type of secondary storage device, so that the I / O performance (for example, the average , Standard deviation) is determined whether or not there is a difference greater than the expected error (step S101). If there is such a difference, the I / O performance storage unit 1062 causes the secondary storage device with the lower I / O performance among the same type of secondary storage devices to execute the optimization process ( S102).

ここで、複数の二次記憶装置のうちのどれが同種の二次記憶装置であるかは、例えば、二次記憶装置に関する属性情報が書かれた管理テーブルを参照する等の方法により、特定することができる。   Here, which of the plurality of secondary storage devices is the same type of secondary storage device is identified by a method such as referring to a management table in which attribute information related to the secondary storage device is written. be able to.

また、二次記憶装置に対して実行させる最適化処理とは、例えば、デフラグメンテーション処理、すなわち、二次記憶装置内のデータの断片化を解消する処理である。I/O性能蓄積部1062は、例えば、OS211でサポートされているユーティリティ機能を呼び出すことで、所望の二次記憶装置に対する最適化処理を実行させることができる。   The optimization process executed on the secondary storage device is, for example, a defragmentation process, that is, a process for eliminating fragmentation of data in the secondary storage device. For example, the I / O performance storage unit 1062 can execute optimization processing for a desired secondary storage device by calling a utility function supported by the OS 211.

第二の例は、待ち受けキュー105からのI/O要求の出力タイミングの決定である。すなわち、この第三の実施形態では、OS211によって決定されたタイミングではなく、最適化部106のキュー制御部(図示せず)によって決定されたタイミングで待ち受けキュー105からI/O要求が出力される。具体例を図6(b)に示す。   The second example is the determination of the output timing of the I / O request from the standby queue 105. In other words, in the third embodiment, the I / O request is output from the standby queue 105 not at the timing determined by the OS 211 but at the timing determined by the queue control unit (not shown) of the optimization unit 106. . A specific example is shown in FIG.

すなわち、キュー制御部は、I/O要求を読み出した場合に、該I/O要求の処理の際に発行されるI/Oコマンドの発行先二次記憶装置に対応したI/O性能統計を基に、該二次記憶装置についてのI/O性能を予測する(S201)。ここで予測されるI/O性能は、例えば、標準正規分布での平均であっても良いし、標準正規分布における所定の範囲内での或るI/O性能であっても良い。   That is, when the queue control unit reads an I / O request, the queue control unit displays I / O performance statistics corresponding to the secondary storage device to which the I / O command issued at the time of processing the I / O request. Based on this, the I / O performance for the secondary storage device is predicted (S201). The I / O performance predicted here may be, for example, an average in a standard normal distribution or a certain I / O performance within a predetermined range in the standard normal distribution.

キュー制御部は、予測されたI/O性能に基づいて、次のI/O要求を読み出すタイミング(例えば今回の読出しから何秒後に読み出すか)を決定する(S202)。そして、キュー制御部は、そのタイミングで次のI/O要求を読出し(S203)、その読み出したI/O要求について、再びS201を実行する。   Based on the predicted I / O performance, the queue control unit determines the timing for reading the next I / O request (for example, how many seconds after the current reading) (S202). Then, the queue control unit reads the next I / O request at that timing (S203), and executes S201 again for the read I / O request.

第三の例は、I/O行列置換部1063による行の置換処理において、どのようなブロックを優先してI/O要求を並び替えるかの決定である。すなわち、上述した第一の実施形態では、I/O数が多い順が、ブロックの優先順位の高い順であるが、この第三の例では、必ずしも、I/O数が多い順が、ブロックの優先順位の高い順とはならない。例えば、ブロックB1のI/O数が最も多いが、ブロックB2に対応した二次記憶装置のI/O性能がブロックB1に対応した二次記憶装置のI/O性能よりもかなり低い場合には、ブロックB2を最優先とした行の置換処理が行われても良い。   The third example is determination of what block is preferentially rearranged in the row replacement processing by the I / O matrix replacement unit 1063. That is, in the first embodiment described above, the order in which the number of I / Os is large is the order in which the block priority is high, but in this third example, the order in which the number of I / Os is large is not necessarily the order. The order of priority is not high. For example, when the number of I / Os in block B1 is the largest, the I / O performance of the secondary storage device corresponding to block B2 is considerably lower than the I / O performance of the secondary storage device corresponding to block B1. The row replacement process with the block B2 as the highest priority may be performed.

上述した本発明の幾つかの実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。本発明は、その要旨を逸脱することなく、その他の様々な態様でも実施することができる。   The several embodiments of the present invention described above are examples for explaining the present invention, and are not intended to limit the scope of the present invention only to those embodiments. The present invention can be implemented in various other modes without departing from the gist thereof.

本発明の一実施形態に係るシステム全体の構成を示す。1 shows a configuration of an entire system according to an embodiment of the present invention. 最適化部の機能の説明図。Explanatory drawing of the function of an optimization part. 並び替え処理における列の置換処理の説明図。Explanatory drawing of the replacement process of the column in a rearrangement process. 並び買え処理における行の置換処理の説明図。Explanatory drawing of the replacement process of the line in a line-up purchase process. (a)は、並び替え処理における行の合成処理の説明図。(b)は、マトリクスが多段になった場合の一例の説明図。(A) is explanatory drawing of the synthetic | combination process of the line in a rearrangement process. (B) is an explanatory view of an example when the matrix is multistage. (a)は、I/O性能統計の利用方法の第一の例を示す図。(b)は、I/O性能統計の利用方法の第二の例を示す図。(A) is a figure which shows the 1st example of the utilization method of I / O performance statistics. (B) is a figure which shows the 2nd example of the utilization method of I / O performance statistics.

符号の説明Explanation of symbols

101…クライアント 102…アプリケーションプログラム 105…待ち受けキュー 106…最適化部 107…DBMS 1061…キュー監視蓄積部 1062…I/O性能蓄積部 1063…I/O行列置換部   DESCRIPTION OF SYMBOLS 101 ... Client 102 ... Application program 105 ... Standby queue 106 ... Optimization part 107 ... DBMS 1061 ... Queue monitoring storage part 1062 ... I / O performance storage part 1063 ... I / O matrix replacement part

Claims (6)

I/O要求発行元からI/O要求を受信して一旦キューに蓄積し該キューから出力されたI/O要求について所定の処理が完了した場合に該I/O要求に対する応答である要求応答を前記I/O要求発行元に返すI/O制御システムに適用可能な、I/O要求の処理順序の最適化をコンピュータに実行させるためのコンピュータプログラムであって、
前記キューにどんな順序でどれだけの数のI/O要求が並んでいて各I/O要求のI/O先はどの記憶領域であるかのチェックを行うキュー状況チェックステップと、
前記チェックの結果を基に、複数の記憶領域のうちの、前記キュー内に並んでいる複数のI/O要求でI/O先とされる二以上の記憶領域の各々について、I/O先とされるI/O要求の数であるI/O数を算出し、I/O数が多い記憶領域をI/O先とするI/O要求ほど早い順番とするよう前記キュー内での複数のI/O要求の順序を並び替える順序並び替えステップと
をコンピュータに実行させるコンピュータプログラム。
A request response that is a response to an I / O request when an I / O request is received from an I / O request issuer, accumulated once in a queue, and predetermined processing is completed for the I / O request output from the queue A computer program for causing a computer to optimize the processing order of I / O requests that can be applied to an I / O control system that returns an I / O request to the I / O request issuer,
A queue status check step for checking how many I / O requests are arranged in what order in the queue and which storage area is the I / O destination of each I / O request;
Based on the result of the check, an I / O destination for each of two or more storage areas that are set as I / O destinations in a plurality of I / O requests arranged in the queue among the plurality of storage areas. The number of I / O requests, which is the number of I / O requests, is calculated, and a plurality of I / O requests in the queue are arranged so that the I / O requests that have a storage area with a large number of I / Os are in the earlier order. A computer program that causes a computer to execute an order rearranging step for rearranging the order of I / O requests.
前記所定の処理とは、前記キューから出力されたI/O要求でのI/O先とされる記憶領域に対応した記憶装置にI/Oコマンドを発行し、該I/Oコマンドに対する応答であるコマンド応答を該対応した記憶装置から受信することであり、
前記I/O制御システムが発行する各I/Oコマンドについて、前記I/O制御システムがI/Oコマンドを記憶装置に発行してからそれのコマンド応答を該記憶装置から受信するまでの時間長であるI/O性能を取得し、取得したI/O性能を記憶手段に蓄積するI/O性能蓄積ステップ、
を更にコンピュータに実行させる請求項1記載のコンピュータプログラム。
The predetermined process is an I / O command issued to a storage device corresponding to a storage area that is an I / O destination in an I / O request output from the queue, and a response to the I / O command. Receiving a command response from the corresponding storage device;
For each I / O command issued by the I / O control system, the length of time from when the I / O control system issues an I / O command to the storage device until the command response is received from the storage device I / O performance accumulating step for acquiring I / O performance, and accumulating the acquired I / O performance in the storage means,
The computer program according to claim 1, further causing the computer to execute.
前記記憶手段に記憶されている複数のI/O性能を基に、各記憶装置毎にI/O性能の統計を取得し、同種の記憶装置間でI/O性能の差が所定値以上に大きいか否かを判別し、大きい場合には、前記同種の記憶装置のうちのI/O性能の低い方の記憶装置で最適化処理を実行する記憶装置最適化ステップ、
を更にコンピュータに実行させる請求項2記載のコンピュータプログラム。
Based on the plurality of I / O performances stored in the storage means, I / O performance statistics are obtained for each storage device, and the difference in I / O performance between the same types of storage devices exceeds a predetermined value. A storage device optimization step for determining whether or not the storage device is large, and in the case of being large, performing an optimization process on a storage device having a lower I / O performance among the storage devices of the same type;
The computer program according to claim 2, further causing the computer to execute.
前記順序並び替えステップでは、前記記憶手段に蓄積されている複数のI/O性能と、前記キュー内で並んでいる前記複数のI/O要求でI/O先とされる前記二以上の記憶領域とに基づき、該二以上の記憶領域の各々のI/O性能を求め、前記取得されたI/O数に加えて、前記二以上の記憶領域の各々についてのI/O性能を基に、前記二以上の記憶領域の各々の優先順位を決定し、優先順位の高い記憶領域をI/O先とするI/O要求ほど早い順番になるよう前記複数のI/O要求の順序を並び替える、
請求項2記載のコンピュータプログラム。
In the order rearranging step, the plurality of I / O performances stored in the storage unit and the two or more storages that are set as I / O destinations by the plurality of I / O requests arranged in the queue. And determining the I / O performance of each of the two or more storage areas based on the I / O performance of each of the two or more storage areas in addition to the obtained number of I / Os. The priority order of each of the two or more storage areas is determined, and the order of the plurality of I / O requests is arranged so that an I / O request having a storage area having a higher priority order as an I / O destination is earlier. Change
The computer program according to claim 2.
前記順序並び替えステップでは、更に、前記チェックの結果から、前記キューに並んでいる複数のI/O要求のうち、I/O先となる記憶領域が互いに重複する確率が所定値以下の二以上のI/O要求を特定し、特定した二以上のI/O要求を、それら二以上のI/O要求で指定されている二以上の記憶領域をI/O先とする一つのI/O要求に合成する、
請求項1記載のコンピュータプログラム。
In the order rearranging step, from the result of the check, among the plurality of I / O requests arranged in the queue, two or more probabilities that the storage areas as I / O destinations overlap each other are not more than a predetermined value. I / O requests are specified, and two or more specified I / O requests are defined as one I / O with two or more storage areas specified by the two or more I / O requests as I / O destinations. Composite to request,
The computer program according to claim 1.
I/O要求発行元からI/O要求を受信して一旦キューに蓄積し該キューから出力されたI/O要求について所定の処理が完了した場合に該I/O要求に対する応答である要求応答を前記I/O要求発行元に返すI/O制御システムであって、
前記キューにどんな順序でどれだけの数のI/O要求が並んでいて各I/O要求のI/O先はどの記憶領域であるかのチェックを行うキュー状況チェック部と、
前記チェックの結果を基に、複数の記憶領域のうちの、前記キュー内に並んでいる複数のI/O要求でI/O先とされる二以上の記憶領域の各々について、I/O先とされるI/O要求の数であるI/O数を算出し、I/O数が多い記憶領域をI/O先とするI/O要求ほど早い順番とするよう前記キュー内での複数のI/O要求の順序を並び替える順序並び替え部と
を備えるI/O制御システム。
A request response that is a response to an I / O request when an I / O request is received from an I / O request issuer, accumulated once in a queue, and predetermined processing is completed for the I / O request output from the queue Is an I / O control system that returns to the I / O request issuer,
A queue status check unit for checking in which order and how many I / O requests are arranged in the queue and which storage area is the I / O destination of each I / O request;
Based on the result of the check, an I / O destination for each of two or more storage areas that are set as I / O destinations in a plurality of I / O requests arranged in the queue among the plurality of storage areas. The number of I / O requests, which is the number of I / O requests, is calculated, and a plurality of I / O requests in the queue are arranged so that the I / O requests that have a storage area with a large number of I / Os are in the earlier order. An I / O control system comprising an order rearranging unit for rearranging the order of I / O requests.
JP2006333932A 2006-12-12 2006-12-12 Computer program for optimizing the processing order of I / O requests Expired - Fee Related JP4951326B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006333932A JP4951326B2 (en) 2006-12-12 2006-12-12 Computer program for optimizing the processing order of I / O requests

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006333932A JP4951326B2 (en) 2006-12-12 2006-12-12 Computer program for optimizing the processing order of I / O requests

Publications (2)

Publication Number Publication Date
JP2008146420A true JP2008146420A (en) 2008-06-26
JP4951326B2 JP4951326B2 (en) 2012-06-13

Family

ID=39606521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006333932A Expired - Fee Related JP4951326B2 (en) 2006-12-12 2006-12-12 Computer program for optimizing the processing order of I / O requests

Country Status (1)

Country Link
JP (1) JP4951326B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012513061A (en) * 2008-12-18 2012-06-07 エルエスアイ コーポレーション Method for implementing multi-array consistency groups using a write queuing mechanism
US10095442B2 (en) 2015-08-04 2018-10-09 Toshiba Memory Corporation Memory device that changes execution order of commands

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000048549A (en) * 1998-08-03 2000-02-18 Fujitsu Ltd Tape device
JP2001222380A (en) * 2000-02-07 2001-08-17 Hitachi Ltd External storage device and information processing system with the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000048549A (en) * 1998-08-03 2000-02-18 Fujitsu Ltd Tape device
JP2001222380A (en) * 2000-02-07 2001-08-17 Hitachi Ltd External storage device and information processing system with the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012513061A (en) * 2008-12-18 2012-06-07 エルエスアイ コーポレーション Method for implementing multi-array consistency groups using a write queuing mechanism
US10095442B2 (en) 2015-08-04 2018-10-09 Toshiba Memory Corporation Memory device that changes execution order of commands

Also Published As

Publication number Publication date
JP4951326B2 (en) 2012-06-13

Similar Documents

Publication Publication Date Title
US6085200A (en) System and method for arranging database restoration data for efficient data recovery in transaction processing systems
JP4611830B2 (en) Database management system and method
JP5765416B2 (en) Distributed storage system and method
US7945731B2 (en) Method for reading data with storage system, data managing system for storage system and storage system
US11321302B2 (en) Computer system and database management method
JP2001067187A (en) Storage sub-system and its control method
CN101375241A (en) Efficient data management in a cluster file system
KR20150042876A (en) Managing queries
US20070283089A1 (en) Method for expanding capacity of replication volume
US7769732B2 (en) Apparatus and method for streamlining index updates in a shared-nothing architecture
JP2005338985A (en) Method and system for managing storage area
US20240104089A1 (en) Methods, systems, electronic devices, and storage media for database transaction processing
JP4951326B2 (en) Computer program for optimizing the processing order of I / O requests
US7908434B2 (en) Raid apparatus, cache management method, and computer program product
WO2016157492A1 (en) Shared resource update device and shared resource update method
JP6764175B2 (en) Database management system and database management method
KR20170129540A (en) System and method for managing rule
US8290935B1 (en) Method and system for optimizing database system queries
CN107924399B (en) Search processing system and method for processing search request with unknown data transmission amount to host
JP2010152435A (en) Information processing apparatus and method, and program
JP2007206913A (en) Database access system, application server node, database access method and program
JP2010224672A (en) Data processing method, system, and program
JP5674850B2 (en) Database management system and method
CN114168306B (en) Scheduling method and scheduling device
CN113051274B (en) Mass tag storage system and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090907

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120125

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

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

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150316

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees