JP4176933B2 - RECORDING MEDIUM RECORDING EXTERNAL STORAGE DEVICE DRIVER PROGRAM AND COMPUTER HAVING EXTERNAL STORAGE DEVICE ACCESS FUNCTION - Google Patents
RECORDING MEDIUM RECORDING EXTERNAL STORAGE DEVICE DRIVER PROGRAM AND COMPUTER HAVING EXTERNAL STORAGE DEVICE ACCESS FUNCTION Download PDFInfo
- Publication number
- JP4176933B2 JP4176933B2 JP30939399A JP30939399A JP4176933B2 JP 4176933 B2 JP4176933 B2 JP 4176933B2 JP 30939399 A JP30939399 A JP 30939399A JP 30939399 A JP30939399 A JP 30939399A JP 4176933 B2 JP4176933 B2 JP 4176933B2
- Authority
- JP
- Japan
- Prior art keywords
- write
- storage device
- external storage
- read
- requests
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、磁気ディスク装置に代表される外部記憶装置へのアクセスが行われる計算機システムに係り、特に外部記憶装置を対象とするデータの読み出し/書き込みを高速に行うのに好適な外部記憶装置ドライバプログラムを記録した記録媒体、及び外部記憶装置アクセス機能を有する計算機に関する。
【0002】
【従来の技術】
従来から、磁気ディスク装置に代表される外部記憶装置が計算機(計算機本体)に接続され、当該計算機が利用者の要求に応じて外部記憶装置をアクセスしながら必要なサービスを提供する計算機システムが知られている。
【0003】
この種の計算機システムでは、(1)外部記憶装置に対し、複数の読み出し要求と書き込み要求が並列に発生し、(2)当該外部記憶装置を対象とする読み出し/書き込みの処理性能に関して、読み出しデータ量と書き込みデータ量の合計、または読み出しの実行回数と書き込みの実行回数との合計、またはその両方に上限のある場合が多い。
【0004】
このような計算機システムの1つに、外部記憶装置ドライバプログラムに従い、外部記憶装置に対する複数の書き込み要求をまとめて実行する手法を適用する計算機システムがある。この手法を適用する理由は、書き込み要求を1つずつ実行するよりも、複数の書き込み要求をまとめて実行した方が、書き込みの性能を上げることができることによる。
【0005】
このため、この種の従来の計算機システムでは、書き込み要求が決められた数または決められたデータ量だけ貯まるまで待ち、貯まった書き込み要求をまとめて1度に書き込みを行っていた。但し、複数の書き込み要求をまとめて実行できるのは、(1)書き込み要求が常に、前回書き込んだ箇所の次から行われ、つまりシーケンシャル書き込みであり、(2)1回の書き込みにかかる時間は、ある程度のサイズまではあまり変わらない場合である。
【0006】
なお、書き込み要求の並列度が小さいときは、書き込みが一定時間以上遅れることを避けるため、決められた数または量だけ貯まらなくても、一定の時間が経過した時点で書き込みを行うのが一般的である。
【0007】
【発明が解決しようとする課題】
上記したように従来の計算機システムでは、計算機から外部記憶装置に対する書き込みの性能を向上するために、外部記憶装置ドライバプログラムに従い、複数の書き込み要求をまとめて実行するようにしていた。しかし、その際に読み出し要求については何も考慮されていなかった。
【0008】
このため、従来の計算機システムでは、読み出し要求と書き込み要求が多数並列に発生した場合に、書き込み要求の処理はまとめ書きをすることで性能を向上させることが可能であったが、読み込み要求の処理の性能を上げることができず、外部記憶装置に対する書き込みと読み出しの処理性能の限界を超えてしまい、結果として計算機の提供するサービスの速度が低下するという問題が存在した。
【0009】
本発明は上記事情を考慮してなされたものでその目的は、読み出し要求と書き込み要求が並列に多数発生したときの読み出し要求の処理性能を向上させ、計算機の提供するサービスの速度低下を抑えることができる外部記憶装置ドライバプログラムを記録した記録媒体、及び外部記憶装置アクセス機能を有する計算機を提供することにある。
【0010】
本発明の他の目的は、ランダムな書き込みの場合にもまとめ書きが行える外部記憶装置ドライバプログラムを記録した記録媒体、及び外部記憶装置アクセス機能を有する計算機を提供することにある。
【0011】
【課題を解決するための手段】
本発明の記録媒体は、少なくとも、外部記憶装置への単位時間当たりの読み出し要求の数、または当該読み出し要求で指定される単位時間当たりの読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定ステップと、外部記憶装置への書き込み要求を記憶領域に一時的に保持しておき、上記パラメータ決定ステップにより決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった場合に、まとめて1つの書き込み要求として外部記憶装置へのアクセスを実行する一方、外部記憶装置への読み出し要求に対してはそのまま外部記憶装置へのアクセスを実行する外部記憶装置アクセス制御ステップとを、外部記憶装置へのアクセスを行う計算機に実行させるための外部記憶装置ドライバプログラムを記録していることを特徴とする。
【0012】
このような構成においては、少なくとも、外部記憶装置への単位時間当たりの読み出し要求の数、または当該読み出し要求で指定される単位時間当たりの読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量が決定され、この決定された数または書き込みデータ量分の書き込み要求が貯まった段階で、1つの書き込み要求にまとめられて外部記憶装置へのアクセスが実行されることから、外部記憶装置に対する書き込み/読み出しの並列度が両方共に高いときに、書き込みによって読み出しが待たされる、或いは書き込みに時間がかかることを防止し、外部記憶装置へのアクセスが空いているときに書き込みを行うことが可能となる。
【0013】
さて、書き込み要求を1つにまとめて外部記憶装置へのアクセスを実行した場合、外部記憶装置からの完了通知は、この1つにまとめた書き込み要求に対するものとなる。このため、元の書き込み要求(上記決定された数の書き込み要求)の要求元には、当該元の書き込み要求の各々に対する完了通知を返す必要がある。そのためには、1つの書き込み要求にまとめた際に、その要求の識別情報(ID)を、上記記憶領域に保持されている元の書き込み要求にそれぞれ対応させて、当該記憶領域に保持しておき、外部記憶装置から当該識別情報を持った完了通知が返された場合に、当該識別情報で上記記憶領域を検索するとよい。このようにすると、元の各書き込み要求を確実に検出して、当該元の各書き込み要求毎に対応する完了通知を作成して要求元に返すことが可能となる。
【0014】
さて、上記決定された数または書き込みデータ量分の書き込み要求を1つにまとめて効率的に外部記憶装置をアクセスするには、当該決定された数または書き込みデータ量分の書き込み要求の指定する書き込みがシーケンシャルアクセスとなる場合が最適である。このような場合、決定された数または書き込みデータ量分の書き込み要求を1つの新たな書き込み要求に変換するには、書き込み先として、当該決定された数または書き込みデータ量分の書き込み要求のうちの先頭の書き込み要求の指定する書き込み先を、データサイズとして、当該決定された数または書き込みデータ量分の書き込み要求の指定する各データサイズの合計値を用いるだけでよく、この新たな1つの書き込み要求を実行するだけで、対応する上記決定された数または書き込みデータ量分の書き込み要求の指定する書き込みを一括して処理できる。
【0015】
また本発明は、外部記憶装置への書き込み要求の指定する書き込みがシーケンシャルアクセスとならない場合、つまりランダムアクセスの場合にも、あたかもシーケンシャルアクセスであるかの如く取り扱えるように、外部記憶装置に必ずファイル終端位置からデータが書かれるデータファイルを置き、外部記憶装置に対する書き込み要求を受けて、上記データファイルの終端位置から指定データを書き込む新たな書き込み要求に変換すると共に、変換前の書き込み要求の指定する書き込み先と変換後の書き込み要求の指定する書き込み先との対応を示すインデックスファイルを用いて、当該インデックスファイルに、該当する対応関係を示す情報を設定して、上記変換後の書き込み要求を外部記憶装置への実際の書き込み要求であるとして扱うようにしたことをも特徴とする。
【0016】
このような構成において、記憶領域に一時的に記憶される書き込み要求の列は、上記データファイルの終端よりデータを書き込むことを要求する新たな書き込み要求に変換されたものであり、したがって変換前の書き込み要求ではランダムアクセスであったとしても、必ずシーケンシャルアクセスとなる。このため、上記決定された数の書き込み要求を1つにまとめて効率的に外部記憶装置をアクセスすることが可能となる。
【0017】
また本発明は、少なくとも上記単位時間当たりの読み出し要求の数または読み出しデータ量を所定の単調非減少関数に適用して上記1つにまとめる書き込み要求の数または書き込みデータ量を算出するようにしたことをも特徴とする。
【0018】
このような構成においては、外部記憶装置に対する読み出し要求の数または読み出しデータ量が多いほど、まとめる書き込み要求の数または書き込みデータ量は多くなることから、つまり書き込みの発生頻度が低下されることから、読み出し要求と書き込み要求が並列に多数発生したときの読み出し要求の処理性能を著しく向上させることが可能となる。ここで、書き込みの頻度をあまり下げすぎると、書き込みが速やかに終了しなくなる。このため、まとめる書き込み要求の数または書き込みデータ量には上限値を設け、外部記憶装置に対する読み出し要求の数または読み出しデータ量が所定値以上の範囲では、この上限値を用いるとよい。
【0019】
また本発明は、上記単調非減少関数が上記単位時間より大きな範囲で取得される読み出し要求の発生頻度と書き込み要求の発生頻度とから動的に設定される構成としたことをも特徴とする。
【0020】
このような構成においては、1つにまとめる書き込み要求の数または書き込みデータ量は、過去の読み出し要求の発生頻度と書き込み要求の発生頻度をも反映したものとなることから、読み出し要求の発生頻度と書き込み要求の発生頻度が一定でないシステムにおいても、読み出し/書き込みの発生状況に適した設定が可能となる。特に、書き込み要求の発生頻度に対する読み出し要求の発生頻度の比率を適用し、1つにまとめる書き込み要求の数または書き込みデータ量が当該比率に正比例するように上記関数が動的に設定されるようにするならば、外部記憶装置に対する読み出し要求の数または読み出しデータ量が所定値以上の範囲では、読み出しと書き込みの数またはデータ量の比率を常に一定にすることも可能となる。
【0021】
また本発明は、上記1つにまとめる書き込み要求の数または書き込みデータ量を算出するのに、単位時間当たりの読み出し要求の数または読み出しデータ量だけでなく、外部記憶装置への単位時間当たりの書き込み要求の数または当該書き込み要求で指定される単位時間当たりの書き込みデータ量も加味するようにしたことをも特徴とする。
【0022】
このような構成においては、書き込み要求の数または書き込みデータ量が少ないにも拘わらず、読み出し要求の数または読み出しデータ量が多いというだけで、1つにまとめる書き込み要求の数または書き込みデータ量が大きな値に決定されるのを防止でき、書き込みの発生頻度を、読み出しと書き込みが並列に同時に多数発生している状態を的確に反映した最適値となるように設定することが可能となる。
【0023】
なお、上記した外部記憶装置ドライバプログラムを記録した機械読み取り可能な記録媒体に係る本発明は、当該プログラムで実現される機能手段を備えた計算機に係る発明としても成立し、当該プログラムで適用される手順を持つ方法に係る発明としても成立する。
【0024】
【発明の実施の形態】
以下、本発明の実施の形態につき図面を参照して説明する。
【0025】
[第1の実施形態]
(全体構成)
図1は本発明の第1の実施形態に係る計算機システムの全体構成を示すブロック図である。
【0026】
図1の計算機システムは、計算機204と、磁気ディスク装置に代表される外部記憶装置203とが、バス205によって接続された構成を適用している。
【0027】
計算機204上では、ソフトウェアとして、アプリケーション(アプリケーションプログラム)202と、OS(オペレーティングシステム)201、及び本発明に直接関係するドライバ(外部記憶装置ドライバプログラム)100が動作している。
【0028】
計算機システムの利用者は、キーボード、マウス等の入力機器を介してアプリケーション202を利用することで、当該計算機システムの提供するサービスを受ける。アプリケーション202(を実行するCPU)は、利用者からの要求に応じて、OS201に対し、外部記憶装置203への書き込み要求301、または読み出し要求302を送る。
【0029】
OS201は、アプリケーション202からの書き込み要求301、または読み出し要求302を受け取ると、ドライバ100に対し、対応する書き込み要求303、または読み出し要求304を送る。
【0030】
ドライバ100は、OS201からの書き込み要求303、または読み出し要求304を受け取ると、外部記憶装置203側(具体的には、主記憶と外部記憶装置203とのデータ転送を司る図示せぬチャネル装置)に、対応する書き込み要求305、または読み出し要求306を送る。
【0031】
書き込み要求301,303,305は、図2(a)に示すように、各要求固有のID番号(識別番号)、書き込み先(どこへ書き込むか)の情報と、書き込み元(どこにあるデータを書き込むか)の情報、書き込むデータのサイズの情報を含んでいる。
【0032】
同様に、読み出し要求302,304,306は、図2(b)に示すように、各要求固有のID番号、読み出し元(どこのデータを読み出すか)の情報、読み出し先(どこに読み出すか)の情報、読み出すサイズの情報を含んでいる。
【0033】
外部記憶装置203は書き込み要求305、または読み出し要求306の実行が終了すると、その旨を示す完了通知307をドライバ100に送る。
【0034】
ドライバ100は外部記憶装置203からの完了通知307を受け取ると、対応するドライバ100での完了通知308をOS201に送る。OS201は、完了通知308を受け取ると、対応するOS201での完了通知309をアプリケーション202に送る。アプリケーション202はOS201から完了通知309を受け取ることで、書き込み要求301、または読み出し要求302に対する外部記憶装置203での書き込み、または読み出しが終了したことを知ることができる。
【0035】
上記完了通知307,308,309は、図2(c)に示すように、対応する要求のID番号を含んでいる。
【0036】
(ドライバ100の構成)
次に、ドライバ100内部の構成について、図1を参照しながら説明する。
まずドライバ100は、OS201からの要求(書き込み要求303、読み出し要求304)を受け付け、処理の終了した要求に対して結果を返すI/O(入出力)処理部110と、次に述べる外部記憶装置アクセス制御部130で利用するパラメータを設定するためのパラメータ決定部120と、OS201からの要求に対応した書き込み要求305または読み出し要求306を外部記憶装置203側に送り、外部記憶装置203側からの完了通知307を受け取る外部記憶装置アクセス制御部130との3つの機能手段から構成される。ここで、パラメータ決定部120から外部記憶装置アクセス制御部130には、書き込みの制御に使われる後述するパラメータ121が送られる。
【0037】
(ドライバ100内のI/O処理部110の機能)
次に、I/O処理部110の機能について説明する。
アプリケーション202からの読み出し要求301、書き込み要求302は、OS201を通じて、書き込み要求303、読み出し要求304として、ドライバ100内のI/O処理部110に送られる。
【0038】
I/O処理部110は、OS201から読み出し要求304を受け取った場合、その受け取った読み出し要求304を外部記憶装置アクセス制御部130に送ると共にパラメータ決定部120にも送る。またI/O処理部110は、書き込み要求303を受け取った場合には、当該書き込み要求303を外部記憶装置アクセス制御部130に送る。
【0039】
(ドライバ100内のパラメータ決定部120の機能)
次に、パラメータ決定部120の機能について、図3に示す当該パラメータ決定部120のブロック構成図を参照して説明する。
【0040】
パラメータ決定部120は、過去の一定の時間(最も最近の単位時間)にI/O処理部110から受け取った読み出し要求304の数を記憶する過去データ記憶部124と、当該過去データ記憶部124の記憶情報、即ち読み出し要求の数125をもとに、書き込み要求を貯める数を示すパラメータ121を決定するパラメータ計算部126とを備えている。パラメータ計算部126で決定されたパラメータ121は外部記憶装置アクセス制御部130に送られる。
【0041】
過去データ記憶部124は、過去の一定の時間(最も最近の単位時間)に受け取った書き込み要求303の数を記憶するため、1つのカウンタ122と、複数、例えば5つの記憶領域123-1〜123-5を使って、次のような処理を行う。例として、5秒単位で、その5秒の単位時間内に受け取った要求の数を記憶する場合を挙げる。
【0042】
まず、1秒間に受け取った読み出し要求304の数をカウンタ122でカウントし、記憶領域123-1に記憶する。次の1秒間に受け取った読み出し要求304の数をカウントし、記憶領域123-2に記憶する。これを繰り返し、記憶領域123-5まで記憶したら、次は記憶領域123-1に記憶する。過去5秒間の読み出し要求304の数を求めるには、記憶領域123-1〜123-5までに記憶されている数を合計する。同様の方法で、過去5秒間の読み出し要求304で要求されたデータのサイズも、1秒単位で記憶領域123-1〜123-5に記憶することが可能である。
【0043】
パラメータ計算部126は、過去データ記憶部124から、最も最近の単位時間の読み出し要求の数125を受け取って、次のような処理を行う。
【0044】
まず、書き込み要求を貯める数をyとし、単位時間に受け取った読み出し要求の数をxとすると、yとxの関係は、f(x)という関数を使って、
y=f(x) ……(1)
と表すことができる。
【0045】
ここでは、関数f(x)として、
(1)xが大きいときには大きく、小さいときには小さくなり
(2)ある程度以上には大きくならない
ような関数を適用する。
【0046】
さて、上記(1)の条件を満たす関数f(x)を適用する理由は、次の通りである。
(a)読み出しの並列度が高い場合(xが大きい場合に相当)は、y=f(x)の値が大きくなって、つまり書き込み要求を貯める数が大きくなって、書き込みの頻度を下げることができるため、書き込み中に読み出し処理が待たされるのを避けることができる。
(b)逆に、読み出しの並列度が低い場合(xが小さい場合に相当)には、y=f(x)の値が小さくなって、つまり書き込み要求を貯める数が小さくなって、書き込みの頻度を上げることができ、書き込みのレスポンスを向上させることができる。
【0047】
次に、上記(2)の条件を満たす関数f(x)を適用する理由は、読み出しの並列度が高いからといって、書き込みの頻度をあまり下げすぎると、書き込みが速やかに終了しないため、アプリケーション202が書き込み終了を待つことになり、逆に性能が上がらなくなってしまう不具合を防止するためである。
【0048】
本実施形態では、上記(1)と(2)の2つの条件を満たす関数f(x)として、例えば図4に示すような関数f(x)、即ち
のように表される関数f(x)を定めている。ここで、kはシステムによって異なる定数である。
【0049】
このように、本実施形態で適用される関数f(x)は、0≦x<Aの範囲ではxに比例して増加し、つまり単調増加し、x≧Aの範囲では一定値kAをとる、一種の単調非減少関数である。
【0050】
パラメータ計算部126は、過去データ記憶部124から、最も最近の単位時間(例えば5秒間)の読み出し要求の数(125)を受け取ると、それをxとして、上記(2)式に従う演算を行うことで、書き込み要求を貯める数yを算出し、それをパラメータ121として外部記憶装置アクセス制御部130に送る。パラメータ計算部126は、この動作を、上記単位時間間隔(例えば5秒を単位時間とする時間間隔)で繰り返す。
【0051】
以上の動作を具体例で説明する。ここでは、x1を過去5秒間に受け取った読み出し要求の数、y1を書き込み要求をためる数とする。
また、本計算機システムでは、過去5秒間に100個以上読み出し要求を受け取った場合に、書き込み要求を10個まとめて書き込むことにする。このとき、Aは100、kは1/10となる。
【0052】
つまり、x1,y1の関係は、
と表される。
【0053】
(ドライバ100内の外部記憶装置アクセス制御部130の機能)
次に、外部記憶装置アクセス制御部130の機能について、図5に示す当該外部記憶装置アクセス制御部130のブロック構成図を参照して説明する。
外部記憶装置アクセス制御部130は、I/O処理部110から受け取った書き込み要求303を含む情報を記憶するための記憶領域131と、書き込み要求303を結合して新たな書き込み要求305を生成すると共に、当該書き込み要求305に対する外部記憶装置203側からの完了通知307を、結合した書き込み要求303数分の完了通知308に分解する要求変換部132とを備えている。ここでは、書き込み要求303の指定する書き込み先は常に、先行する書き込み要求303の指定する(書き込み先とデータサイズとで決まる)書き込み先領域の次の位置であるものとする。つまり、シーケンシャル書き込みが行われるものとする。
【0054】
要求変換部132は、タイムアウトを検出するためのタイマ133を内蔵する。このタイマ133は、セットされると時間カウントを行って、一定時間後に時間切れ(タイムアウト)を通知する機能を有する。また、タイマ133は、リセットされた状態では時間カウントを行わず、したがっていつまでも時間切れにならない。
【0055】
記憶領域131は、書き込み要求記憶部134とID記憶部135との組の集合である。書き込み要求記憶部134には書き込み要求303が記憶される。また、ID記憶部135には、当該ID記憶部135と組をなす書き込み要求記憶部134に記憶されている書き込み要求303に対応して生成される書き込み要求305中のID(図2(a)参照)が記憶される。
【0056】
一方、I/O処理部110から読み出し要求304を受け取った場合、外部記憶装置アクセス制御部130は当該読み出し要求304を、そのまま読み出し要求306として外部記憶装置203側に送る。同様に外部記憶装置アクセス制御部130は、外部記憶装置203からの読み出し要求306に対する完了通知307、つまり読み出し終了通知は、そのまま完了通知308としてI/O処理部110に送る。
【0057】
次に、外部記憶装置アクセス制御部130での書き込み要求制御処理について、図6のフローチャートを参照して説明する。
まず外部記憶装置アクセス制御部130は、次の3つのイベント、即ち
(1)書き込み要求303がI/O処理部110から送られてきたとき
(2)書き込み要求303を貯める数(閾値)を表すパラメータ121がパラメータ決定部120から送られてきたとき
(3)タイマ133から時間切れ(タイムアウト)が通知されたとき
のいずれかが発生するまでは待ち状態になる(ステップS1)。
【0058】
ここで、上記(1)のイベントが発生した場合、つまり書き込み要求303がI/O処理部110から送られてきたときの動作を説明する。
まず外部記憶装置アクセス制御部130は、I/O処理部110から受け取った書き込み要求303を、ポインタの指す記憶領域131内の書き込み要求記憶部134に設定する(ステップS2)。このとき記憶領域131が空であるならば、ポインタは例えば先頭の書き込み要求記憶部134を指すものとする。なお、書き込み要求記憶部134と組をなすID記憶部135へのID設定は行われない。
【0059】
次に外部記憶装置アクセス制御部130は、記憶領域131が空の状態での書き込み要求303の設定であるか、つまり、まとめ書きの対象となる初めての書き込み要求303であるか否かをチェックし(ステップS3)、そうであればタイマ133をセットする(ステップS4)。
【0060】
外部記憶装置アクセス制御部130は、初めての書き込み要求303でなければそのまま、初めての書き込み要求303であればステップS4の後に、書き込みを行うか否かの条件の確認を行う(ステップS5)。この条件は、貯まっている書き込み要求の数が、パラメータ決定部120からのパラメータ121で表される書き込み要求を貯める数以上となったときである。
外部記憶装置アクセス制御部130は、上記条件を満たさないときは、書き込みを行わず、ステップS1のイベント待ち状態に戻る。
【0061】
一方、上記条件を満たしたときは、外部記憶装置アクセス制御部130は要求変換部132により、それまでに記憶領域131に貯まっていた書き込み要求303のうち、その先頭(つまり最も以前に受け取った書き込み要求303)から上記パラメータ121で表される数の連続する書き込み要求303をまとめて1つの書き込み要求305に変換する(ステップS6)。記憶領域131に書き込み要求303として5つの書き込み要求A〜Eが貯まったことで、上記条件1または条件2を満たしたものとすると、記憶領域131の内容と、書き込み要求305は、図7のようになる。
【0062】
外部記憶装置アクセス制御部130は上記ステップS6を実行すると、当該ステップS6で変換された書き込み要求305のIDを、元の全ての書き込み要求303が記憶されている書き込み要求記憶部134と組をなすID記憶部135に、図7に示すように書き込む(ステップS7)。次に外部記憶装置アクセス制御部130は、外部記憶装置203側に書き込み要求305を送って書き込みを行わせると共にタイマ133をリセットする(ステップS8,S9)。
【0063】
続いて外部記憶装置アクセス制御部130は、書き込み要求305で要求した書き込みが終了するまで、つまり書き込み要求305に対する完了通知307が外部記憶装置203から返されるまで待つ(ステップS10)。書き込み要求305に対する完了通知307が返されたか否かは、書き込み要求305と同一のIDがセットされた完了通知307が返されたか否かにより判定できる。
【0064】
このような状態で、外部記憶装置203から外部記憶装置アクセス制御部130に書き込み要求305に対する完了通知307が返されると、外部記憶装置アクセス制御部130は、完了通知307から元の全ての書き込み要求303に対する完了通知308を作成し、I/O処理部110に送る(ステップS11)。この完了通知308の作成方法について、図8を参照して説明する。
【0065】
まず外部記憶装置アクセス制御部130は、外部記憶装置203から書き込み要求305に対する完了通知307が送られた場合、当該完了通知307中のID(ここでは、X)により、このID(=X)が設定されている記憶領域131内のID記憶部135を全て探し、当該ID記憶部135と組をなす書き込み要求記憶部134から対応する書き込み要求303(ここでは、A〜Eの各書き込み要求303)を取り出す。そして外部記憶装置アクセス制御部130は、取り出した全ての書き込み要求303(A〜E)について、それぞれ当該書き込み要求303と同一IDが設定された対応する完了通知308を作成する。
【0066】
このようにして、記憶領域131に貯まっている、完了通知307に対応した各書き込み要求303について、対応する完了通知308がそれぞれ作成されて、外部記憶装置アクセス制御部130からI/O処理部110に送られる。
【0067】
次に、上記(2)のイベントが発生した場合、つまり書き込み要求303を貯める数(閾値)を表すパラメータ121がパラメータ決定部120から送られてきたときの動作を説明する。
この場合、外部記憶装置アクセス制御部130は、そのまま上記ステップS5を実行する。即ち外部記憶装置アクセス制御部130は、上記(1)のイベントが発生してステップS5に進んだ場合と同様にして、書き込みを行うか否かの条件の確認を行う。以降の動作も上記(1)のイベントが発生してステップS5を実行した場合と同様である。つまり、条件を満たさなければステップS1に戻り、条件を満たすならばステップS6〜S11を行った後にステップS1に戻る。
【0068】
次に、上記(3)のイベントが発生した場合、つまりタイマ133から時間切れが通知されたときの動作を説明する。
この場合、外部記憶装置アクセス制御部130は、そのままステップS6以降の処理を行う。即ち外部記憶装置アクセス制御部130は、上記(1)のイベントが発生して、ステップS5で書き込みを行う条件を満たしていることが確認できた場合と同様に、ステップS6〜S11を実行する。
【0069】
以上、本発明の第1の実施形態について説明した。
この第1の実施形態においては、アプリケーション202の、外部記憶装置203に対する書き込み・読み出しの並列度が両方共に高いときに、書き込みによって読み出しが待たされる、或いは書き込みに時間がかかることを避け、外部記憶装置203へのアクセスが空いているときに書き込みを行うことができる。
【0070】
この理由は、読み出しの並列度が高いときに、上記(2)式中のf(x)=kxに従って書き込みを貯める量を増やすことにより、書き込みの頻度を下げることで、書き込みと読み出し合計での外部記憶装置203への負荷を均一化することができるためである。
【0071】
例えば、(2)式でk=1/10,A=100の場合、つまり(3)式の関数を適用した場合、単位時間内の読み出し要求304の数が10,50,100,1000のように変化すると、書き込み要求を貯める数はそれぞれ1,5,10,10のように変化する。つまり書き込み要求を貯めておく閾値は、単位時間内の読み出し要求数が多いときは高く、少ないときは低く設定される。また、読み出し要求数が一定数(100)を超えると、一定数のときの閾値に固定される。
【0072】
ここで、上記負荷の均一化について図9のグラフを参照して説明する。
図9において、左側の縦軸901は書き込み要求の数が0の位置を示し、右方向に書き込み要求の数を示す。一方、右側の縦軸902は読み出し要求の数が0の位置を示し、左方向に読み出し要求の数を示す。また、軸901,902に沿う方向は、時間方向を示す。更に、グラフパターン903は書き込み要求数の時間変化を、グラフパターン904は読み出し要求数の時間変化を示す。ここでは、外部記憶装置203において書き込み要求と読み出し要求を同時に処理できる限界は、軸901と軸902との間隔で示されるものとする。
【0073】
図9のグラフにおいて、従来の方法では、グラフパターン903及び904が重なる部分で外部記憶装置203の同時処理の限界を超え、読み出し、書き込みのどちらかが待たされていた。
【0074】
しか本実施形態においては、外部記憶装置アクセス制御部130にて書き込み要求を貯めて、その貯めておいた書き込み要求をまとめて1つの新たな書き込み要求に変換して外部記憶装置203側に送るようにし、その際に読み出し要求が増えるにつれ外部記憶装置203側への書き込み要求が減るようにしているため、外部記憶装置203側に送られる書き込み要求の数はグラフパターン905で示されるようになり、読み出し要求は待たされずに処理される。
【0075】
グラフパターン905では、元のグラフパターン903と比べて書き込み要求の処理できる量が減っているように見える。しかし、このような箇所では、多くの書き込み要求がまとめて一度に処理されており、最大の効率で書き込みを行うことができる。
【0076】
このように本実施形態においては、書き込み要求と読み出し要求とが大量に発生したとき、
(1)読み出し要求が待たされずに処理される
(2)書き込み要求が効率的に処理される
ことを同時に可能にしている。
【0077】
また本実施形態においては、書き込み要求と読み出し要求とが少ないときには、書き込み要求を貯めずに直ちに処理するため、書き込み要求に対するレスポンスを上げることができる。
【0078】
[第2の実施形態]
前記第1の実施形態では、外部記憶装置203に対する書き込みがシーケンシャル書き込みである場合を前提として説明した。しかし、外部記憶装置203に対する書き込みには、ランダムアクセスの場合もある。
【0079】
そこで、ランダムアクセスとなる一連の書き込み要求(303)に対して、所定の条件を満たした場合に、前記第1の実施形態と同様にまとめて書き込むことができるようにした本発明の第2の実施形態について説明する。
【0080】
まず、図10において符号10で示すように、一連の書き込み要求303(読み出し要求304)の指定する外部記憶装置203内の書き込み先(読み出し元)が、アドレス(2,1)、アドレス(1,2)、アドレス(3,3)…のように、ランダムとなる利用方法があるとする。ここでは、外部記憶装置203の領域を便宜的に2次元的に表している。本実施形態では、このようなランダムな読み出し/書き込みを、図10中のインデックスファイル11と外部記憶装置203に置かれるデータファイル12とを利用して、以下に述べる新たなデータの読み出し/書き込みに変換するようにしている。
【0081】
「データAをアドレス(2,1)に書く」という処理は、「データファイル12の終端位置(m)からAを書く」という処理と、「インデックスファイル11の(2,1)の位置にデータファイル12中のAの位置(m)の情報を書く」という処理の2つの処理に分けることができる。同様に、「アドレス(2,1)からデータAを読み出す」という処理は、「インデックスファイル11の(2,1)の位置からデータファイル12中のAの位置(m)の情報を読み出す」という処理と、「データファイル12の位置(m)のデータAを読み出す」という処理の2つの処理に分けることができる。
【0082】
ここで、インデックスファイル11は大容量を必要としない。このためインデックスファイル11はメモリに常駐させることができ、高速アクセスが可能となる。つまり、インデックスファイル11を利用することによる、外部記憶装置アクセス速度への影響は無視できる。また、データファイル12に対する書き込みでは、データは必ず当該データファイル12の最後に追加されていくので、シーケンシャル書き込みとなり、前記第1の実施形態で前提とした条件に合致する。
【0083】
図11に、上記したランダムな読み出し/書き込みをシーケンシャルな読み出し/書き込みに変換する手法を適用する、本発明の第2の実施形態に係る計算機システムの全体構成を示す。なお、図1と同一部分には同一符号を付してある。
【0084】
この図11の構成の計算機システムの特徴は、ドライバ100内の、OS201とのインタフェース部分に、更に具体的に述べるならばOS201とI/O処理部110との間に、データ変換部140を追加し、OS201からの書き込み要求303、読み出し要求304を、図10中のデータファイル12に対する書き込み要求310、読み出し要求311に変換する点にある。
【0085】
そのため、データ変換部140には、書き込み要求303に対しては、当該要求303の指定する書き込み先(i,j)に一致する図10中のインデックスファイル11の位置(i,j)に、データファイル12の終端位置の情報を書き込む機能と、データファイル12の終端位置から当該書き込み要求303で指定されたデータを書き込むための新たな書き込み要求310に変換する機能とが設けられる。またデータ変換部140には、読み出し要求304に対しては、当該要求303の指定する読み出し元(i,j)に一致する図10中のインデックスファイル11の位置(i,j)から、データファイル12中の対応する位置の情報を読み出す機能と、インデックスファイル11から読み出した位置情報の示すデータファイル12の位置から当該読み出し要求304で指定されたサイズのデータを読み出すための新たな読み出し要求311に変換する機能とが設けられている。
【0086】
したがって、I/O処理部110には、前記第1の実施形態における書き込み要求303、読み出し要求304に代えて、データ変換部140から書き込み要求310、読み出し要求311が送られ、I/O処理部110からパラメータ決定部120には読み出し要求311が、外部記憶装置アクセス制御部130には書き込み要求310、読み出し要求311が送られる。但し、これら各部110,120,130の動作は前記第1の実施形態と同様であり、必要ならば書き込み要求303を書き込み要求310に、読み出し要求304を読み出し要求311に読み替えられたい。
【0087】
また本実施形態では、外部記憶装置アクセス制御部130から外部記憶装置203側に送られた書き込み要求305または読み出し要求306に対し当該外部記憶装置203から完了通知307が返された場合、外部記憶装置アクセス制御部130からI/O処理部110にはドライバ100内部での完了通知312が送られる。この完了通知312はI/O処理部110からデータ変換部140に渡される。するとデータ変換部140は当該完了通知312、つまりデータファイル12を対象とする書き込み要求305に対するドライバ100での完了通知312を、OS201からの書き込み要求303に対する完了通知308に変換してOS201に渡す。
【0088】
以上に述べたように、OS201からの書き込み要求303、読み出し要求304を、図10中のデータファイル12に対する書き込み要求310、読み出し要求311に変換するデータ変換部140をドライバ100内に追加することで、シーケンシャルな書き込みでない場合にも、持つとも最近の単位時間内の読み出し要求304の数に応じて決まる書き込み要求数をまとめた書き込みを行うことができる。つまりデータの形式によらず、読み出し要求304の数に応じたまとめ書きを行うことができる。
【0089】
なお、本実施形態では、外部記憶装置203上のデータの更新のための書き込み要求であっても、更新が行われるのはインデックスファイル11上のデータの書き込み先を示す情報のみであり、データはデータファイル12の最後に追加される。これについて例を挙げて説明する。
【0090】
今、先に述べたデータAをデータA′に更新するために、「データA′をアドレス(2,1)に書く」ことを指定する書き込み要求303を処理するものとする。このとき、データファイル12の終端位置がnであるものとする。すると、「データA′をアドレス(2,1)に書く」処理は、「データファイル12の終端位置(n)からA′を書く」という処理と、「インデックスファイル11の(2,1)の位置にデータファイル12中のA′の位置(n)の情報を書く」処理に分けられる。ここで、インデックスファイル11の(2,1)の位置には、データAが書かれているデータファイル12の位置mの情報が既に書かれている。したがってインデックスファイル11上では、このmがnに更新されることになる。
【0091】
一方、データファイル12上では、データA′が、位置mから(旧データAに上書きして)書き込まれるのではなく、当該データファイル12の終端位置nから書き込まれる。このため、位置mから書かれている旧データAは物理的には更新されず保存される。したがってデータファイル12上では、時間経過と共に、更新前の旧データが増加して、外部記憶装置203の領域を有効に利用することが困難となる。そこで、インデックスファイル11に登録されている位置情報で指定されるデータファイル12上のデータを、適宜新たにデータファイル12上に再配置して、旧データを削除するとよい。
【0092】
[第3の実施形態]
次に本発明の第3の実施形態について、図12に示す計算機システムのブロック構成図を参照して説明する。なお、図1と同一部分には同一符号を付してある。
【0093】
この本実施形態の特徴は、前記第1及び第2の実施形態では、パラメータ決定部120でのパラメータ計算に用いる関数f(x)が、システムに固定のものであることを前提としているのに対し、所定時間当たりの読み出し要求304と書き込み要求303発生頻度に基づいて動的に変更される点にある。そのために、図12の構成の計算機システムでは、図1中のI/O処理部110、パラメータ決定部120に代えて、以下に述べるI/O処理部110′、パラメータ決定部120′を用いている点にある。
【0094】
まず本実施形態では、前記単位時間より大きな単位の所定時間、例えば1時間当たりの読み出し要求304と書き込み要求303の発生頻度をパラメータ決定部120′にて調べるようにしている。このため、I/O処理部110′は、OS201から書き込み要求303を受け取った場合、当該書き込み要求303を外部記憶装置アクセス制御部130の他にパラメータ決定部120′にも送るようにしている。つまり、I/O処理部110′からパラメータ決定部120′には、読み出し要求304の他に書き込み要求303も送られる。パラメータ決定部120′では、1時間当たりの読み出し要求304と書き込み要求303の発生頻度を取得する。これは、前記第1の実施形態において単位時間(5秒)毎の読み出し要求304の数を図2中のパラメータ決定部120の過去データ記憶部124にてカウントするのと同様の手法で行える。
【0095】
今、読み出し要求と書き込み要求の発生頻度をそれぞれa,bであるとすると、本実施形態では、書き込み要求を貯める数yを表す関数f(x)として、
のよう決定される。ここで、kがシステムによって異なる定数である点は、前記(2),(3)式と同様である。
【0096】
したがって、aがa1,a2,a3と変化し、bがb1,b2,b3と変化する場合には、上記(4)式で示される関数f(x)は、図13のように動的に変化する(図の例は、a1/b1>a2/b2>a3/b3の場合)。
【0097】
この例では、読み出し要求が少ないときは、まとめて書き込む数は少ないが、読み出し要求が大量に発生し、外部記憶装置203へのアクセスが混雑しているときには、書き込み要求はb/aずつまとめられるので、外部記憶装置203への書き込み要求と読み出し要求の数をほぼ同数にすることができる。
【0098】
これについて、具体例で説明する。
今、図12のシステムで、1時間に読み出しが(a=)200回、書き込みが(b=)1000回起こっているとする。このとき、x1を最近の5秒間に受け取った読み出し要求の数、y1を書き込み要求を貯める数とする。
【0099】
また、図12のシステムでは、5秒間に100個以上読み出し要求を受け取った場合には、b/a個まとめて書き込むことにする。
このとき、b=1000,a=200,A=100,k=1/100となり、y1とx1との関係は、上記(4)式から、
と表される。
【0100】
上記(5)式から明らかなように、この例では、読み出し要求数が十分に多いとき(5秒間に100個以上の場合)、書き込み要求は5個ずつまとめられるので、書き込みの発生頻度は等価的に、b/5=1000/5=200となって、読み出しの発生頻度a(=200)に一致し、読み出しと書き込みの比率を等しくすることができる。
【0101】
もし、動作の途中で、例えばb=2000,a=200に変わったとすると、kは1/100、Aは100のままで、
のように変更される。
【0102】
この場合も、読み出し要求数が十分に多いとき(5秒間に100個以上の場合)、書き込み要求は10個ずつまとめられるので、書き込みの発生頻度は等価的に、b/10=2000/5=200となって、読み出しの発生頻度a(=200)に一致し、読み出しと書き込みの比率を等しくすることができる。
【0103】
このようにして、動作の途中で読み出し/書き込みの頻度が変わるような場合でも、読み出し要求が大量に発生し、外部記憶装置203へのアクセスが混雑しているときに、書き込み要求をまとめる比率を調整することにより、読み出し/書き込みの比率が変わらないようにすることができる。つまり、読み出し/書き込みの発生パターンが一定でないシステムにおいても、読み出し/書き込みの状況に最適な設定を行うことができる。
【0104】
[第4の実施形態]
前記第1乃至第3の実施形態では、最近の単位時間の読み出し要求の数をxとして、関数f(x)に基づき、パラメータ決定部120(または120′)にて書き込み要求を貯める数y=f(x)を決定する方式を適用する場合について説明した。しかし、読み出し要求の数に比べて書き込み要求の数が少ない場合に、上記方式を適用すると、書き込みの実行が長時間待たされる虞がある。
【0105】
そこで、最近の単位時間の読み出し要求の数と書き込み要求の数との合計値をxとして、関数f(x)に基づき書き込み要求を貯める数y=f(x)を決定することで、読み出し要求の数に比べて書き込み要求の数が少ない場合に、書き込みの実行が長時間待たされるのを防止するようにした本発明の第2の実施形態について、便宜的に図12に示す計算機システムのブロック構成図を参照して説明する。
【0106】
本実施形態の特徴は、OS201からI/O処理部110′に書き込み要求303が送られた場合、前記第3の実施形態と同様に、当該書き込み要求303がI/O処理部110′から外部記憶装置アクセス制御部130だけでなく、パラメータ決定部120′にも送られる点にある。
【0107】
また、本実施形態の特徴は、パラメータ決定部120′において単位時間毎に、その単位時間内に受け取った読み出し要求304と書き込み要求303の数の合計を上記xとして求めて、y=f(x)の計算により書き込み要求303を貯める数yを算出し、パラメータ121として外部記憶装置アクセス制御部130に通知する点にある。ここで、関数f(x)には、前記(2)式または(4)式の関数を用いればよい。
【0108】
このように本実施形態においては、書き込み要求を貯める数について、最近の単位時間に受け取った読み出し要求304と書き込み要求303の数の合計値に基づき、その合計値が多いほど多く(つまり外部記憶装置203に対する書き込み要求305の発生頻度を低く)、少ないほど少なくし(つまり外部記憶装置203に対する書き込み要求305の発生頻度を高くし)、所定値以上では一定数となるように制御している。これにより、外部記憶装置203に対する書き込み要求305の発生頻度が、読み出しと書き込みが並列に同時に多数発生している状態を的確に反映した最適値となるように設定される。
【0109】
以上は、過去データ記憶部124に記憶された、最も最近の単位時間にI/O処理部110から受け取った読み出し要求304の数(及び書き込み要求303の数)125(x)をもとに、書き込み要求を貯める数(y)を示すパラメータ121をパラメータ計算部126にて決定し、そのパラメータ121の示す数の書き込み要求を外部記憶装置アクセス制御部130で貯めて、1つの書き込み要求305に変換する場合について説明したが、これに限るものではない。例えば、単位時間にI/O処理部110から受け取った読み出し要求304で指定されている、読み込むべきデータのサイズ、つまり読み出しデータ量(及び書き込み要求303で指定されている書き込むべきデータのサイズ、つまり書き込みデータ量)の合計を記憶領域131に記憶して、そのデータのサイズ(x)をもとに、(1つにまとめる書き込み要求の数に対応した)1つにまとめて書き込むべきデータのサイズ(y)を示すパラメータ121をパラメータ計算部126にて決定し、そのパラメータ121の示すデータサイズを満たす数の書き込み要求(303)を外部記憶装置アクセス制御部130で貯めて、1つの書き込み要求305に変換するようにしてもよい。
【0110】
また、単位時間に受け取った読み出し要求304(及び書き込み要求303)の数と対応するデータサイズ(データ量)との両方を記憶領域131に記憶して、1つにまとめる書き込み要求の数と、1つにまとめて書き込むべきデータのサイズ(書き込みデータ量)とをそれぞれパラメータ計算部126で求めて、パラメータ121として用い、外部記憶装置アクセス制御部130では、1つにまとめる書き込み要求の数、またはデータサイズのうち、いずれか一方で条件を満足した場合に、当該条件を満足する数の書き込み要求(303)をまとめて1つの書き込み要求305に変換するようにしてもよい。
【0111】
【発明の効果】
以上詳述したように本発明によれば、少なくとも、単位時間当たりの読み出し要求の数または対応する読み出しデータ量に基づいて決まる数の書き込み要求が貯まった段階で、1つの書き込み要求にまとめて外部記憶装置へのアクセスを実行するようにしたので、読み出し要求と書き込み要求が並列に多数発生したときの読み出し要求の処理性能を向上させ、計算機の提供するサービスの速度低下を抑えることができる。
【0112】
また本発明によれば、ランダムな書き込みの場合にも、見かけ上シーケンシャルなアクセスとなるように書き込み要求を変換することにより、シーケンシャルアクセスの場合と同様のまとめ書きを行うことができ、ランダムなアクセスとなる読み出し要求と書き込み要求が並列に多数発生したときの読み出し要求の処理性能も向上させることができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係る計算機システムの全体構成を示すブロック図。
【図2】同実施形態で適用される、書き込み要求、読み出し要求、及び完了通知のフォーマット例を示す図。
【図3】図1中のパラメータ決定部120のブロック構成図。
【図4】同時実施形態で適用される、単位時間に受け取った読み出し要求の数から書き込み要求を貯める数を決定するための関数y=f(x)の一例を示す図。
【図5】図1中の外部記憶装置アクセス制御部130のブロック構成図。
【図6】同実施形態における外部記憶装置アクセス制御部130での書き込み要求制御処理の手順を示すフローチャート。
【図7】外部記憶装置アクセス制御部130にて、貯めておいた複数の書き込み要求303を1つの書き込み要求305に変換する場合の動作を説明するための図。
【図8】書き込み要求305に対する外部記憶装置203からの完了通知307に基づき、元の書き込み要求303に対する完了通知308を作成する動作を説明するための図。
【図9】同実施形態の効果を説明するための図。
【図10】前記第1の実施形態で適用した複数の書き込み要求をまとめて実行する手法を、シーケンシャル書き込みからランダム書き込みにまで適用可能とした本発明の第2の実施形態を説明するための図。
【図11】同第2の実施形態に係る計算機システムの全体構成を示すブロック図。
【図12】本発明の第3及び第4の実施形態に係る計算機システムの全体構成を示すブロック図。
【図13】同第3の実施形態で適用される、単位時間に受け取った読み出し要求の数、並びに書き込み要求と読み出し要求の発生頻度の比率から、書き込み要求を貯める数を決定するための関数y=f(x)の一例を示す図。
【符号の説明】
11…インデックスファイル
12…データファイル
100…ドライバ(外部記憶装置ドライバプログラム)
110,110′…I/O処理部
120,120′…パラメータ決定部
121…パラメータ
124…過去データ記憶部
126…パラメータ計算部
130…外部記憶装置アクセス制御部
132…要求変換部
133…タイマ
134…書き込み要求記憶部
135…ID記憶部
140…データ変換部
201…OS(オペレーティングシステム)
202…アプリケーション
203…外部記憶装置
301,303,305,310…書き込み要求
302,304,306,311…読み出し要求
307,308,309,312…完了通知[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a computer system in which an external storage device represented by a magnetic disk device is accessed, and in particular, an external storage device driver suitable for performing high-speed data reading / writing on an external storage device. The present invention relates to a recording medium storing a program and a computer having an external storage device access function.
[0002]
[Prior art]
Conventionally, a computer system in which an external storage device represented by a magnetic disk device is connected to a computer (computer main body) and the computer provides necessary services while accessing the external storage device in response to a user request is known. It has been.
[0003]
In this type of computer system, (1) a plurality of read requests and write requests are generated in parallel with respect to the external storage device, and (2) read data regarding read / write processing performance for the external storage device. In many cases, there is an upper limit on the total amount of data and the amount of write data, or the total number of read executions and the number of write executions, or both.
[0004]
As one of such computer systems, there is a computer system that applies a method of executing a plurality of write requests to an external storage device in accordance with an external storage device driver program. The reason for applying this method is that the performance of writing can be improved by executing a plurality of write requests together rather than executing the write requests one by one.
[0005]
For this reason, this type of conventional computer system waits until a predetermined number of write requests or a predetermined amount of data is stored, and writes the stored write requests all at once. However, it is possible to execute a plurality of write requests all together (1) The write request is always performed from the next written location, that is, sequential write, and (2) the time required for one write is: This is a case where it does not change so much up to a certain size.
[0006]
Note that when the parallelism of write requests is small, it is common to write when a certain time has elapsed, even if a predetermined number or amount is not stored, in order to avoid a delay of more than a certain time. It is.
[0007]
[Problems to be solved by the invention]
As described above, in the conventional computer system, a plurality of write requests are collectively executed in accordance with the external storage device driver program in order to improve the performance of writing from the computer to the external storage device. However, no consideration was given to the read request at that time.
[0008]
For this reason, in a conventional computer system, when a large number of read requests and write requests occurred in parallel, it was possible to improve the performance of write request processing by batch writing, but read request processing However, there is a problem in that the speed of the service provided by the computer decreases as a result of exceeding the limit of the processing performance of writing to and reading from the external storage device.
[0009]
The present invention has been made in consideration of the above circumstances, and its purpose is to improve the processing performance of read requests when a large number of read requests and write requests are generated in parallel, and to suppress the decrease in the speed of services provided by the computer. It is an object of the present invention to provide a recording medium on which an external storage device driver program capable of recording and a computer having an external storage device access function are provided.
[0010]
Another object of the present invention is to provide a recording medium that records an external storage device driver program that can perform batch writing even in random writing, and a computer having an external storage device access function.
[0011]
[Means for Solving the Problems]
The recording medium according to the present invention includes at least the number of read requests per unit time to the external storage device or the number of write requests to be combined based on the amount of read data per unit time specified by the read request. Alternatively, a parameter determination step for determining a parameter indicating the write data amount and a write request to the external storage device are temporarily held in the storage area, and the number indicated by the parameter determined by the parameter determination step or the write data amount When the write requests are accumulated, the external storage device is accessed as a single write request, while the external storage device is directly accessed for the read request to the external storage device. Storage device access control step and calculation for accessing external storage device Characterized in that it records the external storage device driver program to be executed by the.
[0012]
In such a configuration, based on at least the number of read requests per unit time to the external storage device or the amount of read data per unit time specified in the read request, the number of write requests to be combined into one Alternatively, the amount of write data is determined, and when the write requests for the determined number or write data amount are accumulated, access to the external storage device is executed in a single write request. When both the parallelism of writing / reading to the device is high, it is possible to prevent waiting for reading due to writing or to take time for writing, and writing when access to the external storage device is free It becomes possible.
[0013]
When the write request is combined into one and access to the external storage device is executed, the completion notification from the external storage device is for the write request combined into one. Therefore, it is necessary to return a completion notification for each original write request to the request source of the original write request (the determined number of write requests). For this purpose, when the information is collected into one write request, the identification information (ID) of the request is stored in the storage area in association with the original write request stored in the storage area. When the completion notification with the identification information is returned from the external storage device, the storage area may be searched with the identification information. In this way, it is possible to reliably detect each original write request, create a completion notice corresponding to each original write request, and return it to the request source.
[0014]
In order to efficiently access the external storage device by combining the determined number or write data amount of write requests into one, the write specified by the determined number or write data amount of the write request Is optimal for sequential access. In such a case, in order to convert the write request for the determined number or write data amount into one new write request, the write destination is the write request for the determined number or write data amount. The write destination specified by the first write request is used as the data size, and it is only necessary to use the total value of each data size specified by the write request corresponding to the determined number or write data amount. By simply executing the above, it is possible to collectively process the writings specified by the corresponding write requests corresponding to the determined number or write data amount.
[0015]
The present invention also ensures that the end-of-file is always stored in the external storage device so that it can be handled as if it were sequential access even when the write specified by the write request to the external storage device is not sequential access, that is, random access. Place a data file to which data is written from the location, receive a write request to the external storage device, convert it to a new write request to write specified data from the end position of the data file, and write specified by the write request before conversion Using the index file indicating the correspondence between the destination and the write destination designated by the converted write request, information indicating the corresponding relationship is set in the index file, and the converted write request is stored in the external storage device. As an actual write request to It characterized in that it also was Migihitsuji.
[0016]
In such a configuration, the sequence of write requests temporarily stored in the storage area is converted into a new write request for requesting data to be written from the end of the data file. Even if the write request is random access, it is always sequential access. Therefore, it is possible to efficiently access the external storage device by combining the determined number of write requests into one.
[0017]
In the present invention, at least the number of read requests per unit time or the amount of read data is applied to a predetermined monotonic non-decreasing function to calculate the number of write requests or the amount of write data to be combined into one. Also features.
[0018]
In such a configuration, as the number of read requests or the amount of read data for the external storage device increases, the number of write requests or the amount of write data to be collected increases, that is, the occurrence frequency of writing decreases. When a large number of read requests and write requests are generated in parallel, the processing performance of read requests can be significantly improved. Here, if the frequency of writing is lowered too much, writing will not be completed promptly. For this reason, an upper limit value is provided for the number of write requests or the amount of write data to be collected, and this upper limit value may be used when the number of read requests to the external storage device or the read data amount is a predetermined value or more.
[0019]
The present invention is also characterized in that the monotonic non-decreasing function is dynamically set from the occurrence frequency of read requests and the occurrence frequency of write requests acquired in a range larger than the unit time.
[0020]
In such a configuration, the number of write requests or the amount of write data combined into one reflects the frequency of occurrence of past read requests and the frequency of occurrence of write requests. Even in a system in which the frequency of occurrence of write requests is not constant, it is possible to make a setting suitable for the situation of occurrence of read / write. In particular, the ratio of the frequency of read requests to the frequency of occurrence of write requests is applied, and the function is dynamically set so that the number of write requests or the amount of write data combined into one is directly proportional to the ratio. In this case, the ratio between the number of reading and writing or the amount of data can be always kept constant in the range where the number of read requests to the external storage device or the amount of read data is a predetermined value or more.
[0021]
In addition, the present invention calculates the number of write requests or the amount of write data to be combined into one, not only the number of read requests or the amount of read data per unit time, but also the number of writes per unit time to the external storage device. The present invention is also characterized in that the number of requests or the amount of write data per unit time specified in the write request is also taken into account.
[0022]
In such a configuration, although the number of write requests or the amount of write data is small, only the number of read requests or the amount of read data is large, and the number of write requests or the amount of write data combined into one is large. It is possible to prevent the value from being determined, and it is possible to set the occurrence frequency of writing to an optimum value that accurately reflects the state in which a large number of reads and writes are simultaneously generated in parallel.
[0023]
Note that the present invention relating to a machine-readable recording medium in which the above external storage device driver program is recorded is also established as an invention relating to a computer having functional means realized by the program, and is applied by the program. It is also established as an invention relating to a method having a procedure.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0025]
[First Embodiment]
(overall structure)
FIG. 1 is a block diagram showing the overall configuration of a computer system according to the first embodiment of the present invention.
[0026]
The computer system of FIG. 1 employs a configuration in which a
[0027]
On the
[0028]
A user of a computer system receives a service provided by the computer system by using the
[0029]
When the
[0030]
When the
[0031]
As shown in FIG. 2A, the write requests 301, 303, and 305 write ID numbers (identification numbers) specific to each request, write destination (where to write) information, and write source (where data is written). Information) and information on the size of data to be written.
[0032]
Similarly, as shown in FIG. 2B, the read requests 302, 304, and 306 include an ID number unique to each request, information of a read source (where data is read), and a read destination (where is read). Contains information and information on the size to be read.
[0033]
When the execution of the
[0034]
Upon receiving the
[0035]
The
[0036]
(Configuration of driver 100)
Next, the internal configuration of the
First, the
[0037]
(Function of the I /
Next, functions of the I /
A
[0038]
When receiving the read
[0039]
(Function of
Next, the function of the
[0040]
The
[0041]
The past
[0042]
First, the number of read
[0043]
The
[0044]
First, if the number of write requests to be stored is y and the number of read requests received per unit time is x, the relationship between y and x is calculated using a function f (x):
y = f (x) (1)
It can be expressed as.
[0045]
Here, as function f (x),
(1) Large when x is large and small when x is small
(2) Does not become larger than a certain level
Apply a function like
[0046]
The reason why the function f (x) satisfying the condition (1) is applied is as follows.
(A) When the parallelism of reading is high (corresponding to the case where x is large), the value of y = f (x) becomes large, that is, the number of write requests to be stored becomes large, and the frequency of writing is lowered. Therefore, it is possible to avoid waiting for the reading process during writing.
(B) Conversely, when the degree of parallelism of reading is low (corresponding to the case where x is small), the value of y = f (x) becomes small, that is, the number of write requests to be stored becomes small. The frequency can be increased and the response of writing can be improved.
[0047]
Next, the reason why the function f (x) satisfying the condition (2) is applied is that the parallelism of reading is high, and if the frequency of writing is too low, writing does not end quickly. This is to prevent a problem that the
[0048]
In the present embodiment, as a function f (x) that satisfies the above two conditions (1) and (2), for example, a function f (x) as shown in FIG.
A function f (x) expressed as follows is defined. Here, k is a constant that varies depending on the system.
[0049]
Thus, the function f (x) applied in the present embodiment increases in proportion to x in the range of 0 ≦ x <A, that is, increases monotonically, and takes a constant value kA in the range of x ≧ A. It is a kind of monotonic non-decreasing function.
[0050]
When the
[0051]
The above operation will be described with a specific example. Here, x1 is the number of read requests received in the past 5 seconds, and y1 is the number of write requests accumulated.
Further, in this computer system, when 100 or more read requests are received in the past 5 seconds, 10 write requests are collectively written. At this time, A is 100 and k is 1/10.
[0052]
In other words, the relationship between x1 and y1 is
It is expressed.
[0053]
(Function of the external storage device
Next, the function of the external storage device
The external storage device
[0054]
The
[0055]
The
[0056]
On the other hand, when the read
[0057]
Next, the write request control process in the external storage device
First, the external storage device
(1) When a
(2) When the
(3) When time-out (timeout) is notified from the
Until one of the above occurs, the process waits (step S1).
[0058]
The operation when the event (1) occurs, that is, when the
First, the external storage device
[0059]
Next, the external storage device
[0060]
If it is not the
When the above conditions are not satisfied, the external storage device
[0061]
On the other hand, when the above condition is satisfied, the external storage device
[0062]
When the external storage device
[0063]
Subsequently, the external storage device
[0064]
In this state, when the
[0065]
First, when a
[0066]
In this way, a
[0067]
Next, the operation when the event (2) occurs, that is, when the
In this case, the external storage device
[0068]
Next, an operation when the event (3) occurs, that is, when a time-out is notified from the
In this case, the external storage device
[0069]
The first embodiment of the present invention has been described above.
In the first embodiment, when the parallel degree of writing / reading with respect to the
[0070]
The reason for this is that when the parallelism of reading is high, by increasing the amount of writing stored according to f (x) = kx in the above equation (2), by reducing the writing frequency, the total of writing and reading This is because the load on the
[0071]
For example, when k = 1/10 and A = 100 in equation (2), that is, when the function of equation (3) is applied, the number of read
[0072]
Here, the equalization of the load will be described with reference to the graph of FIG.
In FIG. 9, the left
[0073]
In the graph of FIG. 9, in the conventional method, the limit of the simultaneous processing of the
[0074]
However, in the present embodiment, the external storage device
[0075]
In the graph pattern 905, it appears that the amount of write requests that can be processed is reduced compared to the
[0076]
Thus, in this embodiment, when a large number of write requests and read requests occur,
(1) Read request is processed without waiting
(2) Write requests are processed efficiently
Making it possible at the same time.
[0077]
In this embodiment, when there are few write requests and read requests, the write requests are processed immediately without accumulating, so that the response to the write requests can be improved.
[0078]
[Second Embodiment]
The first embodiment has been described on the assumption that the writing to the
[0079]
Therefore, in the second embodiment of the present invention, when a predetermined condition is satisfied with respect to a series of write requests (303) for random access, it can be collectively written in the same manner as in the first embodiment. Embodiments will be described.
[0080]
First, as indicated by
[0081]
The process of “writing data A at the address (2, 1)” includes the process of “writing A from the end position (m) of the data file 12” and “data at the position (2, 1) of the
[0082]
Here, the
[0083]
FIG. 11 shows an overall configuration of a computer system according to the second embodiment of the present invention, to which the above-described technique for converting random reading / writing into sequential reading / writing is applied. In addition, the same code | symbol is attached | subjected to the same part as FIG.
[0084]
The computer system having the configuration shown in FIG. 11 is characterized in that a
[0085]
Therefore, in response to the
[0086]
Accordingly, the I /
[0087]
In this embodiment, when the
[0088]
As described above, the
[0089]
In this embodiment, even if a write request for updating data on the
[0090]
Now, in order to update the data A described above to the data A ′, it is assumed that the
[0091]
On the other hand, on the data file 12, the data A ′ is not written from the position m (overwriting the old data A), but is written from the end position n of the data file 12. For this reason, the old data A written from the position m is stored without being physically updated. Therefore, on the data file 12, the old data before the update increases with time, and it becomes difficult to effectively use the area of the
[0092]
[Third Embodiment]
Next, a third embodiment of the present invention will be described with reference to the block diagram of the computer system shown in FIG. In addition, the same code | symbol is attached | subjected to the same part as FIG.
[0093]
The feature of this embodiment is that in the first and second embodiments, the function f (x) used for parameter calculation in the
[0094]
First, in the present embodiment, the
[0095]
Assuming that the occurrence frequency of a read request and a write request is a and b, respectively, in the present embodiment, a function f (x) representing the number y for storing a write request is
It is determined as follows. Here, the point that k is a constant that differs depending on the system is the same as in the expressions (2) and (3).
[0096]
Therefore, a is a 1 , A 2 , A Three And b is b 1 , B 2 , B Three The function f (x) expressed by the above equation (4) dynamically changes as shown in FIG. 13 (the example in the figure is a 1 / B 1 > A 2 / B 2 > A Three / B Three in the case of).
[0097]
In this example, when the number of read requests is small, the number of data to be written together is small, but when a large number of read requests are generated and access to the
[0098]
This will be described with a specific example.
In the system shown in FIG. 12, it is assumed that reading occurs (a =) 200 times and writing (b =) 1000 times in one hour. At this time, x1 is the number of read requests received in the last 5 seconds, and y1 is the number of write requests stored.
[0099]
In the system shown in FIG. 12, when 100 or more read requests are received in 5 seconds, b / a data are written together.
At this time, b = 1000, a = 200, A = 100, k = 1/100, and the relationship between y1 and x1 is from the above equation (4).
It is expressed.
[0100]
As is clear from the above equation (5), in this example, when the number of read requests is sufficiently large (in the case of 100 or more in 5 seconds), the write requests are grouped by five, so the frequency of occurrence of writing is equivalent. Therefore, b / 5 = 1000/5 = 200, which coincides with the read occurrence frequency a (= 200), so that the ratio between read and write can be made equal.
[0101]
If, for example, b = 2000 and a = 200 are changed during the operation, k remains 1/100 and A remains 100.
It is changed as follows.
[0102]
Also in this case, when the number of read requests is sufficiently large (in the case of 100 or more in 5 seconds), since 10 write requests are collected, the write occurrence frequency is equivalently b / 10 = 2000/5 = 200, which coincides with the read occurrence frequency a (= 200), and the ratio of read to write can be made equal.
[0103]
In this way, even when the read / write frequency changes during the operation, when a large number of read requests are generated and access to the
[0104]
[Fourth Embodiment]
In the first to third embodiments, assuming that the number of read requests in the latest unit time is x, the number y = the number of write requests stored in the parameter determination unit 120 (or 120 ′) based on the function f (x). The case of applying the method for determining f (x) has been described. However, when the number of write requests is smaller than the number of read requests and the above method is applied, there is a possibility that the execution of writing may be waited for a long time.
[0105]
Therefore, the total value of the number of read requests and the number of write requests in the recent unit time is set as x, and the number y = f (x) for storing the write requests is determined based on the function f (x), thereby reading request. FIG. 12 is a block diagram of the computer system shown for convenience in the second embodiment of the present invention in which the execution of writing is prevented from waiting for a long time when the number of write requests is smaller than the number of This will be described with reference to the configuration diagram.
[0106]
A feature of the present embodiment is that when a
[0107]
The feature of the present embodiment is that the
[0108]
As described above, in the present embodiment, the number of write requests to be stored is larger as the total value increases (that is, the external storage device) based on the total value of the number of read
[0109]
The above is based on the number of read requests 304 (and the number of write requests 303) 125 (x) received from the I /
[0110]
In addition, both the number of read requests 304 (and write requests 303) received per unit time and the corresponding data size (data amount) are stored in the
[0111]
【The invention's effect】
As described above in detail, according to the present invention, at least when the number of write requests determined based on the number of read requests per unit time or the corresponding amount of read data is accumulated, the write requests are collectively combined into one write request. Since access to the storage device is executed, it is possible to improve the processing performance of read requests when a large number of read requests and write requests are generated in parallel, and to suppress a decrease in the speed of services provided by the computer.
[0112]
Further, according to the present invention, even in the case of random writing, by converting the write request so as to be apparently sequential access, it is possible to perform batch writing similar to the case of sequential access, and random access The processing performance of read requests when a large number of read requests and write requests are generated in parallel can be improved.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of a computer system according to a first embodiment of the present invention.
FIG. 2 is a view showing a format example of a write request, a read request, and a completion notification applied in the embodiment.
3 is a block configuration diagram of a
FIG. 4 is a diagram showing an example of a function y = f (x) for determining the number of write requests to be stored from the number of read requests received per unit time, applied in the simultaneous embodiment.
5 is a block configuration diagram of an external storage device
FIG. 6 is an exemplary flowchart showing the procedure of a write request control process in the external storage device
FIG. 7 is a diagram for explaining an operation when a plurality of stored
FIG. 8 is a diagram for explaining an operation of creating a
FIG. 9 is a view for explaining the effect of the embodiment;
FIG. 10 is a diagram for explaining a second embodiment of the present invention in which the technique for collectively executing a plurality of write requests applied in the first embodiment can be applied from sequential writing to random writing. .
FIG. 11 is an exemplary block diagram showing the overall configuration of a computer system according to the second embodiment;
FIG. 12 is a block diagram showing the overall configuration of a computer system according to third and fourth embodiments of the present invention.
FIG. 13 is a function y for determining the number of write requests to be stored from the number of read requests received per unit time and the ratio between the frequency of write requests and read requests applied in the third embodiment. The figure which shows an example of = f (x).
[Explanation of symbols]
11 ... Index file
12 ... Data file
100: Driver (External Storage Device Driver Program)
110, 110 '... I / O processor
120, 120 '... parameter determination unit
121 ... parameter
124... Past data storage unit
126: Parameter calculation unit
130: External storage device access control unit
132 ... request conversion unit
133 ... Timer
134: Write request storage unit
135 ... ID storage unit
140: Data converter
201 ... OS (Operating System)
202 ... Application
203 ... External storage device
301, 303, 305, 310 ... Write request
302, 304, 306, 311 ... read request
307, 308, 309, 312 ... notification of completion
Claims (6)
前記外部記憶装置への最も最近の単位時間における読み出し要求の数、または当該読み出し要求で指定される前記最も最近の単位時間における読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定ステップと、
前記外部記憶装置への書き込み要求を受け取る毎に、当該書き込み要求を記憶領域に一時的に保持するステップと、
前記記憶領域が空の状態にあるときに前記保持するステップが実行されたかを判定するステップと、
前記記憶領域が空の状態にあるときに前記保持するステップが実行されたと判定された場合、一定時間を計測するタイマを起動するステップと、
前記記憶領域に、前記パラメータ決定ステップにより決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった第1の場合と、前記決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まらなくても、前記タイマが前記一定時間を計測し終えた第2の場合のいずれの場合にも、前記記憶領域に貯まっている書き込み要求を、まとめて1つの書き込み要求として前記外部記憶装置へのアクセスを実行する一方、前記外部記憶装置への読み出し要求に対しては当該読み出し要求を前記記憶領域に貯めておかずに前記外部記憶装置へのアクセスを実行するアクセス実行ステップと
を実行させるための外部記憶装置ドライバプログラムであって、
前記パラメータ決定ステップは、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量に基づいて前記1つにまとめる書き込み要求の数または書き込みデータ量を算出するパラメータ計算ステップであって、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量をxとし、前記1つにまとめる書き込み要求の数または書き込みデータ量をyとし、予め定められた読み出し要求の数または読み出しデータ量をAとし、予め定められた書き込み要求の数または書き込みデータ量をkAとすると、前記xが前記A未満の場合には前記yをkxとして算出し、前記xが前記A以上の場合には前記yを前記kAとして算出するパラメータ計算ステップを含む
ことを特徴とする外部記憶装置ドライバプログラムを記録した機械読み取り可能な記録媒体。To the computer that accesses the external storage device,
Based on the number of read requests to the external storage device in the most recent unit time or the amount of read data in the most recent unit time specified by the read request, the number of write requests or write data to be combined into one A parameter determining step for determining a parameter indicating the quantity;
Each time a write request to the external storage device is received , temporarily holding the write request in a storage area ;
Determining whether the holding step has been performed when the storage area is empty;
If it is determined that the step of holding is executed when the storage area is empty, starting a timer that measures a certain time; and
A first case in which write requests for the number or write data amount indicated by the parameter determined in the parameter determination step are stored in the storage area, and a write request for the number or write data amount indicated by the determined parameter Even if the timer is not stored, the write request stored in the storage area is collectively stored as one write request in any case of the second case where the timer finishes measuring the predetermined time. And executing an access execution step for executing an access to the external storage device without storing the read request in the storage area in response to a read request to the external storage device. External storage device driver program,
The parameter determining step is a parameter calculating step of calculating the number of write requests or the amount of write data to be combined into the one based on the number of read requests or the amount of read data in the most recent unit time. The number of read requests or the amount of read data per unit time is x, the number of write requests or the write data amount to be combined into one is y, the predetermined number of read requests or the amount of read data is A, and When the predetermined number of write requests or write data amount is kA, when x is less than A, y is calculated as kx, and when x is greater than or equal to A, y is set as kA. An external storage device driver program comprising a parameter calculation step for calculating A machine-readable recording medium on which is recorded.
少なくとも、前記外部記憶装置への最も最近の単位時間における読み出し要求の数、または当該読み出し要求で指定される前記最も最近の単位時間における読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定ステップと、
前記外部記憶装置への書き込み要求を受け取る毎に、当該書き込み要求を記憶領域に一時的に保持するステップと、
前記記憶領域が空の状態にあるときに前記保持するステップが実行されたかを判定するステップと、
前記記憶領域が空の状態にあるときに前記保持するステップが実行されたと判定された場合、一定時間を計測するタイマを起動するステップと、
前記記憶領域に、前記パラメータ決定ステップにより決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった第1の場合と、前記決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まらなくても、前記タイマが前記一定時間を計測し終えた第2の場合のいずれの場合にも、前記記憶領域に貯まっている書き込み要求を、まとめて1つの書き込み要求として前記外部記憶装置へのアクセスを実行する一方、前記外部記憶装置への読み出し要求に対しては当該読み出し要求を前記記憶領域に貯めておかずに前記外部記憶装置へのアクセスを実行するアクセス実行ステップと
を実行させるための外部記憶装置ドライバプログラムであって、
前記パラメータ決定ステップは、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量と、前記単位時間より大きな時間範囲で取得される読み出し要求の発生頻度aに対する書き込み要求の発生頻度bの比率b/aとに基づいて、前記1つにまとめる書き込み要求の数または書き込みデータ量を算出するパラメータ計算ステップであって、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量をxとし、前記1つにまとめる書き込み要求の数または書き込みデータ量をyとし、予め定められた読み出し要求の数または読み出しデータ量をAとし、予め定められた書き込み要求の数または書き込みデータ量をkAとすると、前記xが前記A未満の場合には前記yをk(bx/a)として算出し、前記xが前記A以上の場合には前記yを前記k(bA/a)として算出するパラメータ計算ステップを含む
ことを特徴とする外部記憶装置ドライバプログラムを記録した機械読み取り可能な記録媒体。To the computer that accesses the external storage device,
Based on at least the number of read requests to the external storage device in the latest unit time or the amount of read data in the most recent unit time specified by the read request, A parameter determining step for determining a parameter indicating the write data amount;
Each time a write request to the external storage device is received , temporarily holding the write request in a storage area ;
Determining whether the holding step has been performed when the storage area is empty;
If it is determined that the step of holding is executed when the storage area is empty, starting a timer that measures a certain time; and
A first case in which write requests for the number or write data amount indicated by the parameter determined in the parameter determination step are stored in the storage area, and a write request for the number or write data amount indicated by the determined parameter Even if the timer is not stored, the write request stored in the storage area is collectively stored as one write request in any case of the second case where the timer finishes measuring the predetermined time. And executing an access execution step for executing an access to the external storage device without storing the read request in the storage area in response to a read request to the external storage device. External storage device driver program,
In the parameter determination step, the ratio b of the number of read requests or the amount of read data in the most recent unit time and the frequency b of write requests to the frequency a of read requests acquired in a time range larger than the unit time b / A is a parameter calculation step for calculating the number of write requests or the amount of write data to be combined into one, wherein the number of read requests or the amount of read data in the most recent unit time is x, Assuming that the number of write requests or the amount of write data combined into one is y, the predetermined number of read requests or the amount of read data is A, and the predetermined number of write requests or the amount of write data is kA, When x is less than A, y is calculated as k (bx / a), There machine-readable recording medium recording the external storage device driver program, which comprises a parameter calculation step of calculating the y as the k (bA / a) in the case of more than the A.
少なくとも、前記外部記憶装置への最も最近の単位時間における読み出し要求の数、または当該読み出し要求で指定される前記最も最近の単位時間における読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定ステップと、
前記外部記憶装置への書き込み要求を受け取る毎に、当該書き込み要求を記憶領域に一時的に保持するステップと、
前記記憶領域が空の状態にあるときに前記保持するステップが実行されたかを判定するステップと、
前記記憶領域が空の状態にあるときに前記保持するステップが実行されたと判定された場合、一定時間を計測するタイマを起動するステップと、
前記記憶領域に、前記パラメータ決定ステップにより決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった第1の場合と、前記決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まらなくても、前記タイマが前記一定時間を計測し終えた第2の場合のいずれの場合にも、前記記憶領域に貯まっている書き込み要求を、まとめて1つの書き込み要求として前記外部記憶装置へのアクセスを実行する一方、前記外部記憶装置への読み出し要求に対しては当該読み出し要求を前記記憶領域に貯めておかずに前記外部記憶装置へのアクセスを実行するアクセス実行ステップと
を実行させるための外部記憶装置ドライバプログラムであって、
前記パラメータ決定ステップは、前記最も最近の単位時間における読み出し要求の数と前記外部記憶装置への前記最も最近の単位時間における書き込み要求の数との合計値である単位時間当たりの要求数合計値、または前記最も最近の単位時間における読み出しデータ量と前記外部記憶装置への前記最も最近の単位時間における書き込みデータ量との合計値である単位時間当たりのデータ量合計値をxとし、前記1つにまとめる書き込み要求の数または書き込みデータ量をyとすると、前記xに基づいて前記yを算出するパラメータ計算ステップであって、予め定められた要求数合計値またはデータ量合計値をAとし、予め定められた書き込み要求の数または書き込みデータ量をkAとすると、前記xが前記A未満の場合には前記yをkxとして算出し、前記xが前記A以上の場合には前記yを前記kAとして算出するパラメータ計算ステップを含む
ことを特徴とする外部記憶装置ドライバプログラムを記録した機械読み取り可能な記録媒体。To the computer that accesses the external storage device,
Based on at least the number of read requests to the external storage device in the latest unit time or the amount of read data in the most recent unit time specified by the read request, A parameter determining step for determining a parameter indicating the write data amount;
Each time a write request to the external storage device is received , temporarily holding the write request in a storage area ;
Determining whether the holding step has been performed when the storage area is empty;
If it is determined that the step of holding is executed when the storage area is empty, starting a timer that measures a certain time; and
A first case in which write requests for the number or write data amount indicated by the parameter determined in the parameter determination step are stored in the storage area, and a write request for the number or write data amount indicated by the determined parameter Even if the timer is not stored, the write request stored in the storage area is collectively stored as one write request in any case of the second case where the timer finishes measuring the predetermined time. And executing an access execution step for executing an access to the external storage device without storing the read request in the storage area in response to a read request to the external storage device. External storage device driver program,
The parameter determining step includes a total number of requests per unit time that is a total value of the number of read requests in the most recent unit time and the number of write requests in the most recent unit time to the external storage device, Alternatively, x is a total amount of data per unit time, which is a total value of the amount of read data in the most recent unit time and the amount of data written in the most recent unit time to the external storage device. A parameter calculation step for calculating y based on x, where y is the number of write requests to be summarized or the amount of write data, and A is a predetermined request number total value or data amount total value. Assuming that the number of write requests or the amount of data to be written is kA, when x is less than A, y is kx. Calculated Te, wherein x is machine-readable recording medium recording the external storage device driver program in the case of more than the A which comprises a parameter calculation step of calculating the y as the kA.
前記外部記憶装置への最も最近の単位時間における読み出し要求の数、または当該読み出し要求で指定される前記最も最近の単位時間における読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定手段と、
前記外部記憶装置への書き込み要求が一時的に保持される書き込み要求記憶手段と、
前記外部記憶装置へのアクセスを実行する外部記憶装置アクセス制御手段とを具備し、
前記パラメータ決定手段は、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量に基づいて前記1つにまとめる書き込み要求の数または書き込みデータ量を算出するパラメータ計算手段であって、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量をxとし、前記1つにまとめる書き込み要求の数または書き込みデータ量をyとし、予め定められた読み出し要求の数または読み出しデータ量をAとし、予め定められた書き込み要求の数または書き込みデータ量をkAとすると、前記xが前記A未満の場合には前記yをkxとして算出し、前記xが前記A以上の場合には前記yを前記kAとして算出するパラメータ計算手段を含み、
前記外部記憶装置アクセス制御手段は、
前記外部記憶装置への書き込み要求を受け取る毎に、当該書き込み要求を前記書き込み要求記憶手段に追加する追加手段と、
前記書き込み要求記憶手段が空の状態にあるときに前記追加手段によって前記書き込み要求記憶手段に前記書き込み要求が追加された場合に起動されて、一定時間を計測するタイマと、
前記書き込み要求記憶手段に、前記パラメータ決定手段により決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった第1の場合と、前記決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まらなくても、前記タイマが前記一定時間を計測し終えた第2の場合のいずれの場合にも、前記書き込み要求記憶手段に貯まっている書き込み要求を、まとめて1つの書き込み要求として前記外部記憶装置へのアクセスを実行する一方、前記外部記憶装置への読み出し要求に対しては当該読み出し要求を記憶手段に貯めておかずに前記外部記憶装置へのアクセスを実行するアクセス実行手段とを含む
ことを特徴とする計算機。In a computer that accesses an external storage device,
Based on the number of read requests to the external storage device in the most recent unit time or the amount of read data in the most recent unit time specified by the read request, the number of write requests or write data to be combined into one Parameter determining means for determining a parameter indicating the quantity;
Write request storage means for temporarily holding a write request to the external storage device;
Comprising an external storage device access control means for executing access to pre Kigaibu storage device,
The parameter determination means is parameter calculation means for calculating the number of write requests or the amount of write data to be combined into the one based on the number of read requests or the amount of read data in the most recent unit time. The number of read requests or the amount of read data per unit time is x, the number of write requests or the write data amount to be combined into one is y, the predetermined number of read requests or the amount of read data is A, and When the predetermined number of write requests or write data amount is kA, when x is less than A, y is calculated as kx, and when x is greater than or equal to A, y is set as kA. a parameter calculation means for calculating viewing including,
The external storage device access control means includes:
Each time a write request to the external storage device is received, additional means for adding the write request to the write request storage means;
A timer that starts when the write request is added to the write request storage means by the adding means when the write request storage means is empty, and measures a certain time;
In the first case where the write request storage means stores a write request for the number or write data amount indicated by the parameter determined by the parameter determination means, and for the number or write data amount indicated by the determined parameter. Even in the case where the write request is not stored, in any case of the second case where the timer has finished measuring the predetermined time, the write requests stored in the write request storage unit are collectively collected as one write request. An access execution unit that executes access to the external storage device while executing an access to the external storage device without storing the read request in the storage unit in response to a read request to the external storage device; A computer characterized by including .
少なくとも、前記外部記憶装置への最も最近の単位時間における読み出し要求の数、または当該読み出し要求で指定される前記最も最近の単位時間における読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定手段と、
前記外部記憶装置への書き込み要求が一時的に保持される書き込み要求記憶手段と、
前記外部記憶装置へのアクセスを実行する外部記憶装置アクセス制御手段とを具備し、
前記パラメータ決定手段は、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量と、前記単位時間より大きな時間範囲で取得される読み出し要求の発生頻度aに対する書き込み要求の発生頻度bの比率b/aとに基づいて、前記1つにまとめる書き込み要求の数または書き込みデータ量を算出するパラメータ計算手段であって、前記最も最近の単位時間における読み出し要求の数または読み出しデータ量をxとし、前記1つにまとめる書き込み要求の数または書き込みデータ量をyとし、予め定められた読み出し要求の数または読み出しデータ量をAとし、予め定められた書き込み要求の数または書き込みデータ量をkAとすると、前記xが前記A未満の場合には前記yをk(bx/a)として算出し、前記xが前記A以上の場合には前記yを前記k(bA/a)として算出するパラメータ計算手段を含み、
前記外部記憶装置アクセス制御手段は、
前記外部記憶装置への書き込み要求を受け取る毎に、当該書き込み要求を前記書き込み要求記憶手段に追加する追加手段と、
前記書き込み要求記憶手段が空の状態にあるときに前記追加手段によって前記書き込み要求記憶手段に前記書き込み要求が追加された場合に起動されて、一定時間を計測するタイマと、
前記書き込み要求記憶手段に、前記パラメータ決定手段により決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった第1の場合と、前記決定され たパラメータの示す数または書き込みデータ量分の書き込み要求が貯まらなくても、前記タイマが前記一定時間を計測し終えた第2の場合のいずれの場合にも、前記書き込み要求記憶手段に貯まっている書き込み要求を、まとめて1つの書き込み要求として前記外部記憶装置へのアクセスを実行する一方、前記外部記憶装置への読み出し要求に対しては当該読み出し要求を記憶手段に貯めておかずに前記外部記憶装置へのアクセスを実行するアクセス実行手段とを含む
ことを特徴とする計算機。In a computer that accesses an external storage device,
Based on at least the number of read requests to the external storage device in the latest unit time or the amount of read data in the most recent unit time specified by the read request, Parameter determining means for determining a parameter indicating the amount of write data;
Write request storage means for temporarily holding a write request to the external storage device;
Comprising an external storage device access control means for executing access to pre Kigaibu storage device,
The parameter determination means includes a ratio b of the number of read requests or the amount of read data in the most recent unit time and the write request occurrence frequency b to the read request occurrence frequency a acquired in a time range larger than the unit time. Parameter calculation means for calculating the number of write requests or the amount of write data to be combined based on / a, wherein x is the number of read requests or the amount of read data in the most recent unit time, Assuming that the number of write requests or the amount of write data combined into one is y, the predetermined number of read requests or the amount of read data is A, and the predetermined number of write requests or the amount of write data is kA, When x is less than A, the y is calculated as k (bx / a), and the x is Look including a parameter calculation means for calculating the y as the k (bA / a) in the case of above,
The external storage device access control means includes:
Each time a write request to the external storage device is received, additional means for adding the write request to the write request storage means;
A timer that starts when the write request is added to the write request storage means by the adding means when the write request storage means is empty, and measures a certain time;
In the first case where the write request storage means stores a write request for the number or write data amount indicated by the parameter determined by the parameter determination means, and for the number or write data amount indicated by the determined parameter . Even in the case where the write request is not stored, in any case of the second case where the timer has finished measuring the predetermined time, the write requests stored in the write request storage unit are collectively collected as one write request. An access execution unit that executes access to the external storage device while executing an access to the external storage device without storing the read request in the storage unit in response to a read request to the external storage device; A computer characterized by including .
少なくとも、前記外部記憶装置への最も最近の単位時間における読み出し要求の数、または当該読み出し要求で指定される前記最も最近の単位時間における読み出しデータ量に基づいて、1つにまとめる書き込み要求の数または書き込みデータ量を示すパラメータを決定するパラメータ決定手段と、
前記外部記憶装置への書き込み要求が一時的に保持される書き込み要求記憶手段と、
前記外部記憶装置へのアクセスを実行する外部記憶装置アクセス制御手段とを具備し、
前記パラメータ決定手段は、前記最も最近の単位時間における読み出し要求の数と前記外部記憶装置への前記最も最近の単位時間における書き込み要求の数との合計値である単位時間当たりの要求数合計値、または前記最も最近の単位時間における読み出しデータ量と前記外部記憶装置への前記最も最近の単位時間における書き込みデータ量との合計値である単位時間当たりのデータ量合計値をxとし、前記1つにまとめる書き込み要求の数または書き込みデータ量をyとすると、前記xに基づいて前記yを算出するパラメータ計算手段であって、予め定められた要求数合計値またはデータ量合計値をAとし、予め定められた書き込み要求の数または書き込みデータ量をkAとすると、前記xが前記A未満の場合には前記yをkxとして算出し、前記xが前記A以上の場合には前記yを前記kAとして算出するパラメータ計算手段を含み、
前記外部記憶装置アクセス制御手段は、
前記外部記憶装置への書き込み要求を受け取る毎に、当該書き込み要求を前記書き込み要求記憶手段に追加する追加手段と、
前記書き込み要求記憶手段が空の状態にあるときに前記追加手段によって前記書き込み要求記憶手段に前記書き込み要求が追加された場合に起動されて、一定時間を計測するタイマと、
前記書き込み要求記憶手段に、前記パラメータ決定手段により決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まった第1の場合と、前記決定されたパラメータの示す数または書き込みデータ量分の書き込み要求が貯まらなくても、前記タイマが前記一定時間を計測し終えた第2の場合のいずれの場合にも、前記書き込み要求記憶手段に貯まっている書き込み要求を、まとめて1つの書き込み要求として前記外部記憶装置へのアクセスを実行する一方、前記外部記憶装置への読み出し要求に対しては当該読み出し要求を記憶手段に貯めておかずに前記外部記憶装置へのアクセスを実行するアクセス実行手段とを含む
ことを特徴とする計算機。In a computer that accesses an external storage device,
Based on at least the number of read requests to the external storage device in the latest unit time or the amount of read data in the most recent unit time specified by the read request, Parameter determining means for determining a parameter indicating the amount of write data;
Write request storage means for temporarily holding a write request to the external storage device;
Comprising an external storage device access control means for executing access to pre Kigaibu storage device,
The parameter determination means includes a total number of requests per unit time that is a total value of the number of read requests in the most recent unit time and the number of write requests in the most recent unit time to the external storage device, Alternatively, x is a total amount of data per unit time, which is a total value of the amount of read data in the most recent unit time and the amount of data written in the most recent unit time to the external storage device. Parameter calculation means for calculating y based on x, where Y is the number of write requests to be summarized or the amount of write data, where A is a predetermined total number of requests or total data amount. Assuming that kA is the number of write requests or the amount of write data, if x is less than A, y is calculated as kx , If the x is equal to or higher than the A is viewed contains a parameter calculating means for calculating said y as the kA,
The external storage device access control means includes:
Each time a write request to the external storage device is received, additional means for adding the write request to the write request storage means;
A timer that starts when the write request is added to the write request storage means by the adding means when the write request storage means is empty, and measures a certain time;
In the first case where the write request storage means stores a write request for the number or write data amount indicated by the parameter determined by the parameter determination means, and for the number or write data amount indicated by the determined parameter. Even in the case where the write request is not stored, in any case of the second case where the timer has finished measuring the predetermined time, the write requests stored in the write request storage unit are collectively collected as one write request. An access execution unit that executes access to the external storage device while executing an access to the external storage device without storing the read request in the storage unit in response to a read request to the external storage device; A computer characterized by including .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP30939399A JP4176933B2 (en) | 1999-10-29 | 1999-10-29 | RECORDING MEDIUM RECORDING EXTERNAL STORAGE DEVICE DRIVER PROGRAM AND COMPUTER HAVING EXTERNAL STORAGE DEVICE ACCESS FUNCTION |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP30939399A JP4176933B2 (en) | 1999-10-29 | 1999-10-29 | RECORDING MEDIUM RECORDING EXTERNAL STORAGE DEVICE DRIVER PROGRAM AND COMPUTER HAVING EXTERNAL STORAGE DEVICE ACCESS FUNCTION |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2001125749A JP2001125749A (en) | 2001-05-11 |
JP4176933B2 true JP4176933B2 (en) | 2008-11-05 |
Family
ID=17992483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP30939399A Expired - Fee Related JP4176933B2 (en) | 1999-10-29 | 1999-10-29 | RECORDING MEDIUM RECORDING EXTERNAL STORAGE DEVICE DRIVER PROGRAM AND COMPUTER HAVING EXTERNAL STORAGE DEVICE ACCESS FUNCTION |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4176933B2 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005011110A (en) * | 2003-06-19 | 2005-01-13 | Hitachi Ltd | Information processor, method for controlling information processor, program, and information processing system |
US7249229B2 (en) * | 2004-03-31 | 2007-07-24 | Gemini Mobile Technologies, Inc. | Synchronous message queues |
JP4997784B2 (en) * | 2006-02-16 | 2012-08-08 | 日本電気株式会社 | Data storage system, data storage method, and data storage program |
JP4391548B2 (en) | 2007-04-20 | 2009-12-24 | 株式会社メディアロジック | Device driver |
JP4391569B2 (en) * | 2008-05-29 | 2009-12-24 | 株式会社メディアロジック | Information processing system |
JP5040956B2 (en) * | 2009-05-25 | 2012-10-03 | 富士通株式会社 | Copy control apparatus and method |
JP4959766B2 (en) * | 2009-10-07 | 2012-06-27 | 株式会社メディアロジック | Device driver |
JP2011227664A (en) | 2010-04-19 | 2011-11-10 | Toshiba Corp | Memory system |
-
1999
- 1999-10-29 JP JP30939399A patent/JP4176933B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2001125749A (en) | 2001-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20020169816A1 (en) | Selection of a resource in a distributed computer system | |
EP2266020B1 (en) | Using priority to determine whether to queue an input/output (i/o) request directed to storage | |
JP2910985B2 (en) | Cache management method | |
JP2006277545A (en) | Computer system, storage device system and write processing control method | |
JP3324572B2 (en) | Information processing apparatus and recording medium recording program to be executed by computer | |
JP4176933B2 (en) | RECORDING MEDIUM RECORDING EXTERNAL STORAGE DEVICE DRIVER PROGRAM AND COMPUTER HAVING EXTERNAL STORAGE DEVICE ACCESS FUNCTION | |
CN110750498B (en) | Object access method, device and storage medium | |
US7890958B2 (en) | Automatic adjustment of time a consumer waits to access data from queue during a waiting phase and transmission phase at the queue | |
CN112131005B (en) | Resource adjustment strategy determination method and device | |
JPH07239808A (en) | Distributed data managing system | |
JP5158576B2 (en) | I / O control system, I / O control method, and I / O control program | |
JP6194875B2 (en) | Cache device, cache system, cache method, and cache program | |
JP2839530B2 (en) | Dynamic change processing method of memory allocation priority | |
US6330565B1 (en) | Database management system and method for storing persistent and non-persistent attributes | |
JP3688286B2 (en) | Information storage control device, information storage control method, and information storage control program | |
EP2386957B1 (en) | Apparatus and method for managing memory in consideration of user response time | |
JP6558008B2 (en) | Transfer device, transfer system, and program | |
JP2734515B2 (en) | I / O buffer management device | |
JP4414349B2 (en) | INPUT / OUTPUT DEVICE, COMPUTER, COMPUTER SYSTEM, INPUT / OUTPUT CONTROL PROGRAM, OS, PAGE MANAGEMENT PROGRAM, AND PAGE MANAGEMENT METHOD | |
JP2001075850A (en) | Method for processing data cache, and cache device | |
JPH02310649A (en) | Reception frame transfer system and communication controller | |
CN112306901B (en) | Disk refreshing method and device based on layered storage system, electronic equipment and medium | |
JP3583814B2 (en) | file server | |
JPH06266619A (en) | Page saving/restoring device | |
JP5804970B2 (en) | Data processing apparatus, data processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040915 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070717 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071009 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071210 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080304 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080428 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080527 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080728 |
|
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: 20080819 |
|
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: 20080821 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110829 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120829 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |