JP6293966B2 - Database management apparatus, database management method, and database management program - Google Patents

Database management apparatus, database management method, and database management program Download PDF

Info

Publication number
JP6293966B2
JP6293966B2 JP2017207287A JP2017207287A JP6293966B2 JP 6293966 B2 JP6293966 B2 JP 6293966B2 JP 2017207287 A JP2017207287 A JP 2017207287A JP 2017207287 A JP2017207287 A JP 2017207287A JP 6293966 B2 JP6293966 B2 JP 6293966B2
Authority
JP
Japan
Prior art keywords
capacity
free space
threshold
storage device
free
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017207287A
Other languages
Japanese (ja)
Other versions
JP2018014144A (en
Inventor
誠 嶋村
誠 嶋村
圭 山地
圭 山地
基孝 金松
基孝 金松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2017207287A priority Critical patent/JP6293966B2/en
Publication of JP2018014144A publication Critical patent/JP2018014144A/en
Application granted granted Critical
Publication of JP6293966B2 publication Critical patent/JP6293966B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明の実施形態は、データベース管理装置、データベース管理方法、およびデータベース管理プログラムに関する。   Embodiments described herein relate generally to a database management apparatus, a database management method, and a database management program.

データベース管理システム(DataBase Management System,DBMS)では、データを記憶する記憶装置(例えば、ハードディスク)の記憶領域を完全に使い切る前に、記憶領域を確保するための調整等が行われる。以下、ハードディスクを前提として説明する。上記の調整等が行われるトリガーとして、ディスクフル(Disk Full)エラーが発生したという情報が、監視システム等によって通知される場合がある。ディスクフルエラー発生時の対応処理を安全に行うためには、ある程度の空き容量が必要となる。また、ディスクフルエラーが発生するディスクフル状態では、システム上で起動するOS(Operating System)の振る舞いも信用できなくなり、不意にクラッシュする可能性が高い。しかしながら、従来の技術では、その時点の状態に基づいてディスクフルエラーの通知を行っているため、安全側で早期に通知を行う必要があった。   In a database management system (DBMS), adjustment for securing a storage area is performed before the storage area of a storage device (for example, a hard disk) that stores data is completely used. The following description is based on the assumption of a hard disk. As a trigger for the above adjustment or the like, information that a disk full error has occurred may be notified by the monitoring system or the like. A certain amount of free space is required to safely handle a disk full error. Also, in a disk full state where a disk full error occurs, the behavior of an OS (Operating System) that is activated on the system becomes unreliable, and there is a high possibility of a crash unexpectedly. However, in the conventional technique, since the disk full error is notified based on the state at that time, it is necessary to notify the safety at an early stage.

特開2011−18363号公報JP 2011-18363 A 特開2007−179551号公報JP 2007-179551 A 特開2006−163729号公報JP 2006-163729 A

本発明が解決しようとする課題は、より適切なタイミングで空き容量に関する注意喚起を行うことができるデータベース管理装置、データベース管理方法、およびデータベース管理プログラムを提供することである。   The problem to be solved by the present invention is to provide a database management device, a database management method, and a database management program that can alert a free space at a more appropriate timing.

実施形態のデータベース管理装置は、容量監視部と、制御部と、周期設定部とを持つ。容量監視部は、データを記憶する記憶装置の空き容量を監視する。制御部は、前記容量監視部により得られる前記記憶装置の空き容量と、所定書き込み率で書き込まれた場合の将来の前記記憶装置の空き容量とに基づいて、前記空き容量に関する注意喚起情報を出力する。周期設定部は、前記記憶装置の空き容量に基づいて、前記容量監視部が前記空き容量を確認する周期を設定する。また、周期設定部は、前記記憶装置の空き容量が第1の閾値より大きい場合に、前記記憶装置の空き容量と、前記第1の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とを用いて、前記空き容量を確認する周期を設定する。また、周期設定部は、前記空き容量が前記第1の閾値以下である場合において、前記空き容量が、前記第1の閾値よりも小さい第2の閾値よりも大きい場合に、前記記憶装置の空き容量と、前記第2の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とに基づく値を、所定の安全率に基づいて割り引くことにより、前記空き容量を確認する周期を設定する。   The database management apparatus according to the embodiment includes a capacity monitoring unit, a control unit, and a cycle setting unit. The capacity monitoring unit monitors the free capacity of the storage device that stores data. The control unit outputs warning information regarding the free space based on the free space of the storage device obtained by the capacity monitoring unit and the free space of the storage device in the future when written at a predetermined write rate. To do. The period setting unit sets a period for the capacity monitoring unit to check the free capacity based on the free capacity of the storage device. The cycle setting unit writes the free space of the storage device, the first threshold value, and the storage device at the predetermined write rate when the free space of the storage device is larger than a first threshold value. The period for checking the free capacity is set using the data capacity in the case of the data. Further, the cycle setting unit, when the free capacity is equal to or less than the first threshold value, when the free capacity is larger than a second threshold value that is smaller than the first threshold value, The free capacity is confirmed by discounting a value based on the capacity, the second threshold value, and the data capacity when data is written to the storage device at the predetermined write rate based on a predetermined safety factor. Set the cycle.

本実施形態におけるデータベース管理装置の機能構成例を示す図。The figure which shows the function structural example of the database management apparatus in this embodiment. 設定ファイルの一例を示す図。The figure which shows an example of a setting file. エラーチェックフラグの一例を示す図。The figure which shows an example of an error check flag. データベース管理装置のハードウェア構成例を示す図。The figure which shows the hardware structural example of a database management apparatus. 本実施形態におけるデータベース管理処理を説明するための図。The figure for demonstrating the database management process in this embodiment. チェック周期の第1の設定例を説明するため図。The figure for demonstrating the 1st example of a setting of a check period. チェック周期の第2の設定例を説明するため図。The figure for demonstrating the 2nd example of a setting of a check period. チェック周期の設定処理の第1の実施例を示すフローチャート。The flowchart which shows the 1st Example of the setting process of a check period. チェック周期の設定処理の第2の実施例を示すフローチャート。The flowchart which shows the 2nd Example of the setting process of a check period. 容量監視処理の一例を示すフローチャート。The flowchart which shows an example of a capacity | capacitance monitoring process. SQL実行処理の一例を示すフローチャート。The flowchart which shows an example of SQL execution processing.

以下、実施形態のデータベース管理装置、データベース管理方法、およびデータベース管理プログラムを、図面を参照して説明する。   Hereinafter, a database management device, a database management method, and a database management program according to embodiments will be described with reference to the drawings.

図1は、本実施形態におけるデータベース管理装置の機能構成例を示す図である。図1に示すデータベース管理装置100は、設定情報受付部(受付部)110と、チェック周期設定部(周期設定部)120と、容量監視部130と、処理実行部140と、制御部150と、記憶部160とを備える。これらの各機能部のうち一部または全部は、LSI(Large Scale Integration)やASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)等のハードウェアで実現されてもよい。また、記憶部160は、設定ファイル162およびエラーチェックフラグ164等を有する。   FIG. 1 is a diagram illustrating a functional configuration example of a database management apparatus according to the present embodiment. A database management apparatus 100 shown in FIG. 1 includes a setting information receiving unit (receiving unit) 110, a check cycle setting unit (cycle setting unit) 120, a capacity monitoring unit 130, a process execution unit 140, a control unit 150, And a storage unit 160. Some or all of these functional units may be realized by hardware such as LSI (Large Scale Integration), ASIC (Application Specific Integrated Circuit), and FPGA (Field-Programmable Gate Array). The storage unit 160 includes a setting file 162, an error check flag 164, and the like.

図1の例では、データベース管理装置100が管理する対象のデータベース200が、データベース管理装置100と別体の装置であるように表現しているが、これらは一体の装置であってもよい。また、データベース200は、クラウド型のデータベースであってもよい。データベース200には、1又は複数の記憶装置(図1の例では、ディスク装置D1、D2、…)が設けられている。以下、記憶装置としてハードディスク(ディスク装置)を備えることを前提として説明するが、記憶装置は、フラッシュメモリやその他の記憶装置であってもよい。また、データベース管理装置100は、例えばDBMS等の機能を有する。   In the example of FIG. 1, the database 200 to be managed by the database management apparatus 100 is expressed as an apparatus separate from the database management apparatus 100, but these may be an integrated apparatus. The database 200 may be a cloud type database. The database 200 is provided with one or a plurality of storage devices (disk devices D1, D2,... In the example of FIG. 1). The following description will be made on the assumption that a storage device includes a hard disk (disk device), but the storage device may be a flash memory or other storage device. Further, the database management apparatus 100 has a function such as a DBMS, for example.

図1の例について、データベース管理装置100は、ユーザ(操作者)が使用するクライアント300からの設定情報の入力や、処理を実行するための指示の入力を受け付け、受け付けた内容に基づいて、データベース200の管理等に関する各種処理を実行する。   In the example of FIG. 1, the database management apparatus 100 receives input of setting information from the client 300 used by the user (operator) and input of instructions for executing processing, and based on the received content, Various processes relating to management 200 are executed.

クライアント300は、データベース管理装置100にデータを出力したり、コマンド等による所定の指示を行うことで、データベース200に対して所定の処理(データの書き込み、読み出し、削除等)を実行させる。クライアント300は、例えばPC(Personal Computer)やタブレット端末、携帯電話等の情報処理装置である。クライアント300は、データベース管理装置100のユーザによって使用される情報処理装置であってもよく、さらに別の装置から受信したコマンド等に基づいて、データベース管理装置100に各種コマンドを送信する装置であってもよい。また、クライアント300は、内部において情報処理した結果に基づいて、各種コマンドを生成してデータベース管理装置100に送信する装置であってもよい。   The client 300 causes the database 200 to execute predetermined processing (data writing, reading, deletion, etc.) by outputting data to the database management apparatus 100 or issuing a predetermined instruction using a command or the like. The client 300 is an information processing apparatus such as a PC (Personal Computer), a tablet terminal, or a mobile phone. The client 300 may be an information processing apparatus used by a user of the database management apparatus 100, and is an apparatus that transmits various commands to the database management apparatus 100 based on a command received from another apparatus. Also good. Further, the client 300 may be a device that generates various commands based on the result of information processing inside and transmits the commands to the database management device 100.

例えば、クライアント300は、データベース管理装置100に対して、所定の処理を実行させるために、データの書き込みを指示するライトコマンド、データの読み出しを指示するリードコマンド、データの削除を指示する削除コマンド等を送信する。また、クライアント300は、データベース管理装置100から指示した内容に対する処理結果を取得する。   For example, in order for the client 300 to cause the database management apparatus 100 to execute predetermined processing, a write command for instructing data writing, a read command for instructing data reading, a deletion command for instructing data deletion, etc. Send. In addition, the client 300 acquires a processing result for the content instructed from the database management apparatus 100.

なお、データベース管理装置100とクライアント300とは、例えばインターネットやLAN(Local Area Network)等に代表される通信ネットワークにより、データの送受信が可能な状態で接続されている。通信ネットワークは、有線でも無線でもよく、またこれらの組み合わせであってもよい。また、クライアント300の各種機能は、データベース管理装置100に設けられていてもよい。図1の例では、データベース管理装置100を使用する装置として1つのクライアント300が示されているが、複数のクライアント300がデータベース管理装置100を使用してもよい。   The database management apparatus 100 and the client 300 are connected in a state where data can be transmitted and received by a communication network represented by the Internet, a LAN (Local Area Network), or the like. The communication network may be wired or wireless, or a combination thereof. Various functions of the client 300 may be provided in the database management apparatus 100. In the example of FIG. 1, one client 300 is shown as an apparatus that uses the database management apparatus 100, but a plurality of clients 300 may use the database management apparatus 100.

設定情報受付部110は、クライアント300から、ディスク容量を確認(チェック)する周期を設定するための設定情報の入力を受け付ける。設定情報受付部110は、例えばクライアント300に対するユーザの入力操作により設定情報を受け付ける。受け付けた設定情報は、設定ファイル162として記憶部160に記憶される。また、設定情報受付部110は、クライアント300から、上述した所定の処理等を実行するための指示を受け付けてもよい。   The setting information receiving unit 110 receives input of setting information for setting a cycle for checking (checking) the disk capacity from the client 300. The setting information receiving unit 110 receives setting information by a user input operation on the client 300, for example. The received setting information is stored in the storage unit 160 as a setting file 162. In addition, the setting information receiving unit 110 may receive an instruction from the client 300 for executing the predetermined processing described above.

図2は、設定ファイルの一例を示す図である。例えば、図2に示す設定ファイル162−1、162−2は、それぞれディスク装置D1、D2に対応する設定情報である。設定情報受付部110は、データベース200のディスク装置ごとに設定ファイル162を生成する。図2に示す設定ファイル162−1、162−2には、それぞれ一以上の閾値(例えば、閾値A1〜C1、A2〜C2)と、そのディスク装置に対する所定書き込み率とが設定されている。所定書き込み率とは、各ディスク装置に対して想定される最大書き込み率である。なお、最大書き込み率は、想定される最大書き込み率よりも、少し小さく(または大きく)設定してもよい。「少し」とは、例えば±10%程度である。図2では、ディスク装置D1、D2に対する所定書き込み率の一例として最大書き込みスループットT1、T2が設定されている。設定ファイル162は、ディスク装置の識別情報とともに、記憶部160に記憶される。   FIG. 2 is a diagram illustrating an example of a setting file. For example, the setting files 162-1 and 162-2 shown in FIG. 2 are setting information corresponding to the disk devices D1 and D2, respectively. The setting information receiving unit 110 generates a setting file 162 for each disk device in the database 200. In the setting files 162-1 and 162-2 shown in FIG. 2, one or more threshold values (for example, threshold values A1 to C1, A2 to C2) and a predetermined writing rate for the disk device are set. The predetermined write rate is a maximum write rate assumed for each disk device. Note that the maximum write rate may be set slightly smaller (or larger) than the assumed maximum write rate. “Slightly” means, for example, about ± 10%. In FIG. 2, maximum write throughputs T1 and T2 are set as an example of a predetermined write rate with respect to the disk devices D1 and D2. The setting file 162 is stored in the storage unit 160 together with the disk device identification information.

図2に示す閾値A〜Cは、チェック周期のパラメータ、およびディスクフルエラー(空き容量に関する注意喚起情報)を出力するか否かをチェックするためのパラメータである。閾値A〜Cは、いずれもディスク装置の空き容量に関する閾値であるが、ディスクの使用容量に関する閾値であってもよい。例えば、3つの閾値A〜Cのうち、2つの閾値(例えば、閾値A、B)は、ディスク容量の次回のチェック周期を設定するために用いられ、残りの閾値(例えば、閾値C)は、ディスクフルか否か(空き容量がない状態であるか否か)の確認のために用いられる。なお、3つの閾値A〜Cは、予め設定された大小関係(例えば、「閾値A>閾値B>閾値C」)を有していてもよい。   The thresholds A to C shown in FIG. 2 are parameters for checking whether or not to output a check cycle parameter and a disk full error (warning information regarding free space). The thresholds A to C are all threshold values related to the free capacity of the disk device, but may be threshold values related to the used capacity of the disk. For example, of the three threshold values A to C, two threshold values (for example, threshold values A and B) are used to set the next check period of the disk capacity, and the remaining threshold values (for example, threshold value C) are: Used to check whether the disk is full (whether there is no free space). The three thresholds A to C may have a preset magnitude relationship (for example, “threshold A> threshold B> threshold C”).

例えば、閾値A〜Cは、予め設定されたディスク装置の全容量に対する比率等を用いて設定してもよく、ユーザにより任意に設定されてもよい。例えば、第1の閾値である閾値Aは、ディスク装置に対する処理等を考慮し、空き容量に余裕を持った値を設定する。また、第2の閾値である閾値Bは、データの書き込み時に空き容量のチェックを行うか否かを判定するための基準となる値であるため、閾値Aよりも小さく、閾値Cよりも大きい値を設定する。   For example, the thresholds A to C may be set using a preset ratio to the total capacity of the disk device, or may be arbitrarily set by the user. For example, the threshold A, which is the first threshold, is set to a value with a sufficient free capacity in consideration of processing for the disk device. Further, the threshold B, which is the second threshold, is a value used as a reference for determining whether or not to check the free space at the time of data writing, and is therefore a value smaller than the threshold A and larger than the threshold C. Set.

また、第3の閾値である閾値Cは、ディスク装置がディスクフルエラーか否かを判定するための基準となる値であるため、少なくともエラー処理1回に必要とする最大の容量と、エラー処理1回の時間中に消費する容量とを加算した容量を確保する必要がある。例えば、エラー処理に1MBが必要であり、さらにエラー処理時間(90ms)で9MBが必要である場合、閾値Cは、それらを加算して10MB以上の値が設定される。   The threshold value C, which is the third threshold value, is a value used as a reference for determining whether or not the disk device has a disk full error. Therefore, at least the maximum capacity required for one error process and the error process It is necessary to secure a capacity obtained by adding the capacity consumed during one time. For example, when 1 MB is required for error processing and further 9 MB is required for the error processing time (90 ms), the threshold C is set to a value of 10 MB or more by adding them.

また、設定ファイル162内の最大書き込みスループットTは、例えばデータベース200のディスク装置D1、D2等を提供するディスクベンダ(データベース提供者等)400が提供するカタログスペック等から取得することができる。ディスクベンダ400は、例えばPCやサーバ等の情報処理装置であり、クライアント300やデータベース管理装置100と、通信ネットワークを介してデータの送受信が可能な状態で接続されていてもよい。   Further, the maximum write throughput T in the setting file 162 can be acquired from, for example, a catalog specification provided by a disk vendor (database provider or the like) 400 that provides the disk devices D1, D2 and the like of the database 200. The disk vendor 400 is an information processing apparatus such as a PC or a server, and may be connected to the client 300 or the database management apparatus 100 in a state where data can be transmitted / received via a communication network.

例えば、クライアント300は、通信ネットワークを介してディスクベンダ400にアクセスし、ディスク装置D1、D2等のカタログスペックデータを取得し、そのデータを設定情報受付部110に入力することで最大書き込みスループットTを取得することができる。また、ユーザが、印刷媒体等のカタログスペックから、最大書き込みスループットTを、クライアント300を用いて入力してもよい。また、データベース管理装置100は、通信ネットワークを介してディスクベンダ400に直接最大書き込みスループットTの問い合わせを行い、対応するデータを取得してもよい。これにより、ディスク装置に関する知識や経験を有していないユーザであっても容易に最大書き込みスループット値を設定することができる。   For example, the client 300 accesses the disk vendor 400 via the communication network, acquires catalog specification data of the disk devices D1, D2, etc., and inputs the data to the setting information receiving unit 110, thereby increasing the maximum write throughput T. Can be acquired. Further, the user may input the maximum writing throughput T using the client 300 from a catalog specification such as a print medium. Further, the database management apparatus 100 may inquire of the disk vendor 400 directly about the maximum write throughput T via the communication network and acquire corresponding data. As a result, even a user who does not have knowledge or experience regarding the disk device can easily set the maximum write throughput value.

なお、最大書き込みスループットTは、クライアント300を使用するユーザが任意に設定してもよい。また、上述した閾値A〜Cのうち、少なくとも1つを、ディスクベンダ400から提供される情報に基づいて設定してもよい。上述した閾値A〜Cおよび最大書き込みスループットTのうち少なくとも1つは、予め設定された固定値でもよい。また、最大書き込みスループットTは、例えばディスク性能測定プログラムを用いて、予め測定した値を設定してもよい。   Note that the maximum write throughput T may be arbitrarily set by a user using the client 300. Further, at least one of the above-described thresholds A to C may be set based on information provided from the disk vendor 400. At least one of the thresholds A to C and the maximum write throughput T described above may be a fixed value set in advance. The maximum write throughput T may be set to a value measured in advance using, for example, a disk performance measurement program.

チェック周期設定部120は、設定情報受付部110により設定された設定ファイル162を記憶部160から読み出し、ディスク装置D1,D2等のそれぞれのディスク容量を確認する周期(チェック周期)を算出する。なお、チェック周期の算出手法については、後述する。   The check cycle setting unit 120 reads the setting file 162 set by the setting information receiving unit 110 from the storage unit 160, and calculates a cycle (check cycle) for checking the respective disk capacities of the disk devices D1, D2, and the like. A method for calculating the check cycle will be described later.

容量監視部130は、チェック周期設定部120により得られるチェック周期に基づいて、データベース200内のディスク装置D1,D2等の空き容量を監視する。例えば、容量監視部130は、チェック周期に到達した時点で制御部150に対してディスク装置D1,D2等の空き容量の問い合わせを行い、制御部150から取得した空き容量と、設定ファイル162で設定された閾値とを比較することで、ディスク装置ごとにディスクフルか否かの判定を行う。   The capacity monitoring unit 130 monitors the free capacity of the disk devices D1, D2, etc. in the database 200 based on the check cycle obtained by the check cycle setting unit 120. For example, the capacity monitoring unit 130 makes an inquiry about the free capacity of the disk devices D1, D2, etc. to the control unit 150 when the check cycle is reached, and sets the free capacity acquired from the control unit 150 and the setting file 162. By comparing with the threshold value, it is determined whether or not the disk is full for each disk device.

また、容量監視部130は、問い合わせにより得られた現在の空き容量と、設定ファイル162に設定されたディスク装置D1、D2等のそれぞれの最大書き込みスループットT1、T2で書き込まれた場合の将来のディスクの空き容量とに基づいて、決定される第1の周期で、次回のディスク装置D1、D2等の空き容量の確認を行う。   In addition, the capacity monitoring unit 130 uses the current free capacity obtained by the inquiry and the future disk when written at the maximum write throughputs T1 and T2 of the disk devices D1 and D2 set in the setting file 162, respectively. The free capacity of the next disk device D1, D2, etc. is confirmed in the first cycle determined based on the free capacity of the disk device.

また、容量監視部130は、取得した現在の空き容量と、各ディスク装置の設定ファイル162に設定された閾値とを比較し、比較結果に基づくチェック内容をエラーフラグ情報として、記憶部160に記憶されたエラーチェックフラグ164に設定する。   Further, the capacity monitoring unit 130 compares the acquired current free capacity with the threshold set in the setting file 162 of each disk device, and stores the check contents based on the comparison result in the storage unit 160 as error flag information. The error check flag 164 is set.

図3は、エラーチェックフラグの一例を示す図である。エラーチェックフラグ164の項目としては、データベース200として管理される1又は複数のディスク装置を識別する「ディスク種別」、およびディスク装置に対するデータの書き込みまたは読み出し等を含む処理を実行する際に、空き容量のチェックを行うか否かを判定するための「チェックフラグ」等がある。エラーチェックフラグ164は、ディスク装置ごとに、処理実行部140において、容量監視部130におけるディスク容量のチェック周期とは非同期に、ディスク容量のチェックを行うか否かを判定するものである。   FIG. 3 is a diagram illustrating an example of an error check flag. The items of the error check flag 164 include “disk type” for identifying one or a plurality of disk devices managed as the database 200, and free space when executing processing such as data writing to or reading from the disk devices. There is a “check flag” or the like for determining whether to perform the check. The error check flag 164 determines whether or not to check the disk capacity in the process execution unit 140 for each disk device, asynchronously with the disk capacity check period in the capacity monitoring unit 130.

例えば、容量監視部130は、ディスク装置D1,D2等の現在のディスク容量と、設定ファイル162の閾値Bとを比較した結果、現在のディスク容量が閾値B以下である場合に、エラーチェックフラグ164の対象ディスク装置に対するチェックフラグを「TRUE」にする。また、現在のディスク容量が閾値Bより大きい場合(閾値Aより大きい場合を含む)、エラーチェックフラグを「FALSE」にする。なお、チェックフラグの種類は、「TRUE/FALSE」に限定されるものではなく、「1/0」、「ON/OFF」等の識別情報でもよい。   For example, the capacity monitoring unit 130 compares the current disk capacity of the disk devices D1, D2, and the like with the threshold value B of the setting file 162, and as a result, the error check flag 164 is determined. The check flag for the target disk device is set to “TRUE”. If the current disk capacity is larger than the threshold B (including the case where it is larger than the threshold A), the error check flag is set to “FALSE”. The type of the check flag is not limited to “TRUE / FALSE”, but may be identification information such as “1/0”, “ON / OFF”, and the like.

なお、上述した容量監視部130は、容量監視部130における処理をディスク容量監視スレッド(第1の処理スレッド)として起動させてもよい。スレッドとは、例えばソフトウェアやプログラムにおいて、並列処理に対応したOS上でのプログラムの最小の実行単位である。データベース管理装置100は、例えばデータベース管理装置100の起動時にディスク容量監視スレッドを起動させることで、上述した容量監視部130における各処理を実行する。   The capacity monitoring unit 130 described above may activate the processing in the capacity monitoring unit 130 as a disk capacity monitoring thread (first processing thread). A thread is a minimum execution unit of a program on an OS that supports parallel processing in, for example, software or a program. The database management apparatus 100 executes each process in the capacity monitoring unit 130 described above by, for example, starting a disk capacity monitoring thread when the database management apparatus 100 is started.

処理実行部140は、クライアント300からの指示による処理を実行する。例えば、処理実行部140は、クライアント300から得られるコマンドに対応する1又は複数のSQL(Structured Query Language)処理スレッド(第2の処理スレッド)を実行する。SQLは、データベース管理装置100に対して、ユーザ(クライアント300)や外部のソフトウェア等から命令を発行するために用いる言語である。SQLは、例えばデータベース200の各ディスク装置におけるテーブル(データ)の追加や変更、削除、各テーブル間の関係、各テーブルの定義等を行うための命令語と構文、文法等を定めることができる。   The process execution unit 140 executes a process according to an instruction from the client 300. For example, the process execution unit 140 executes one or a plurality of SQL (Structured Query Language) process threads (second process threads) corresponding to commands obtained from the client 300. SQL is a language used for issuing commands to the database management apparatus 100 from a user (client 300), external software, or the like. SQL can define, for example, command words, syntax, grammar, and the like for adding, changing, and deleting tables (data) in each disk device of the database 200, relationships between tables, definitions of each table, and the like.

例えば、処理実行部140は、ユーザが発行したSQL要求に対する処理をSQL処理スレッドで行い、必要に応じてデータの書き込みまたは読み出しを含む処理を制御部150に要求する。例えば、処理実行部140は、ディスク装置に対するデータの書き込み時にエラーチェックフラグ164を参照し、データを書き込む対象のディスク装置のチェックフラグが「TRUE」である場合、そのディスク装置への書き込み要求を行うタイミングで、空き容量の問い合わせを制御部150に要求する。なお、チェックフラグが「FALSE」である場合、処理実行部140は、空き容量の問い合わせを行わずに、データの書き込み処理のみを制御部150に要求する。   For example, the process execution unit 140 performs a process for an SQL request issued by the user using an SQL processing thread, and requests the control unit 150 to perform a process including data writing or reading as necessary. For example, the process execution unit 140 refers to the error check flag 164 when writing data to the disk device, and makes a write request to the disk device when the check flag of the disk device to which data is written is “TRUE”. At the timing, the controller 150 is requested to inquire about the free space. When the check flag is “FALSE”, the process execution unit 140 requests only the data write process from the control unit 150 without making an inquiry about the free space.

また、処理実行部140は、取得した空き容量と閾値(例えば、閾値C)とを比較し、空き容量が閾値以下である場合には、ディスクフルエラーをクライアント300等に出力する。なお、処理実行部140は、上述したディスクフルエラーの出力を制御部150に要求し、制御部150で実行させてもよい。   Further, the process execution unit 140 compares the acquired free space with a threshold (for example, threshold C), and outputs a disk full error to the client 300 or the like when the free space is equal to or less than the threshold. The process execution unit 140 may request the control unit 150 to output the above-described disk full error and cause the control unit 150 to execute the request.

上述したSQL処理スレッドは、上述したディスク容量監視スレッド(第1の処理スレッド)が起動した後に起動し、ディスク容量監視スレッドとは非同期に実行される。つまり、本実施形態において、容量監視部130および処理実行部140は、それぞれが非同期で動作するスレッドを起動して動作することができる。   The above-described SQL processing thread is activated after the above-described disk capacity monitoring thread (first processing thread) is activated, and is executed asynchronously with the disk capacity monitoring thread. That is, in the present embodiment, the capacity monitoring unit 130 and the process execution unit 140 can operate by starting threads that operate asynchronously.

制御部150は、図1に示す各構成全体の処理を制御する。制御部150による各種制御は、例えばOS等により実行される機能である。制御部150は、ディスク装置D1、D2等に対するデータの書き込みや読み出し、データの削除、テーブルの更新等の各種制御を行う。例えば、制御部150は、処理実行部140からデータの書き込み要求を受け付け、ディスク装置D1、D2等への書き込みを行う。また、制御部150は、書き込み後の空き容量の更新を行う。更新された空き容量に関する情報は、制御部150の内部メモリ等で管理されてもよい。   The control unit 150 controls processing of the entire components shown in FIG. Various controls by the control unit 150 are functions executed by the OS, for example. The control unit 150 performs various controls such as data writing / reading to / from the disk devices D1, D2, etc., data deletion, and table updating. For example, the control unit 150 receives a data write request from the process execution unit 140 and performs writing to the disk devices D1, D2, and the like. In addition, the control unit 150 updates the free space after writing. Information regarding the updated free space may be managed in the internal memory of the control unit 150 or the like.

また、制御部150は、容量監視部130または処理実行部140からの空き容量の問い合わせに対して、データベース200または内部メモリ等からディスク装置の空き容量を取得し、取得した空き容量を、問い合わせのあった容量監視部130または処理実行部140に出力する。また、制御部150は、ディスク装置D1、D2等の空き容量に基づいて、ディスクフルエラーをクライアント300に出力してもよい。   In response to an inquiry about the free space from the capacity monitoring unit 130 or the process execution unit 140, the control unit 150 obtains the free space of the disk device from the database 200 or the internal memory, The data is output to the capacity monitoring unit 130 or the processing execution unit 140. Further, the control unit 150 may output a disk full error to the client 300 based on the free capacity of the disk devices D1 and D2.

記憶部160は、データベース管理装置100のコンピュータが実行するプログラム(例えば、データベース管理プログラム)や、その他の各種設定情報(設定ファイル162)、エラーフラグ情報(エラーチェックフラグ164)、ログ情報等を記憶する。記憶部160は、例えばROM(Read Only Memory)、フラッシュメモリ、HDD(Hard Disk Drive)、SSD(Solid State Drive)、SDカード等の不揮発性の記憶媒体でもよく、RAM(Random Access Memory)、レジスタ等の揮発性の記憶媒体でもよい。   The storage unit 160 stores a program (for example, a database management program) executed by the computer of the database management apparatus 100, other various setting information (setting file 162), error flag information (error check flag 164), log information, and the like. To do. The storage unit 160 may be a non-volatile storage medium such as a ROM (Read Only Memory), a flash memory, an HDD (Hard Disk Drive), an SSD (Solid State Drive), an SD card, etc., and may be a RAM (Random Access Memory), a register, etc. A volatile storage medium such as

図4は、データベース管理装置のハードウェア構成例を示す図である。データベース管理装置100は、例えば、CPU(Central Processing Unit)100Aと、RAM(Random Access Memory)100Bと、不揮発性記憶装置100Cと、可搬型記憶媒体ドライブ装置100Dと、入出力装置100Eと、通信インターフェース100Fとを備える。データベース管理装置100は、CPU100Aに代えて、任意の形態のプロセッサを備えてもよいし、図4に示した各構成要素のうち一部を省略してもよい。   FIG. 4 is a diagram illustrating a hardware configuration example of the database management apparatus. The database management device 100 includes, for example, a CPU (Central Processing Unit) 100A, a RAM (Random Access Memory) 100B, a nonvolatile storage device 100C, a portable storage medium drive device 100D, an input / output device 100E, and a communication interface. 100F. The database management apparatus 100 may include an arbitrary form of processor instead of the CPU 100A, or some of the components shown in FIG. 4 may be omitted.

CPU100Aは、不揮発性記憶装置100Cに格納され、または可搬型記憶媒体ドライブ装置100Dに装着された可搬型記憶媒体に格納されたプログラムをRAM100Bに展開して実行することで、本実施形態における各種処理を行う。なお、データベース管理装置100は、CPU100Aに代えて、他の種類のプロセッサを備えてもよい。RAM100Bは、揮発性メモリの一例であり、CPU100Aによってワーキングエリアとして使用される。不揮発性記憶装置100Cは、例えば、HDDやフラッシュメモリ、ROM等である。可搬型記憶媒体ドライブ装置100Dには、DVD(Digital Versatile Disc)やCD(Compact Disc)、SDカード等の可搬型記憶媒体が装着される。入出力装置100Eは、例えば、キーボードやマウス、タッチパネル、表示装置等を含む。通信インターフェース100Fは、データベース管理装置100が通信ネットワークを介して、他装置と通信を行う場合のインターフェースとして機能する。データベース管理装置100のコンピュータに対して、図4に示すようなハードウェアと、プログラム等からなるソフトウェアとを協働させることで、本実施形態における各種処理を実現させることができる。   The CPU 100A develops the program stored in the nonvolatile storage device 100C or stored in the portable storage medium attached to the portable storage medium drive device 100D in the RAM 100B, and executes various programs in the present embodiment. I do. Note that the database management apparatus 100 may include another type of processor instead of the CPU 100A. The RAM 100B is an example of a volatile memory, and is used as a working area by the CPU 100A. The non-volatile storage device 100C is, for example, an HDD, a flash memory, a ROM, or the like. The portable storage medium drive device 100D is loaded with a portable storage medium such as a DVD (Digital Versatile Disc), a CD (Compact Disc), or an SD card. The input / output device 100E includes, for example, a keyboard, a mouse, a touch panel, a display device, and the like. The communication interface 100F functions as an interface when the database management apparatus 100 communicates with other apparatuses via a communication network. Various processes in the present embodiment can be realized by causing the computer of the database management apparatus 100 to cooperate with hardware such as that shown in FIG. 4 and software such as a program.

図5は、本実施形態におけるデータベース管理処理を説明するための図である。図5の例では、データベース管理装置100と、データベース200と、クライアント300とを有する。また、図5は、マルチスレッド方式により、データベース200のディスク容量チェックを行う例を示している。例えば、図5に示すディスク容量監視スレッド500は、上述した容量監視部130に対応し、OS502は、上述した制御部150に対応し、SQL処理スレッド504は、上述した処理実行部140に対応している。なお、OS502は、データベース管理装置100に設けられているが、データベース200側に設けられてもよい。   FIG. 5 is a diagram for explaining database management processing in the present embodiment. In the example of FIG. 5, the database management apparatus 100, the database 200, and the client 300 are included. FIG. 5 shows an example of checking the disk capacity of the database 200 by the multi-thread method. For example, the disk capacity monitoring thread 500 illustrated in FIG. 5 corresponds to the capacity monitoring unit 130 described above, the OS 502 corresponds to the control unit 150 described above, and the SQL processing thread 504 corresponds to the process execution unit 140 described above. ing. The OS 502 is provided in the database management apparatus 100, but may be provided on the database 200 side.

ここで、本実施形態におけるディスク容量チェックとは、例えばデータベース管理装置100が行うディスク装置ごとの空き容量の問い合わせや、問い合わせにより取得した空き容量と所定の閾値との比較結果に基づいて、ディスクフルエラーを出力したり、次回のチェック周期を設定する処理である。本実施形態では、ディスク装置の空き容量(または使用容量)に応じた周期を設定し、設定した周期でディスク容量チェックを行う。   Here, the disk capacity check in the present embodiment refers to, for example, an inquiry about the free capacity for each disk device performed by the database management apparatus 100, and a comparison result between the free capacity acquired by the inquiry and a predetermined threshold. This is a process for outputting an error or setting the next check cycle. In this embodiment, a cycle according to the free capacity (or used capacity) of the disk device is set, and the disk capacity is checked at the set cycle.

図5の例において、データベース管理装置100のディスク容量監視スレッド500は、3つの閾値A〜Cとディスク装置の最大書き込みスループットTとを有する設定ファイル162を取得する(図5に示す(1))。また、ディスク容量監視スレッド500は、チェック周期設定部120により設定された周期でOS502へディスク空き容量を問い合わせる(図5に示す(2))。OS502は、ディスク容量監視スレッド500からの空き容量の問い合わせに対して、データベース200に問い合わせを行い(図5に示す(3))、対応するディスク装置の空き容量を取得する(図5に示す(4))。また、OS502は、取得した空き容量をディスク容量監視スレッド500に出力する(図5に示す(5))。なお、OS502は、予め内部メモリ等にディスク装置の空き容量に関する情報を記憶している場合には、その情報をディスク容量監視スレッド500に出力してもよい。   In the example of FIG. 5, the disk capacity monitoring thread 500 of the database management apparatus 100 acquires a setting file 162 having three thresholds A to C and the maximum write throughput T of the disk device ((1) shown in FIG. 5). . Further, the disk capacity monitoring thread 500 inquires of the OS 502 about the free disk capacity at the period set by the check period setting unit 120 ((2) shown in FIG. 5). In response to the free space inquiry from the disk capacity monitoring thread 500, the OS 502 makes an inquiry to the database 200 ((3) shown in FIG. 5) and acquires the free capacity of the corresponding disk device (shown in FIG. 5). 4)). Further, the OS 502 outputs the acquired free capacity to the disk capacity monitoring thread 500 ((5) shown in FIG. 5). Note that the OS 502 may output the information to the disk capacity monitoring thread 500 when information about the free capacity of the disk device is stored in advance in the internal memory or the like.

ディスク容量監視スレッド500は、設定ファイル162に設定された閾値Aまたは閾値Bと、現在の空き容量とを比較し、比較結果に基づきエラーチェックフラグ164のチェックフラグを更新する(図5に示す(6))。また、ディスク容量監視スレッド500は、空き容量と閾値とのチェック結果に基づいて、チェック周期設定部120により設定されたチェック周期で、次回の空き容量の確認を行う。   The disk capacity monitoring thread 500 compares the threshold A or threshold B set in the setting file 162 with the current free capacity, and updates the check flag of the error check flag 164 based on the comparison result (shown in FIG. 5 ( 6)). Further, the disk capacity monitoring thread 500 checks the next free capacity at the check cycle set by the check period setting unit 120 based on the check result of the free capacity and the threshold value.

また、処理実行部140は、例えばユーザが発行したSQL要求を処理する。処理実行部140は、1又は複数のSQL要求の数に応じたSQL処理スレッド504を生成し、生成したSQL処理スレッドを実行させる。ここで、処理実行部140は、例えばデータベース200のディスク装置に対する書き込み処理や読み出し処理、および削除処理等のうち、書き込み処理を行うSQL処理スレッドを実行する場合に、エラーチェックフラグ164を読み出す(図5に示す(7))。   Further, the process execution unit 140 processes an SQL request issued by a user, for example. The process execution unit 140 generates a SQL processing thread 504 corresponding to the number of one or a plurality of SQL requests, and executes the generated SQL processing thread. Here, the process execution unit 140 reads the error check flag 164 when executing an SQL processing thread that performs a write process, for example, among a write process, a read process, a delete process, and the like of the database 200 in the disk device (see FIG. (7) shown in FIG.

また、処理実行部140は、データの書き込み対象のディスク装置のチェックフラグが「TRUE」である場合、データの書き込み処理とともにOS502に対して空き容量の問い合わせを行う(図5に示す(8))。OS502は、SQL処理スレッド504によるディスク装置への書き込み処理があった場合に、データベース200の対象のディスク装置に対する書き込みを行うとともに、空き容量の更新を行う(図5に示す(9))。なお、OS502は、データの削除処理等により空き容量が変更される場合にも、ディスク装置の空き容量の更新を行う。   Further, when the check flag of the disk device to which data is to be written is “TRUE”, the process execution unit 140 inquires of the free space with respect to the OS 502 together with the data write process ((8) shown in FIG. 5). . When there is a write process to the disk device by the SQL processing thread 504, the OS 502 writes to the target disk device of the database 200 and updates the free capacity ((9) shown in FIG. 5). Note that the OS 502 also updates the free capacity of the disk device even when the free capacity is changed by data deletion processing or the like.

また、OS502は、ディスク装置への書き込み処理の実行結果と、書き込み処理により更新されたディスク空き容量を取得し(図5に示す(10))、取得した実行結果および空き容量をSQL処理スレッド504に出力する(図5に示す(11))。なお、OS502は、予め内部メモリ等にディスク装置の空き容量に関する情報を記憶している場合には、その情報をSQL処理スレッド504に出力してもよい。   Also, the OS 502 acquires the execution result of the writing process to the disk device and the disk free space updated by the writing process ((10) shown in FIG. 5), and the acquired execution result and the free capacity are displayed in the SQL processing thread 504. ((11) shown in FIG. 5). Note that the OS 502 may output the information to the SQL processing thread 504 when information about the free capacity of the disk device is stored in the internal memory or the like in advance.

SQL処理スレッド504は、ディスク装置の空き容量が、閾値Cより小さい場合に、ディスクフルエラーを出力する。また、SQL処理スレッド504は、現在のディスク容量が閾値C以上である場合には、ディスクフルエラーを出力しない。なお、ディスクフルエラーは、対象のディスク装置にデータを書き込むことができない場合に発生するエラーである。この場合、処理実行部140は、エラーメッセージをクライアント300の画面に出力してもよい。また、処理実行部140は、ディスク装置の空き容量が増加するように、記憶されているデータの削除や圧縮、移動、ディスク容量の拡張等の処理を実行させてもよい。なお、SQL処理スレッド504による空き容量のチェックを行っている場合でも、ディスク容量監視スレッド500で空き容量のチェックを行ってよい。この場合、ディスク容量監視スレッド500の次のチェック周期は、空き容量が増加するまでの時間を考慮し、すぐにチェックしなくてもよいため、長めの固定値(例えば10秒後等)が設定される。   The SQL processing thread 504 outputs a disk full error when the free capacity of the disk device is smaller than the threshold value C. The SQL processing thread 504 does not output a disk full error when the current disk capacity is equal to or greater than the threshold value C. The disk full error is an error that occurs when data cannot be written to the target disk device. In this case, the process execution unit 140 may output an error message on the screen of the client 300. Further, the process execution unit 140 may execute processes such as deletion, compression, movement, and expansion of the disk capacity of stored data so that the free capacity of the disk device increases. Even when the free capacity is checked by the SQL processing thread 504, the free capacity may be checked by the disk capacity monitoring thread 500. In this case, the next check cycle of the disk capacity monitoring thread 500 does not need to be checked immediately in consideration of the time until the free capacity increases, so a long fixed value (for example, after 10 seconds) is set. Is done.

このように、本実施形態では、ディスク容量監視スレッド500が、SQL処理スレッド504と非同期で空き容量を確認する。また、本実施形態では、ディスク容量監視スレッド500は、空き容量と、容量に関する閾値とを比較した結果に基づいて、空き容量をチェックする周期を変動させる。これにより、より適切なタイミングで空き容量の確認を行うことができ、必要に応じて空き容量に関する注意喚起を行うことができる。   As described above, in this embodiment, the disk capacity monitoring thread 500 confirms the free capacity asynchronously with the SQL processing thread 504. In this embodiment, the disk capacity monitoring thread 500 changes the period for checking the free capacity based on the result of comparing the free capacity and the threshold value related to the capacity. As a result, it is possible to check the free space at a more appropriate timing, and to alert the free space as necessary.

次に、ディスク装置の現在の空き容量と、閾値と、最大書き込みスループットTとの関係に基づく、空き容量のチェック周期の設定内容について、具体的に説明する。例えば、ディスク装置の空き容量が大きい場合は、短い間隔で空き容量をチェックするのは無駄になる。また、空き容量が少ない場合は、短い間隔でチェックした方が、ディスク装置の空き容量の不足を早期に把握することができ、システムエラー等を防止することができる。そこで、本実施形態では、現在の空き容量と、一以上の閾値と、ディスク最大書き込みしスループットTとに基づいて、ディスクチェック周期を設定する。   Next, the setting contents of the check period of the free capacity based on the relationship between the current free capacity of the disk device, the threshold value, and the maximum write throughput T will be specifically described. For example, if the free capacity of the disk device is large, it is useless to check the free capacity at short intervals. In addition, when the free space is small, checking at short intervals can grasp the shortage of the free space of the disk device at an early stage, and can prevent a system error or the like. Therefore, in this embodiment, the disk check cycle is set based on the current free capacity, one or more threshold values, and the maximum disk write and throughput T.

ここで、チェック周期を設定する場合、空き容量チェックの実行時に、データベース管理装置100のエラー処理が可能な空き容量を残しておく必要がある。しかしながら、エラー処理に関するプロセス数が数十〜数百もあるとともに、データベース管理装置100がエラー処理以外でデータを書き込むこともあるため、ディスク装置全体の書き込みスループットの最大を調べるのは難しい。   Here, when the check cycle is set, it is necessary to leave a free space that can be processed by the database management apparatus 100 when the free space check is executed. However, since there are several tens to several hundred processes related to error processing, and the database management apparatus 100 may write data other than error processing, it is difficult to check the maximum write throughput of the entire disk device.

そこで、本実施形態では、ディスク容量チェックを、ディスク装置のカタログスペックから取得した最大書き込みスループットT(MB/s)により設定する。このチェック周期は、SQL処理の実行とは非同期(別のタイミング)で実行される周期である。   Therefore, in this embodiment, the disk capacity check is set by the maximum write throughput T (MB / s) acquired from the catalog specifications of the disk device. This check cycle is a cycle that is executed asynchronously (with different timing) from the execution of the SQL process.

図6は、チェック周期の第1の設定例を説明するため図である。図6の例では、横軸に時間を示し、縦軸にディスク装置の空き容量を示している。また、図6の例では、ディスク装置の実際の空き容量、および最大書き込みスループットに基づく空き容量の減少の様子を示している。また、図6の例では、チェック周期の1回目から3回目のいずれの場合も、実際の空き容量が閾値Aより大きい場合を示している。   FIG. 6 is a diagram for explaining a first setting example of the check cycle. In the example of FIG. 6, the horizontal axis represents time, and the vertical axis represents the free capacity of the disk device. In the example of FIG. 6, the actual free capacity of the disk device and the state of free capacity reduction based on the maximum write throughput are shown. Further, in the example of FIG. 6, the case where the actual free space is larger than the threshold A is shown in any of the first to third check cycles.

チェック周期設定部120は、書き込み先のディスク装置に対する最大書き込みスループットTに基づいてデータを書き込んだ場合に減少する将来の空き容量が、閾値Aの容量になるまで減少したときの時間(図6に示す時間t1a)をチェック周期(1回目)として設定する。   The check cycle setting unit 120 sets the time when the future free space that decreases when data is written based on the maximum write throughput T to the write destination disk device is reduced to the threshold A capacity (see FIG. 6). The indicated time t1a) is set as the check cycle (first time).

ここで、周期(1回目)の容量チェックの結果として、実際の空き容量が、閾値Aより大きい場合、チェック周期設定部120は、チェック周期(1回目)におけるチェック時に取得した現在の空き容量を基準に、書き込み先のディスク装置に対する最大書き込みスループットTに基づいて、データを書き込んだ場合に減少する将来の空き容量が、閾値Aの容量になるまで減少したときの時間(図6に示す時間t2a)を次のチェック周期(2回目)として設定する。また同様に、チェック周期設定部120は、チェック周期(2回目)におけるチェック時に取得した実際の空き容量が、閾値Aより大きい場合に、最大書き込みスループットTに基づいてデータを書き込んだ場合に減少する将来の空き容量が、閾値Aの容量になるまで減少したときの時間(図6に示す時間t3a)を次のチェック周期(3回目)として設定する。以下、実際の空き容量が、閾値Aより大きい場合には、同様の処理が行われる。   Here, as a result of the capacity check in the cycle (first time), when the actual free space is larger than the threshold A, the check cycle setting unit 120 uses the current free space acquired at the check in the check cycle (first time). Based on the maximum write throughput T with respect to the write destination disk device as a reference, the time when the future free space that decreases when data is written decreases to the threshold A capacity (time t2a shown in FIG. 6). ) Is set as the next check cycle (second time). Similarly, the check cycle setting unit 120 decreases when data is written based on the maximum write throughput T when the actual free space acquired at the check in the check cycle (second time) is larger than the threshold A. The time (time t3a shown in FIG. 6) when the future free capacity decreases until reaching the capacity of the threshold A is set as the next check cycle (third time). Hereinafter, when the actual free space is larger than the threshold A, the same processing is performed.

図7は、チェック周期の第2の設定例を説明するため図である。図7の例では、図6の例と同様に、横軸に時間を示し、縦軸にディスク装置の空き容量を示している。また、図7の例では、ディスク装置の実際の空き容量と、最大書き込みスループットに基づく空き容量の減少と、所定の安全率に基づいてチェック周期を割り引いた様子とを示している。また、図7の例では、チェック周期の1回目から3回目のいずれの場合も、実際の空き容量が閾値A以下で、閾値Bより大きい場合を示している。   FIG. 7 is a diagram for explaining a second setting example of the check cycle. In the example of FIG. 7, as in the example of FIG. 6, the horizontal axis indicates time, and the vertical axis indicates the free capacity of the disk device. The example of FIG. 7 shows the actual free capacity of the disk device, the reduction of the free capacity based on the maximum write throughput, and the state in which the check cycle is discounted based on a predetermined safety factor. Further, in the example of FIG. 7, the actual free space is equal to or smaller than the threshold A and larger than the threshold B in any of the first to third check cycles.

図7の例に示すように、例えば、実際の空き容量が閾値A以下であり、且つ、閾値Bより大きい場合、チェック周期設定部120は、書き込み先のディスク装置に対する最大書き込みスループットTに基づいてデータを書き込んだ場合に減少する空き容量が、閾値Bの容量になるまで減少したときの時間(図7に示す時間t1b)を取得する。さらに、チェック周期設定部120は、時間t1bから所定の安全率で割り引いた時間(図7に示すt1b’)をチェック周期(1回目)として設定する。ここで、安全率とは、ディスク容量が閾値B以下になる前に、空き容量チェックを確実に行うことを保証するためのパラメータである。   As shown in the example of FIG. 7, for example, when the actual free space is equal to or smaller than the threshold A and larger than the threshold B, the check cycle setting unit 120 is based on the maximum write throughput T with respect to the write destination disk device. The time (time t1b shown in FIG. 7) is acquired when the free capacity that decreases when data is written decreases to the threshold B capacity. Furthermore, the check cycle setting unit 120 sets a time (t1b ′ shown in FIG. 7) obtained by discounting from the time t1b by a predetermined safety factor as the check cycle (first time). Here, the safety factor is a parameter for guaranteeing that the free capacity check is surely performed before the disk capacity becomes the threshold value B or less.

ここで、周期(1回目)の容量チェックの結果として、実際の空き容量が閾値A以下で、且つ、閾値Bより大きい場合、チェック周期設定部120は、チェック周期(1回目)におけるチェック時に取得した現在の空き容量を基準に、書き込み先のディスク装置に対する最大書き込みスループットTに基づいてデータを書き込んだ場合に減少する空き容量が、閾値Bの容量になるまで減少したときの時間(図7に示す時間t2b)を取得する。さらに、チェック周期設定部120は、時間t2bから所定の安全率で割り引いた時間(図7に示すt2b’)を次のチェック周期(2回目)として設定する。   Here, as a result of the capacity check in the cycle (first time), when the actual free space is equal to or smaller than the threshold A and larger than the threshold B, the check cycle setting unit 120 is acquired at the time of the check in the check cycle (first time). The time when the free space that decreases when data is written based on the maximum write throughput T with respect to the write destination disk device is reduced to the threshold B capacity based on the current free space (see FIG. 7). The indicated time t2b) is acquired. Further, the check cycle setting unit 120 sets a time (t2b ′ shown in FIG. 7) obtained by discounting from the time t2b by a predetermined safety factor as the next check cycle (second time).

また同様に、チェック周期設定部120は、チェック周期(2回目)におけるチェック時に取得した実際の空き容量が、閾値A以下であり、且つ閾値Bより大きい場合に、最大書き込みスループットTに基づいてデータを書き込んだ場合に減少する将来の空き容量が、閾値Aの容量になるまで減少したときの時間(図7に示す時間t3b)を取得する。さらに、チェック周期設定部120は、時間t3bから所定の安全率で割り引いた時間(図7に示すt3b’)をチェック周期(3回目)として設定する。以下、実際の空き容量が、閾値A以下であり、且つ閾値Bより大きい場合に、同様の処理が行われる。図6および図7の処理は、チェック周期による空き容量と閾値との関係に基づいて切り替えることができる。なお、上述した図6、図7に示すチェック周期の設定手法は、これに限定されるものではない。   Similarly, the check cycle setting unit 120 sets the data based on the maximum write throughput T when the actual free space acquired at the check in the check cycle (second time) is equal to or less than the threshold A and greater than the threshold B. The time (time t3b shown in FIG. 7) is acquired when the future free space that decreases when the value is written is reduced to the threshold A capacity. Further, the check cycle setting unit 120 sets a time (t3b ′ shown in FIG. 7) obtained by discounting from the time t3b by a predetermined safety factor as the check cycle (third time). Hereinafter, when the actual free space is equal to or smaller than the threshold A and larger than the threshold B, the same processing is performed. The processes in FIGS. 6 and 7 can be switched based on the relationship between the free space and the threshold value based on the check cycle. Note that the check cycle setting method shown in FIGS. 6 and 7 is not limited to this.

上述した図6、図7に示すように、データベース管理装置100は、実際のディスク装置の空き容量に応じてディスク装置の空き容量のチェック周期を変動させることができる。より具体的には、ディスク装置の空き容量に余裕がある場合にはチェック周期を長くし、空き容量が不足しそうな状況の場合にはチェック周期を短くすることができる。これにより、より適切なタイミングで空き容量に関する注意喚起を行うことができる。また、適切な頻度で空き容量を確認することができるため、データベース管理装置100の監視コストを軽減することができ、処理性能を向上させることができる。   As shown in FIG. 6 and FIG. 7 described above, the database management apparatus 100 can change the check period of the free capacity of the disk device according to the actual free capacity of the disk device. More specifically, the check cycle can be lengthened when the free space of the disk device has a margin, and the check cycle can be shortened when the free space is likely to be insufficient. Thereby, it is possible to call attention regarding the free space at a more appropriate timing. Moreover, since the free space can be confirmed at an appropriate frequency, the monitoring cost of the database management apparatus 100 can be reduced, and the processing performance can be improved.

次に、上述した本実施形態におけるデータベース管理装置100における各種処理について、フローチャートを用いて説明する。図8は、チェック周期の設定処理の第1の実施例を示すフローチャートである。なお、以下の説明では、チェック対象のディスク装置の空き容量を、すでに取得しているものとして説明する。   Next, various processes in the database management apparatus 100 according to the present embodiment described above will be described with reference to flowcharts. FIG. 8 is a flowchart showing a first embodiment of the check cycle setting process. In the following description, it is assumed that the free capacity of the disk device to be checked has already been acquired.

図8の例において、チェック周期設定部120は、ディスク装置の空き容量が閾値Aより大きいか否かを判定する(ステップS100)。空き容量が閾値Aよりも大きい場合、チェック周期設定部120は、現在の空き容量を閾値Aで減算し、減算により得られた値に対し、最大書き込みスループットTで除算した値(”(現在の空き容量−閾値A)/最大書き込みスループットT”)を、次のチェック周期(第1の周期)として設定する(ステップS102)。なお、空き容量が閾値Aよりも大きい場合には、空き容量に余裕がある。そのため、チェック周期設定部120は、ステップS102において、固定値(例えば、1分後等)を次の周期として設定してもよい。   In the example of FIG. 8, the check cycle setting unit 120 determines whether or not the free capacity of the disk device is larger than the threshold A (step S100). When the free space is larger than the threshold value A, the check cycle setting unit 120 subtracts the current free space by the threshold value A, and divides the value obtained by the subtraction by the maximum write throughput T (“(current Free capacity−threshold A) / maximum write throughput T ″) is set as the next check cycle (first cycle) (step S102). When the free space is larger than the threshold A, there is a free space. Therefore, the check cycle setting unit 120 may set a fixed value (for example, after 1 minute) as the next cycle in step S102.

また、空き容量が閾値A以下である場合、チェック周期設定部120は、空き容量が閾値Bより大きいか否かを判定する(ステップS104)。空き容量が閾値Bより大きい場合、チェック周期設定部120は、現在の空き容量を閾値Bで減算し、減算した値に対して、最大書き込みスループットTで除算した値を算出し、さらに算出した値を安全率p(p<1)で乗算した(割り引いた)値(”(現在の空き容量−閾値B)/最大書き込みスループットT×安全率p”)を、次のチェック周期(第2の周期)として設定する(ステップS106)。   If the free space is equal to or less than the threshold A, the check cycle setting unit 120 determines whether or not the free space is larger than the threshold B (step S104). When the free space is larger than the threshold value B, the check cycle setting unit 120 subtracts the current free space by the threshold value B, calculates a value obtained by dividing the subtracted value by the maximum write throughput T, and further calculates the calculated value. Multiplied by the safety factor p (p <1) ("subtracted") ("(current free capacity-threshold B) / maximum write throughput T x safety factor p") for the next check cycle (second cycle) ) (Step S106).

また、空き容量が閾値B以下である場合、チェック周期設定部120は、空き容量が閾値Cより大きいか否かを判定する(ステップS108)。空き容量が閾値Cより大きい場合、チェック周期設定部120は、データの書き込み処理を実行するタイミングを、次のチェックを行うタイミングとして設定する(ステップS110)。つまり、ステップS110の処理では、対象のディスク装置に対して、データの書き込みを行うSQL処理スレッドを実行するタイミングを、空き容量の次のチェック周期として設定する。なお、このチェック周期は、非周期的なものであるが、便宜上、第3の周期として説明する。また、第3の周期は、上述したSQL処理スレッドで実行されるチェック周期であるが、容量監視部130でも継続して空き容量のチェックを行ってもよい。その場合、チェック周期設定部120は、例えば固定値(例えば、10秒後等)を容量監視部130における次のチェック周期として設定する。   If the free space is equal to or less than the threshold B, the check cycle setting unit 120 determines whether the free space is greater than the threshold C (step S108). When the free space is larger than the threshold value C, the check cycle setting unit 120 sets the timing for executing the data writing process as the timing for performing the next check (step S110). That is, in the process of step S110, the timing for executing the SQL processing thread for writing data to the target disk device is set as the next check cycle of the free space. This check cycle is aperiodic, but will be described as the third cycle for convenience. The third cycle is a check cycle executed by the above-described SQL processing thread, but the capacity monitoring unit 130 may continuously check the free space. In that case, the check cycle setting unit 120 sets, for example, a fixed value (for example, after 10 seconds) as the next check cycle in the capacity monitoring unit 130.

また、空き容量が閾値C以下である場合は、ディスクフルエラーが出力されるため、チェック周期設定部120は、チェック周期の設定を行わずにチェック周期の設定処理を終了する。   When the free space is equal to or less than the threshold value C, a disk full error is output, so the check cycle setting unit 120 ends the check cycle setting process without setting the check cycle.

また、データベース管理装置100は、現在の空き容量と各閾値等との差が、所定値未満である場合(例えば、空き容量が閾値に近い場合)、異なる条件で算出した周期同士を比較し、比較結果に基づいて次のチェック周期を設定してもよい。上述した内容をチェック周期の設定処理の第2の実施例として、以下に説明する。   Further, when the difference between the current free space and each threshold value is less than a predetermined value (for example, when the free space is close to the threshold value), the database management device 100 compares the periods calculated under different conditions, The next check cycle may be set based on the comparison result. The above description will be described below as a second embodiment of the check cycle setting process.

図9は、チェック周期の設定処理の第2の実施例を示すフローチャートである。なお、図9の例においては、上述した第1の周期および第2の周期の算出内容については、上述した内容と同一であるため、ここでの具体的な説明は省略する。   FIG. 9 is a flowchart showing a second embodiment of the check cycle setting process. In the example of FIG. 9, the calculation contents of the first period and the second period described above are the same as the above-described contents, and a specific description thereof is omitted here.

図9の例において、チェック周期設定部120は、ディスク装置の空き容量が閾値Aより大きいか否かを判定する(ステップS200)。空き容量が閾値Aよりも大きい場合、チェック周期設定部120は、空き容量を閾値Aで減算した値(差分値)が、所定値以上か否かを判定する(ステップS202)。空き容量を閾値Aで減算した値が所定値以上である場合、チェック周期設定部120は、上述した第1の周期を次のチェック周期として設定する(ステップS204)。   In the example of FIG. 9, the check cycle setting unit 120 determines whether or not the free capacity of the disk device is larger than the threshold value A (step S200). When the free space is larger than the threshold A, the check cycle setting unit 120 determines whether or not the value (difference value) obtained by subtracting the free space by the threshold A is equal to or greater than a predetermined value (step S202). When the value obtained by subtracting the free space by the threshold A is equal to or larger than the predetermined value, the check cycle setting unit 120 sets the first cycle described above as the next check cycle (step S204).

また、空き容量を閾値Aで減算した値が、所定値未満である場合、チェック周期設定部120は、上述した第1の周期よりも第2の周期が大きいか否かを判定する(ステップS206)。第1の周期が第2の周期よりも大きい場合、チェック周期設定部120は、上述したステップS204と同様に、第1の周期を次のチェック周期として設定する。また、第1の周期が第2の周期以下である場合、チェック周期設定部120は、上述した第2の周期を次のチェック周期として設定する(ステップS208)。つまり、第2の実施例では、空き容量が閾値A近辺である場合に、異なる算出方法で算出された第1の周期と第2の周期とを比較し、周期(間隔)が大きい方の周期を設定する。これにより、適切な周期でディスク装置の空き容量をチェックすることができる。   If the value obtained by subtracting the free space by the threshold A is less than the predetermined value, the check cycle setting unit 120 determines whether or not the second cycle is larger than the first cycle described above (step S206). ). When the first cycle is larger than the second cycle, the check cycle setting unit 120 sets the first cycle as the next check cycle, similarly to step S204 described above. If the first cycle is equal to or shorter than the second cycle, the check cycle setting unit 120 sets the second cycle described above as the next check cycle (step S208). That is, in the second embodiment, when the free space is in the vicinity of the threshold value A, the first cycle calculated by different calculation methods is compared with the second cycle, and the cycle with the larger cycle (interval) is used. Set. Thereby, the free capacity of the disk device can be checked at an appropriate cycle.

また、上述したステップS200の処理において、空き容量が閾値A以下である場合、チェック周期設定部120は、空き容量が閾値Bより大きいか否かを判定する(ステップS210)。空き容量が閾値Bより大きい場合、チェック周期設定部120は、空き容量を閾値Bで減算した値(差分値)が、所定値以上であるか否かを判定する(ステップS212)。空き容量を閾値Bで減算した値が、所定値以上である場合、上述したステップS208の処理と同様に、第2の周期を次のチェック周期として設定する。   In the above-described processing of step S200, when the free space is equal to or less than the threshold A, the check cycle setting unit 120 determines whether the free space is larger than the threshold B (step S210). When the free space is larger than the threshold value B, the check cycle setting unit 120 determines whether or not the value (difference value) obtained by subtracting the free space by the threshold value B is greater than or equal to a predetermined value (step S212). If the value obtained by subtracting the free space by the threshold value B is equal to or larger than the predetermined value, the second cycle is set as the next check cycle in the same manner as in step S208 described above.

また、空き容量を閾値Bで減算した値が、所定値未満である場合、チェック周期設定部120は、閾値Bから閾値Cを減算し、減算した値を最大書き込みスループットで除算した値を算出し、さらに算出した値を安全率pで乗算した値(”(閾値B−閾値C)/最大書き込みスループットT×安全率p”)を第4の周期として算出する(ステップS214)。   When the value obtained by subtracting the free space by the threshold value B is less than the predetermined value, the check cycle setting unit 120 calculates a value obtained by subtracting the threshold value C from the threshold value B and dividing the subtracted value by the maximum write throughput. Further, a value obtained by multiplying the calculated value by the safety factor p (“(threshold B−threshold C) / maximum write throughput T × safety factor p”) is calculated as the fourth period (step S214).

次に、チェック周期設定部120は、第2の周期が第4の周期より大きいか否かを判定する(ステップS216)。第2の周期が第4の周期より大きい場合、チェック周期設定部120は、上述したステップS208の処理と同様に、第2の周期を次のチェック周期として設定する。また、第2の周期が第4の周期以下である場合、チェック周期設定部120は、第4の周期を次のチェック周期として設定する(ステップS218)。つまり、第2の実施例では、空き容量が閾値B近辺である場合に、異なる算出方法で算出された第2の周期と第4の周期とを比較し、周期(間隔)が大きい方の周期を設定する。これにより、適切な周期でディスク容量をチェックすることができる。   Next, the check cycle setting unit 120 determines whether or not the second cycle is greater than the fourth cycle (step S216). When the second cycle is larger than the fourth cycle, the check cycle setting unit 120 sets the second cycle as the next check cycle, as in the process of step S208 described above. If the second period is equal to or less than the fourth period, the check period setting unit 120 sets the fourth period as the next check period (step S218). That is, in the second embodiment, when the free space is in the vicinity of the threshold B, the second cycle calculated by different calculation methods is compared with the fourth cycle, and the cycle with the larger cycle (interval) is used. Set. As a result, the disk capacity can be checked at an appropriate cycle.

また、上述したステップS210の処理において、空き容量が閾値B以下である場合、チェック周期設定部120は、空き容量が閾値Cより大きいか否かを判定する(ステップS220)。空き容量が閾値Cより大きい場合、チェック周期設定部120は、上述した第3の周期を次のチェック周期として設定する(ステップS222)。   In the above-described processing of step S210, when the free space is equal to or smaller than the threshold value B, the check cycle setting unit 120 determines whether the free space is larger than the threshold value C (step S220). When the free space is larger than the threshold value C, the check cycle setting unit 120 sets the above-described third cycle as the next check cycle (step S222).

また、空き容量が閾値C以下である場合は、ディスクフルエラーが出力されるため、チェック周期設定部120は、チェック周期の設定を行わずに処理を終了する。上述したように、第2の実施例により、例えば空き容量が、閾値A近辺または閾値B近辺である場合に、異なる手法で算出された周期の比較結果に基づいて次のチェック周期が設定されるため、より適切な周期で容量チェックを行うことができる。   If the free space is equal to or less than the threshold value C, a disk full error is output, so the check cycle setting unit 120 ends the process without setting the check cycle. As described above, according to the second embodiment, for example, when the free space is near the threshold value A or the threshold value B, the next check cycle is set based on the comparison result of the cycles calculated by different methods. Therefore, the capacity check can be performed at a more appropriate cycle.

ここで、本実施形態におけるチェック周期の設定例について、具体的に説明する。例えば、閾値A=500[MB]、閾値B=100[MB]、閾値C=10[MB]とし、ディスク装置の最大書き込みスループットT=100[MB/s]とする。また、安全率p=0.5とする。   Here, a setting example of the check cycle in the present embodiment will be specifically described. For example, the threshold A = 500 [MB], the threshold B = 100 [MB], the threshold C = 10 [MB], and the maximum write throughput T = 100 [MB / s] of the disk device. Further, the safety factor p = 0.5.

例えば、ディスク装置の空き容量が2[GB]の場合、次のチェック周期は、上述した設定手法を用いると、“(2[GB]−500[MB])/100[MB/s]”=15秒後となる。また、ディスク装置の空き容量が510[MB]の場合、上述したチェック周期の設定処理の第2の実施例を用いると、閾値A基準の周期が“(510[MB]−500[MB])/100[MB/s]”=0.1[秒]となり、閾値B基準の周期が“(510[MB]−100[MB])/100[MB/s]×0.5”=2.05[秒]となる。したがって、次のチェック周期は、値の大きい2.05秒後となる。   For example, when the free capacity of the disk device is 2 [GB], the next check cycle is “(2 [GB] −500 [MB]) / 100 [MB / s]” = After 15 seconds. When the free capacity of the disk device is 510 [MB], the threshold A-based cycle is “(510 [MB] −500 [MB]) by using the second embodiment of the check cycle setting process described above. / 100 [MB / s] ”= 0.1 [seconds], and the threshold B reference cycle is“ (510 [MB] −100 [MB]) / 100 [MB / s] × 0.5 ”= 2. 05 [seconds]. Therefore, the next check cycle is 2.05 seconds after the large value.

また、ディスク装置の空き容量が200MBの場合、閾値B基準の周期は、“(200[MB]−100[MB])/100[MB/s]×0.5”=0.5秒後となる。また、ディスク装置の空き容量が110[MB]の場合、上述したチェック周期の設定処理の第2の実施例を用いると、閾値B基準の周期は、“(110[MB]−100[MB])/100[MB/s]×0.5”=50[ms]となり、閾値C基準の周期は、“(100[MB]−10[MB])/100[MB/s]×0.5”=450[ms]となる。したがって、次のチェック周期は、値の大きい450ms後となる。なお、上述したチェック周期の算出手法については、これに限定されるものではなく、他の算出手法によりチェック周期を設定してもよい。   When the free capacity of the disk device is 200 MB, the threshold B reference cycle is “(200 [MB] −100 [MB]) / 100 [MB / s] × 0.5” = 0.5 seconds later. Become. Further, when the free capacity of the disk device is 110 [MB] and the second embodiment of the check cycle setting process described above is used, the cycle based on the threshold B is “(110 [MB] −100 [MB]”. ) / 100 [MB / s] × 0.5 ”= 50 [ms], and the threshold C reference period is“ (100 [MB] −10 [MB]) / 100 [MB / s] × 0.5. "= 450 [ms]. Therefore, the next check cycle is 450 ms after the large value. Note that the check cycle calculation method described above is not limited to this, and the check cycle may be set by another calculation method.

次に、容量監視部130における容量監視処理について、フローチャートを用いて説明する。図10は、容量監視処理の一例を示すフローチャートである。図10の例において、容量監視部130は、クライアント300等からのディスク装置の空き容量監視要求を受け付け(ステップS300)、受け付けた要求に基づいて、所定の周期でディスク装置の空き容量を問い合わせる(ステップS302)。次に、容量監視部130は、ディスク装置の空き容量が閾値Bより大きいか否かを判定する(ステップS304)。閾値Bより大きい場合、容量監視部130は、記憶部160に記憶されたエラーチェックフラグ164における対象のディスク装置のチェックフラグを「FALSE」に設定する(ステップS306)。また、空き容量が閾値B以下の場合、エラーチェックフラグ164における対象のディスク装置のチェックフラグを「TRUE」に設定する(ステップS308)。   Next, capacity monitoring processing in the capacity monitoring unit 130 will be described using a flowchart. FIG. 10 is a flowchart illustrating an example of the capacity monitoring process. In the example of FIG. 10, the capacity monitoring unit 130 receives a disk device free capacity monitoring request from the client 300 or the like (step S300), and inquires about the free capacity of the disk device at a predetermined cycle based on the received request (step S300). Step S302). Next, the capacity monitoring unit 130 determines whether or not the free capacity of the disk device is larger than the threshold value B (step S304). When larger than the threshold value B, the capacity monitoring unit 130 sets the check flag of the target disk device in the error check flag 164 stored in the storage unit 160 to “FALSE” (step S306). If the free space is equal to or smaller than the threshold value B, the check flag of the target disk device in the error check flag 164 is set to “TRUE” (step S308).

次に、チェック周期設定部120は、上述したチェック周期の設定処理の第1の実施例または第2の実施例等を用いて、次のチェック周期を設定する(ステップS310)。次に、容量監視部130は、設定されたチェック周期に到達したか否かを判定する(ステップS312)。チェック周期に到達した場合、容量監視部130は、ステップS302の処理に戻り、ディスクの空き容量のチェックを行う。また、チェック周期に到達していない場合、容量監視部130は、クライアント300等からディスク装置の空き容量に対する監視終了要求を受け付けたか否かを判定する(ステップS314)。監視終了要求を受け付けていない場合、容量監視部130は、ステップS312の処理に戻る。また、監視終了要求を受け付けた場合、容量監視部130は、容量監視処理を終了する。なお、図10に示す処理は、データベース200におけるディスク装置ごとに行ってもよく、全てのディスク装置に対して一括して行ってもよい。また、図10に示す処理は、上述したディスク容量監視スレッドとして実行することができる。   Next, the check cycle setting unit 120 sets the next check cycle using the first embodiment or the second embodiment of the check cycle setting process described above (step S310). Next, the capacity monitoring unit 130 determines whether or not the set check cycle has been reached (step S312). When the check cycle is reached, the capacity monitoring unit 130 returns to the process of step S302 and checks the free capacity of the disk. If the check cycle has not been reached, the capacity monitoring unit 130 determines whether a monitoring end request for the free capacity of the disk device has been received from the client 300 or the like (step S314). When the monitoring end request has not been received, the capacity monitoring unit 130 returns to the process of step S312. If a monitoring end request is received, the capacity monitoring unit 130 ends the capacity monitoring process. The process shown in FIG. 10 may be performed for each disk device in the database 200 or may be performed for all the disk devices at once. Further, the process shown in FIG. 10 can be executed as the disk capacity monitoring thread described above.

次に、処理実行部140におけるSQL実行処理について、フローチャートを用いて説明する。図11は、SQL実行処理の一例を示すフローチャートである。なお、以下の説明では、SQL実行処理の一例として、データベース200にデータを書き込む処理について説明するが、データの読み出し処理等について同様の処理を行ってもよい。図11の例において、処理実行部140は、データの書き込み要求を受け付け(ステップS400)、記憶部160に記憶されたエラーチェックフラグ164から、対象のディスク装置のチェックフラグを参照し、そのチェックフラグが「TRUE」であるか否かを判定する(ステップS402)。エラーチェックフラグが「TRUE」である場合、処理実行部140は、OS(制御部150)等に対し、ディスク装置の空き容量の問い合わせを行う(ステップS404)。   Next, the SQL execution process in the process execution part 140 is demonstrated using a flowchart. FIG. 11 is a flowchart illustrating an example of the SQL execution process. In the following description, a process of writing data to the database 200 will be described as an example of the SQL execution process. However, a similar process may be performed for a data read process or the like. In the example of FIG. 11, the process execution unit 140 receives a data write request (step S400), refers to the check flag of the target disk device from the error check flag 164 stored in the storage unit 160, and checks the check flag. Is “TRUE” (step S402). When the error check flag is “TRUE”, the process execution unit 140 inquires of the free capacity of the disk device to the OS (control unit 150) or the like (step S404).

次に、処理実行部140は、空き容量が閾値Cより大きいか否かを判定する(ステップS406)。空き容量が閾値C以下の場合、処理実行部140は、ディスクフルエラーをクライアント300等に出力する(ステップS408)。また、対象のディスク装置のチェックフラグが「FALSE」である場合、または空き容量が閾値Cより大きい場合、OS(制御部150)等に対し、対象のディスク装置にデータの書き込みを要求し、データの書き込みを実行させる(ステップS410)。なお、図11に示す処理は、上述したSQL処理スレッドとして実行することができる。   Next, the process execution unit 140 determines whether or not the free space is larger than the threshold value C (step S406). When the free space is equal to or less than the threshold value C, the process execution unit 140 outputs a disk full error to the client 300 or the like (step S408). When the check flag of the target disk device is “FALSE” or when the free space is larger than the threshold C, the OS (control unit 150) or the like is requested to write data to the target disk device, and the data Is written (step S410). Note that the processing shown in FIG. 11 can be executed as the above-described SQL processing thread.

なお、上述した実施形態において、データベース管理装置100は、データベース200に含まれる各ディスク装置の空き容量に基づく監視を行ったが、これに限定されるものではなく、例えばディスク装置の使用容量(ディスク容量)または使用率等に基づく監視を行ってもよい。   In the above-described embodiment, the database management apparatus 100 performs monitoring based on the free capacity of each disk device included in the database 200. However, the present invention is not limited to this. For example, the used capacity of the disk device (disk Monitoring based on capacity) or usage rate may be performed.

以上説明した少なくとも一つの実施形態によれば、データを記憶するディスク装置の空き容量を監視する容量監視部130と、容量監視部130により得られるディスク装置の空き容量と、所定書き込み率で書き込まれた場合の将来のディスク装置の空き容量とに基づいて、ディスクフルエラーを出力する制御部150とを持つことにより、より適切なタイミングで空き容量に関する注意喚起を行うことができる。   According to at least one of the embodiments described above, the capacity monitoring unit 130 that monitors the free capacity of the disk device that stores data, the free capacity of the disk device obtained by the capacity monitoring unit 130, and the predetermined write rate are written. By having the control unit 150 that outputs a disk full error based on the future free space capacity of the disk device in this case, it is possible to alert the free space at a more appropriate timing.

また、少なくとも一つの実施形態によれば、クライアント300からの要求に基づいて、データを記憶するディスク装置に対するデータの書き込みまたは読み出しを含む処理を実行する処理実行部140と、処理実行部140によるデータの書き込みまたは読み出しを含む処理とは非同期でディスク装置の空き容量を確認する容量監視部130とを持つことにより、データの書き込みまたは読み出し等を行うSQL処理の実行ごとに、システムコールを呼び出して空き容量のチェックを行う必要がないため、SQL処理を高速化することができ、SQL処理に対するレスポンス時間を向上させることができる。したがって、例えば、データベース管理装置100に対してセンサ等を備えた多数のクライアント300から、大量のセンサデータの登録要求がある場合に、監視コストを軽減することができ、処理性能を向上させることができる。また、データベース管理装置100のレスポンスタイムを優先させて処理を行うことができる。また、より適切なタイミングで空き容量に関する注意喚起を行うことができる。   Further, according to at least one embodiment, based on a request from the client 300, a process execution unit 140 that executes a process including writing or reading of data with respect to a disk device that stores data, and data by the process execution unit 140 By having a capacity monitoring unit 130 that confirms the free capacity of the disk device asynchronously with processing including writing or reading data, a system call is called each time an SQL process for writing or reading data is executed. Since there is no need to check the capacity, the SQL process can be speeded up, and the response time for the SQL process can be improved. Therefore, for example, when there are requests for registering a large amount of sensor data from a large number of clients 300 equipped with sensors or the like for the database management apparatus 100, the monitoring cost can be reduced and the processing performance can be improved. it can. Further, processing can be performed with priority given to the response time of the database management apparatus 100. In addition, it is possible to call attention regarding the free space at a more appropriate timing.

また、少なくとも一つの実施形態によれば、データを記憶するディスク装置の空き容量と、容量に関する閾値とを比較した結果に基づいて、空き容量をチェックする周期を変動させ、変動させた周期で、ディスク装置の空き容量を取得する容量監視部130と、容量監視部130により得られるディスク装置の空き容量に基づいて、ディスクフルエラーを出力する制御部150とを持つことにより、例えば空き容量に余裕がある場合には、チェック周期を長くし、逆に空き容量が不足しそうな状況である場合には、チェック周期を短くすることができる。そのため、監視コストを軽減することができ、処理性能を向上させることができる。また、より適切なタイミングで空き容量に関する注意喚起を行うことができる。   In addition, according to at least one embodiment, based on the result of comparing the free capacity of the disk device that stores data and a threshold value related to the capacity, the period for checking the free capacity is changed, and at the changed period, By having a capacity monitoring unit 130 that acquires the free capacity of the disk device and a control unit 150 that outputs a disk full error based on the free capacity of the disk device obtained by the capacity monitoring unit 130, for example, there is a margin in the free capacity. If there is an error, the check cycle can be lengthened, and conversely, if the free space is likely to be insufficient, the check cycle can be shortened. Therefore, the monitoring cost can be reduced and the processing performance can be improved. In addition, it is possible to call attention regarding the free space at a more appropriate timing.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the equivalents thereof.

100…データベース管理装置、110…設定情報受付部(受付部)、120…チェック周期設定部(周期設定部)、130…容量監視部、140…処理実行部、150…制御部、160…記憶部、162…設定ファイル、164…エラーチェックフラグ、200…データベース、300…クライアント、400…ディスクベンダ、500…ディスク容量監視スレッド、502…OS、504…SQL処理スレッド DESCRIPTION OF SYMBOLS 100 ... Database management apparatus, 110 ... Setting information reception part (reception part), 120 ... Check period setting part (cycle setting part), 130 ... Capacity monitoring part, 140 ... Process execution part, 150 ... Control part, 160 ... Memory | storage part 162 ... Setting file, 164 ... Error check flag, 200 ... Database, 300 ... Client, 400 ... Disk vendor, 500 ... Disk capacity monitoring thread, 502 ... OS, 504 ... SQL processing thread

Claims (8)

データを記憶する記憶装置の空き容量を監視する容量監視部と、
前記容量監視部により得られる前記記憶装置の空き容量と、所定書き込み率で書き込まれた場合の将来の前記記憶装置の空き容量とに基づいて、前記空き容量に関する注意喚起情報を出力する制御部と、
前記記憶装置の空き容量に基づいて、前記容量監視部が前記空き容量を確認する周期を設定する周期設定部と、
を備え、
前記周期設定部は、
前記記憶装置の空き容量が第1の閾値より大きい場合に、前記記憶装置の空き容量と、前記第1の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とを用いて、前記空き容量を確認する周期を設定し、
前記空き容量が前記第1の閾値以下である場合において、前記空き容量が、前記第1の閾値よりも小さい第2の閾値よりも大きい場合に、前記記憶装置の空き容量と、前記第2の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とに基づく値を、所定の安全率に基づいて割り引くことにより、前記空き容量を確認する周期を設定する、
データベース管理装置。
A capacity monitoring unit for monitoring the free capacity of the storage device for storing data;
A control unit that outputs alert information relating to the free space based on the free space of the storage device obtained by the capacity monitoring unit and the free space of the storage device in the future when written at a predetermined write rate; ,
A cycle setting unit that sets a cycle in which the capacity monitoring unit checks the free capacity based on the free capacity of the storage device;
With
The period setting unit includes:
When the free space of the storage device is larger than a first threshold, the free space of the storage device, the first threshold, and the data capacity when written to the storage device at the predetermined write rate To set the period for checking the free space,
When the free space is equal to or less than the first threshold, and when the free space is larger than a second threshold smaller than the first threshold, the free space of the storage device and the second threshold Setting a period for checking the free capacity by discounting a value based on a threshold and a data capacity when written to the storage device at the predetermined write rate based on a predetermined safety rate;
Database management device.
前記所定書き込み率は、前記記憶装置に対して想定される最大書き込み率である、
請求項1に記載のデータベース管理装置。
The predetermined write rate is a maximum write rate assumed for the storage device.
The database management device according to claim 1.
クライアントからの要求に基づいて前記記憶装置に対するデータの書き込みまたは読み出しを含む処理を実行する処理実行部をさらに備え、
前記容量監視部は、前記処理実行部による前記データの書き込みまたは読み出しを含む処理とは非同期で前記空き容量を確認する、
請求項1または2に記載のデータベース管理装置。
A processing execution unit that executes processing including writing or reading of data to or from the storage device based on a request from a client;
The capacity monitoring unit confirms the free capacity asynchronously with processing including writing or reading of the data by the processing execution unit;
The database management apparatus according to claim 1 or 2.
前記容量監視部および前記処理実行部は、それぞれが非同期で動作するスレッドを起動して動作する、
請求項3に記載のデータベース管理装置。
The capacity monitoring unit and the process execution unit operate by starting a thread that operates asynchronously,
The database management device according to claim 3.
前記周期設定部は、
前記空き容量が、前記第2の閾値以下である場合に、前記記憶装置に対してデータを書き込む処理を実行するタイミングで、前記空き容量を確認するように設定する、
請求項1乃至4のうち、いずれか1項に記載のデータベース管理装置。
The period setting unit includes:
When the free space is equal to or less than the second threshold, set to check the free space at the timing of executing the process of writing data to the storage device,
The database management apparatus according to any one of claims 1 to 4.
操作者の入力操作を受け付ける受付部をさらに備え、
前記周期設定部は、前記受付部により受け付けられた一以上の閾値に基づいて、前記容量監視部が前記空き容量を確認する周期を設定する、
請求項1乃至5のうち、いずれか1項に記載のデータベース管理装置。
It further includes a reception unit for accepting an operator's input operation,
The cycle setting unit sets a cycle in which the capacity monitoring unit checks the free capacity based on one or more threshold values received by the receiving unit.
The database management device according to any one of claims 1 to 5.
データベース管理装置のコンピュータが、
データを記憶する記憶装置の空き容量を監視し、
前記記憶装置の空き容量に基づいて、前記空き容量を確認する周期を設定し、
前記記憶装置の空き容量と、所定書き込み率で書き込まれた場合の将来の前記記憶装置の空き容量とに基づいて、前記空き容量に関する注意喚起情報を出力し、
更に前記空き容量を確認する周期を設定する場合において、前記記憶装置の空き容量が第1の閾値より大きい場合に、前記記憶装置の空き容量と、前記第1の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とを用いて、前記空き容量を確認する周期を設定し、
前記空き容量が前記第1の閾値以下である場合において、前記空き容量が、前記第1の閾値よりも小さい第2の閾値よりも大きい場合に、前記記憶装置の空き容量と、前記第2の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とに基づく値を、所定の安全率に基づいて割り引くことにより、前記空き容量を確認する周期を設定する、
データベース管理方法。
The computer of the database management device
Monitor the free space of the storage device that stores data,
Based on the free capacity of the storage device, set a cycle for checking the free capacity,
Based on the free space of the storage device and the free space of the storage device in the future when written at a predetermined write rate, output alert information about the free space,
Further, in the case of setting a cycle for checking the free space, when the free space of the storage device is larger than a first threshold, the free space of the storage device, the first threshold, and the storage device Using the data capacity when written at the predetermined write rate, and setting a cycle for checking the free capacity,
When the free space is equal to or less than the first threshold, and when the free space is larger than a second threshold smaller than the first threshold, the free space of the storage device and the second threshold Setting a period for checking the free capacity by discounting a value based on a threshold and a data capacity when written to the storage device at the predetermined write rate based on a predetermined safety rate;
Database management method.
データベース管理装置のコンピュータに、
データを記憶する記憶装置の空き容量を監視させ、
前記記憶装置の空き容量に基づいて、前記空き容量を確認する周期を設定させ、
前記記憶装置の空き容量と、所定書き込み率で書き込まれた場合の将来の前記記憶装置の空き容量とに基づいて、前記空き容量に関する注意喚起情報を出力させ、
更に前記空き容量を確認する周期を設定させる場合において、前記記憶装置の空き容量が第1の閾値より大きい場合に、前記記憶装置の空き容量と、前記第1の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とを用いて、前記空き容量を確認する周期を設定させ、
前記空き容量が前記第1の閾値以下である場合において、前記空き容量が、前記第1の閾値よりも小さい第2の閾値よりも大きい場合に、前記記憶装置の空き容量と、前記第2の閾値と、前記記憶装置に対して前記所定書き込み率で書き込まれた場合のデータ容量とに基づく値を、所定の安全率に基づいて割り引くことにより、前記空き容量を確認する周期を設定させる、
データベース管理プログラム。
In the computer of the database management device,
Monitor the free space of the storage device that stores data,
Based on the free capacity of the storage device, to set a cycle for checking the free capacity,
Based on the free capacity of the storage device and the free capacity of the storage device in the future when written at a predetermined write rate, the alert information on the free capacity is output,
Further, in the case of setting a cycle for checking the free space, when the free space of the storage device is larger than a first threshold, the free space of the storage device, the first threshold, and the storage device Using the data capacity when written at the predetermined write rate, and setting a cycle for checking the free capacity,
When the free space is equal to or less than the first threshold, and when the free space is larger than a second threshold smaller than the first threshold, the free space of the storage device and the second threshold By setting a cycle for checking the free space by discounting a value based on a threshold and a data capacity when written to the storage device at the predetermined write rate based on a predetermined safety rate,
Database management program.
JP2017207287A 2017-10-26 2017-10-26 Database management apparatus, database management method, and database management program Active JP6293966B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017207287A JP6293966B2 (en) 2017-10-26 2017-10-26 Database management apparatus, database management method, and database management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017207287A JP6293966B2 (en) 2017-10-26 2017-10-26 Database management apparatus, database management method, and database management program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016126667 Division 2016-06-27

Publications (2)

Publication Number Publication Date
JP2018014144A JP2018014144A (en) 2018-01-25
JP6293966B2 true JP6293966B2 (en) 2018-03-14

Family

ID=61020423

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017207287A Active JP6293966B2 (en) 2017-10-26 2017-10-26 Database management apparatus, database management method, and database management program

Country Status (1)

Country Link
JP (1) JP6293966B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7452128B2 (en) 2020-03-16 2024-03-19 京セラドキュメントソリューションズ株式会社 Information processing device, information processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2900851B2 (en) * 1995-08-29 1999-06-02 日本電気株式会社 File usage output / monitoring device
JP2005004336A (en) * 2003-06-10 2005-01-06 Hitachi Ltd Resource monitoring method and device, and resource monitoring program
JP2008146536A (en) * 2006-12-13 2008-06-26 Hitachi Ltd Storage device, and data control method using the same
JP2008158906A (en) * 2006-12-25 2008-07-10 Nec Corp System, method and program for adjusting collection interval in resource monitoring
JP6340987B2 (en) * 2014-08-12 2018-06-13 富士通株式会社 Disk exhaustion prediction program, information processing apparatus, and disk exhaustion prediction method
WO2016067327A1 (en) * 2014-10-27 2016-05-06 株式会社日立製作所 Storage system

Also Published As

Publication number Publication date
JP2018014144A (en) 2018-01-25

Similar Documents

Publication Publication Date Title
US11394625B2 (en) Service level agreement based storage access
US9703949B2 (en) Time-based configuration profile toggling
KR102344386B1 (en) Multi-enrollments of a computing device into configuration sources
US11632315B1 (en) System and method for dynamic reporting based management
US20190173949A1 (en) Data processing system
US20150347612A1 (en) Information terminal and control method
US10430119B2 (en) Mechanism for multiple coexisting configurations support in virtual tape applications
CN113535721A (en) Data writing method and device
CN110020383B (en) Page data request processing method and device
CN110874298B (en) Request data storage method and terminal equipment
JP6293966B2 (en) Database management apparatus, database management method, and database management program
US10552233B2 (en) Application convergence method and apparatus
JP2016181019A (en) Order reception processing system and order reception processing method
CN110825425A (en) Configuration data management method and device, electronic equipment and storage medium
KR102150016B1 (en) Providing method, apparatus and computer-readable medium of auto scaling of cloud server
US10831731B2 (en) Method for storing and accessing data into an indexed key/value pair for offline access
US20150281868A1 (en) Distribution apparatus and distribution method
US20180309848A1 (en) Method and system for predictive loading of software resources
CN111488232B (en) Out-of-box solution level configuration and diagnostic logging and reporting systems and methods
WO2015066247A1 (en) Managing server membership
CN113138772B (en) Construction method and device of data processing platform, electronic equipment and storage medium
US9497253B2 (en) Authorization review system
KR101968501B1 (en) Data processing apparatus and data check method stored in a memory of the data processing apparatus
CN111522879A (en) Data distribution method based on cache and electronic equipment
JP2003271387A (en) Download method and download system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171026

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180214

R151 Written notification of patent or utility model registration

Ref document number: 6293966

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151