JP4758412B2 - Distributed resource acquisition scheduling system and record acquisition program - Google Patents
Distributed resource acquisition scheduling system and record acquisition program Download PDFInfo
- Publication number
- JP4758412B2 JP4758412B2 JP2007306430A JP2007306430A JP4758412B2 JP 4758412 B2 JP4758412 B2 JP 4758412B2 JP 2007306430 A JP2007306430 A JP 2007306430A JP 2007306430 A JP2007306430 A JP 2007306430A JP 4758412 B2 JP4758412 B2 JP 4758412B2
- Authority
- JP
- Japan
- Prior art keywords
- queue
- record
- acquisition
- record acquisition
- records
- 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
Description
本発明は、分散資源取得スケジューリングシステム及びレコード取得プログラムに係り、特に、少なくとも1つ以上のキューに不規則な間隔でレコードが入力される分散コンピューティング環境において、少なくとも1つ以上のレコード取得主体が存在し、各レコード取得主体が1つ以上のキューから順番にレコードを取得することで、各キューの処理待ちレコード数(残レコード数)の合計を最小にするための分散資源取得スケジューリングシステム及びレコード取得プログラムに関する。 The present invention relates to a distributed resource acquisition scheduling system and a record acquisition program. In particular, in a distributed computing environment in which records are input at irregular intervals in at least one or more queues, at least one record acquisition entity is provided. Distributed resource acquisition scheduling system and record for minimizing the total number of records waiting to be processed (number of remaining records) in each queue by each record acquisition subject acquiring records sequentially from one or more queues Regarding the acquisition program.
1つ以上のキューと1つ以上のレコード取得主体が分散配置されている分散コンピューティング環境において、負荷分散やスケールアウト、可用性の向上を目的とした分散資源取得スケジューリング方式として、図6に示すように、キューを追記部(Q1〜Q4),レコード取得主体をフィルタ部(F1〜F6)とし、それぞれを分散するプロセス構成で実現し、系内のプロセス構成を管理する情報部(アクト)1が系内のプロセス構成を記録したプロセスリストをマルチキャストで系内の全プロセスに配信することでプロセスの生存状況や新規プロセスの追加状況を確認し、最新のプロセス構成に更新したプロセスリストを配信することを定期的に行い、追記部(Q1〜Q4)ではクライアントから入力されたレコードに対して時刻印を付与した後でキューとしてレコードを管理し、フィルタ部(F1〜F6)では情報部(アクト)1からのマルチキャストで受信したプロセスリストの中から追記部(キュー)の一覧を取得し、ラウンドロビンアルゴリズムによって先頭のキューから順番にレコードを取得し、次のレコード取得を繰り返し、各キューの処理待ちレコードを取得する(例えば、非特許文献1参照)。
しかしながら、上記の方式には以下のような問題点がある。 However, the above method has the following problems.
(1)全てのレコード取得主体が、初期接続するキューが同じで、その後、順番に接続するキューも同じため、一定の周期で特定のキューにレコード取得主体からのアクセスが集中し、レコードが溜まり続けるキューとレコード取得が空振りし続けるキューの二極化が発生する。 (1) Since all record acquisition subjects have the same initial connection queue, and the subsequent connection queues are also the same, access from the record acquisition subject concentrates in a specific queue at regular intervals, and records accumulate. Bipolarization of the queue that continues and the queue where record acquisition continues to fluctuate occurs.
(2)キューからのレコード取得時に全てのキューに順番に接続してレコードを取得しようとするため、特定のキューで空振りが連続している場合には、レコードが存在しないキューに対するレコード取得処理がバックプレッシャーとなり(一般にレコード取得処理では複数のレコード取得主体が同じレコードを同時に取得できないように排他的なロック処理を行う必要があり、キューに対する頻繁なロック処理がバックプレッシャーの原因となる)、当該キューへの新たなレコードの入力を妨げる。 (2) When a record is acquired from a queue, it tries to acquire records by connecting to all the queues in order, so if there is a continuous idle in a specific queue, the record acquisition process for the queue where no record exists Back pressure (generally, in record acquisition processing, it is necessary to perform exclusive lock processing so that multiple record acquisition subjects cannot acquire the same record at the same time, frequent lock processing on the queue causes back pressure), Prevent new records from entering the queue.
本発明は、上記の点に鑑みなされたもので、1つ以上のキューと1つ以上のレコード取得主体が分散配置されている分散コンピューティング環境において、
(1)一定の周期で特定のキューにレコード取得主体からのアクセスが集中することを防ぎ、
(2)連続で空振りが発生しているキューに対するレコード取得を抑止することにより、各キューのレコード入力スループットを低減させず、各キューの処理待ちレコード数(残レコード数)の合計を最小する分散資源スケジューリング方式を実現することが可能な分散資源取得スケジューリングシステム及びレコード取得プログラムを提供することを目的とする。
The present invention has been made in view of the above points. In a distributed computing environment in which one or more queues and one or more record acquisition entities are distributed,
(1) It prevents the access from the record acquisition subject from being concentrated in a specific queue in a certain cycle,
(2) Dispersion that minimizes the total number of records waiting to be processed (number of remaining records) in each queue without reducing the record input throughput of each queue by suppressing record acquisition for queues that are continuously idle An object of the present invention is to provide a distributed resource acquisition scheduling system and a record acquisition program capable of realizing a resource scheduling method.
図1は、本発明の原理構成図である。 FIG. 1 is a principle configuration diagram of the present invention.
本発明(請求項1)は、少なくとも1つ以上のキューに不規則な間隔でレコードが入力される分散コンピューティング環境において、少なくとも1つ以上のレコード取得主体が存在し、各レコード取得主体が他のレコード取得主体とキュー及びレコードに関する情報の共有または交換をすることなく、独立かつ並行に1つ以上のキューに順番に接続し、各キューからレコードを取得する分散資源取得スケジューリングシステムであって、
少なくとも1つ以上のレコード取得主体は、
キュー接続先リスト、残レコード数カウンタ、連続空振りカウンタ、スルーカウンタ、ウェイト開始時刻、レコード取得抑止時間を格納する記憶手段150と、
レコード取得先のキューの一覧を記録したキュー接続先リストを受信し、記憶手段に格納するキュー接続先リスト受信手段110と、
キューに接続して指定された件数のレコードを先入れ先出し(FIFO)でキューから取得するレコード取得手段120と、
レコード取得手段120により同一キューに対して前回のレコード取得時に取得したキューの記憶手段150内の残レコード数カウンタの数と今回のレコード取得時に取得したキューの残レコード数から当該キューのレコード増加率あるいは増加数を計算するレコード増加率計算手段130と、
同一キューに対するレコード取得時の記憶手段150内の連続空振りカウンタの回数に応じて当該キューからレコードを取得する処理を抑止するレコード取得抑止手段140と、
を有する。
According to the present invention (claim 1), in a distributed computing environment in which records are input at irregular intervals in at least one or more queues, at least one record acquisition entity exists, and each record acquisition entity is another A distributed resource acquisition scheduling system that sequentially connects to one or more queues independently and in parallel without acquiring or sharing information about the queue and records with the record acquisition subject of
At least one record acquisition subject is
A storage means 150 for storing a queue connection destination list, a remaining record counter, a continuous idle counter, a through counter, a wait start time, and a record acquisition suppression time;
A queue connection destination
A record acquisition means 120 that connects to the queue and acquires a specified number of records from the queue in a first-in first-out (FIFO);
The record increase rate of the queue from the number of remaining record counters in the storage means 150 of the queue acquired when the
A record
Have
また、本発明(請求項2)は、レコード取得手段120において、
記憶手段150のキュー接続先リストに記載されているキューの中から1番目に接続するキューをランダムに決定する手段と、
2番目以降に接続するキューについて1番目に接続したキューを基点として、キュー接続先リストに記載されたキューの中からラウンドロビン方式に従って順番に接続し、当該キューからレコードを取得する手段と、を含む。
Further, the present invention (Claim 2) is the record acquisition means 120,
Means for randomly determining a queue to be connected first among the queues described in the queue connection destination list of the storage means 150;
A means for obtaining a record from the queue connected in order according to the round robin method from the queues listed in the queue connection destination list, with the queue connected first as a base for the queues connected after the second Including.
また、本発明(請求項3)は、接続先のキューに取得すべきレコードが存在しない場合(=残レコード数が0件の場合)には、記憶手段150の当該キューの連続空振りカウンタを1加算し、一方、当該キューに取得すべきレコードが存在する(レコードの取得ができた)場合には、当該キューの該連続空振りカウンタを0にセットする手段と、
当該キューの連続空振りカウンタが第1の関数の計算結果Nに達した場合は、記憶手段内の当該キューのスルーカウンタを予め規定した回数Xにセットし、次回以降、当該キューからレコードを取得する代わりに当該キューの該スルーカウンタを1減算し、当該キューの該スルーカウンタが0になった時点で、レコード取得手段による通常のレコード取得処理に戻る手段と、を有するレコード取得抑止手段140を有する。
Further, according to the present invention (Claim 3), when there is no record to be acquired in the connection destination queue (= when the number of remaining records is 0), the continuous idle counter of the queue in the
When the continuous idle counter of the queue reaches the calculation result N of the first function, the through counter of the queue in the storage means is set to a predetermined number X, and records are acquired from the queue from the next time onward. Instead, the record acquisition inhibiting means 140 has a means for decrementing the through counter of the queue by 1 and returning to the normal record acquisition processing by the record acquisition means when the through counter of the queue becomes 0. .
また、本発明(請求項4)は、接続先のキューに取得すべきレコードが存在しない場合(=残レコード数が0件の場合)には、記憶手段150の当該キューの連続空振りカウンタを1加算し、一方、当該キューに取得すべきレコードが存在する(レコードの取得ができた)場合には、当該キューの該連続空振りカウンタに0をセットする手段と、
当該キューの連続空振りカウンタが第1の関数の計算結果Nに達した場合は、記憶手段150内の当該キューのウェイト開始時刻に現在時刻を設定し、次回以降、当該キューからレコードを取得する代わりに当該キューの該ウェイト開始時刻とその時点での時刻を比較し、その差が予め規定した時間Yミリ秒を超えた時点で、レコード取得手段120による通常のレコード取得処理を行う手段と、を有するレコード取得抑止手段140を有する。
Further, according to the present invention (Claim 4), when there is no record to be acquired in the connection destination queue (= when the number of remaining records is 0), the continuous idling counter of the queue in the
When the continuous idle counter of the queue reaches the calculation result N of the first function, the current time is set as the wait start time of the queue in the
また、本発明(請求項5)は、レコード取得抑止手段140において、
所定の回数だけ当該キューからのレコード取得を抑止する間に、
レコード増加率計算手段130により計算された当該キューのレコード増加率あるいは増加数αに応じて決まる正数を返す第2の関数の計算結果を、記憶手段150内の当該キューのスルーカウンタの新たな値として設定する手段を含む。
Further, the present invention (Claim 5) is the record acquisition inhibiting means 140,
While deterring record acquisition from the queue a predetermined number of times,
The calculation result of the second function that returns a positive number determined according to the record increase rate or the increase number α of the queue calculated by the record increase
また、本発明(請求項6)は、レコード取得抑止手段140において、
所定の時間だけ当該キューからのレコード取得を抑止する間に、
レコード増加率計算手段130により計算された当該キューのレコード増加率あるいは増加数αに応じて決まる正数を返す第3の関数の計算結果を、記憶手段150内の当該キューのレコード取得抑止時間の新たな値として設定する手段を含む。
Further, the present invention (Claim 6) is provided in the record acquisition inhibiting means 140,
While suppressing the acquisition of records from the queue for a predetermined time,
The calculation result of the third function that returns a positive number determined according to the record increase rate or the increase number α of the queue calculated by the record increase
本発明(請求項7)は、請求項1乃至6のいずれか1項に記載の分散資源取得スケジューリングシステムにおけるレコード取得主体を構成する各手段としてコンピュータを機能させるレコード取得プログラムである。 The present invention (Claim 7) is a record acquisition program for causing a computer to function as each means constituting a record acquisition subject in the distributed resource acquisition scheduling system according to any one of Claims 1 to 6.
上記のように本発明によれば、少なくとも1つ以上のキューと少なくとも1つ以上のレコード取得主体とを分散コンピューティング環境上に配置し、レコード取得先のキューの一覧を記録したキュー接続先リストを受信し、キュー接続先リストに記載されたキューに順番に接続して指定された件数のレコードを先入れ先出し(FIFO)でキューから取得し、同一キューに対して前回のレコード取得時に取得したキューの残レコード数と今回のレコード取得時に取得したキューの残レコード数から当該キューのレコード増加率あるいは増加数を計算し、同一キューに対するレコード取得時の連続空振り回数に応じて、当該キューからレコードを取得する処理を抑止することで、各キューのレコード入力スループットを低減させず、各キューの処理待ちレコード数(残レコード数)の合計を最小にする。 As described above, according to the present invention, at least one queue and at least one record acquisition subject are arranged on the distributed computing environment, and a queue connection destination list in which a list of record acquisition destination queues is recorded. Are connected to the queues listed in the queue connection destination list in order, and the specified number of records are obtained from the queue by first-in first-out (FIFO). Calculate the record increase rate or increase number of the queue from the number of remaining records and the number of remaining records in the queue acquired at the time of the current record acquisition, and acquire records from the queue according to the number of consecutive idling times when acquiring records for the same queue By suppressing this process, the record input throughput of each queue is not reduced, Management waiting for the number of records the total of (number of remaining records) to a minimum.
さらに、キュー接続先リストに記載されているキューの中から1番目に接続するキューをランダムに決定し、2番目以降に接続するキューは1番目に接続したキューを基点として、キュー接続先リストに記載されたキューの中からラウンドロビン方式に従って順番に接続し、当該キューからレコードを取得する。 Further, the queue to be connected first is randomly determined from the queues connected to the queue connection destination list, and the queues connected to the second and subsequent queues are set in the queue connection destination list based on the queue connected first. The queues are sequentially connected from the described queues according to the round robin method, and records are acquired from the queues.
加えて、接続先のキューに取得すべきレコードが存在しない場合(残レコード数が0件の場合)には、当該キューの連続空振りカウンタを1ずつ加算し、一方、当該キューに取得すべきレコードが存在する(レコードの取得ができた)場合には、当該キューの連続空振りカウンタを0にリセットし、当該キューの連続空振りカウンタが第1の関数の計算結果に達した場合は、当該キューのスルーカウンタを予め規定した回数Xにセットし、次回以降、当該キューからレコードを取得する代わりに、当該キューのスルーカウンタを1ずつ減算し、当該キューのスルーカウンタが0になった時点で通常のレコード取得処理に戻ることで、当該キューからのレコード取得を一定回数抑止する。 In addition, when there is no record to be acquired in the connection destination queue (when the number of remaining records is 0), the continuous idling counter of the queue is incremented by 1, while the record to be acquired in the queue Is present (record has been acquired), the continuous idle counter of the queue is reset to 0, and when the continuous idle counter of the queue reaches the calculation result of the first function, Instead of acquiring a record from the queue next time, set the through counter to a predetermined number of times X, and subtract the through counter of the queue one by one, and when the through counter of the queue reaches 0, By returning to the record acquisition process, the record acquisition from the queue is suppressed a certain number of times.
また、接続先のキューに取得すべきレコードが存在しない場合(残レコード数が0件の場合)には当該キューの連続空振りカウンタを1ずつ加算し、一方、当該キューに取得すべきレコードが存在する(レコードの取得ができた)場合には当該キューの連続空振りカウンタを0にリセットし、当該キューの連続空振りカウンタが第1の関数の計算結果Nに達した場合は、当該キューのウェイト開始時刻に現在時刻を設定し、次回以降、当該キューからレコードを取得する代わりに当該キューのウェイト開始時刻とその時点での時刻を比較し、その差が予め規定した時間Yミリ秒を超えた時点で通常のレコード取得処理に戻ることで当該キューからのレコード取得を一定時間抑止する。 In addition, when there is no record to be acquired in the connection destination queue (when the number of remaining records is 0), the continuous idling counter of the queue is incremented by 1, while there is a record to be acquired in the queue. When the record is acquired (the record has been acquired), the continuous idle counter of the queue is reset to 0, and when the continuous idle counter of the queue reaches the calculation result N of the first function, the wait of the queue starts Set the current time as the time, and compare the wait start time of the queue with the current time instead of acquiring a record from the queue from the next time, and when the difference exceeds the predefined time Y milliseconds Returning to the normal record acquisition process in step S1 suppresses record acquisition from the queue for a certain period of time.
更に、レコード取得を一定回数抑止する間に、計算した当該キューのレコード増加率あるいは増加数αに応じて決まる正数を返す第2の関数の計算結果を当該キューのスルーカウンタの新たな値として設定する。 Furthermore, the calculation result of the second function that returns a positive number determined according to the calculated record increase rate or the increase number α of the queue while suppressing record acquisition for a certain number of times is used as a new value of the through counter of the queue. Set.
また、レコード取得を一定時間抑止する間に、計算した当該キューのレコード増加率あるいは増加数αに応じて決まる正数を返す第3の関数の計算結果を当該キューのレコード取得抑止時間の新たな値として設定することで、
(1)レコード取得主体からのアクセスが集中することを防ぐことができ、
(2)連続で空振りが発生しているキューに対するレコード取得を一定回数または一定時間抑止することができ、更に、レコード取得処理を抑止中でも当該キューに一定以上のレコード入力があった場合にはレコード取得を抑止する残り回数または残り時間を減らすことにより、各キューのレコード入力スループットを低減させず、各キューの処理待ちレコード数(残レコード数)の合計を最小にする分散資源スケジューリングシステムを実現することが可能である。
While the record acquisition is suppressed for a certain period of time, the calculation result of the third function that returns a positive number determined according to the calculated record increase rate or the increase number α of the queue is used as the new record acquisition suppression time of the queue. By setting it as a value,
(1) It is possible to prevent concentration of access from the record acquisition subject,
(2) It is possible to suppress record acquisition for a queue that has been continuously idle for a certain number of times or for a certain period of time, and even if record acquisition processing is suppressed, if there is more than a certain number of records input to the queue, Realizes a distributed resource scheduling system that minimizes the total number of records waiting to be processed (number of remaining records) in each queue without reducing the record input throughput of each queue by reducing the remaining number of times or the remaining time to suppress acquisition It is possible.
以下、図面と共に本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図2は、本発明の一実施の形態における分散資源取得スケジューリングシステムの構成を示す。 FIG. 2 shows a configuration of a distributed resource acquisition scheduling system according to an embodiment of the present invention.
同図に示す分散資源取得スケジューリングシステムは、不規則な間隔でレコードが入力される1つ以上のキュー200と1つ以上のレコード取得主体1001,1002,1003、…から構成され、分散コンピューティング環境上に配置される。
The distributed resource acquisition scheduling system shown in the figure is composed of one or
レコード取得主体100は、キュー接続先リスト受信部110、レコード取得部120、レコード増加率計算部130、レコード取得抑止部140及び、キュー接続先リスト、残レコード数カウンタ、連続空振りカウンタ、スルーカウンタ、ウェイト開始時刻、レコード取得抑止時間を格納するメモリ150から構成される。
The record acquisition subject 100 includes a queue connection destination
キュー接続先リスト受信部110は、レコード取得先のキューの一覧を記録したキュー接続先リストを受信する。
The queue connection destination
レコード取得部120は、キュー接続先リストに記載されたキューに順番に接続して指定された件数のレコードを先入れ先出し(FIFO)でキュー200から取得する。
The
レコード増加率計算部130は、同一キューに対して前回のレコード取得時に取得したキューの残レコード数と今回のレコード取得時に取得したキューの残レコード数から当該キューのレコード増加率あるいは増加数を計算する。
The record increase
レコード取得抑止部140は、同一キューに対するレコード取得時の連続空振り回数に応じて当該キューからレコードを取得する処理を抑止する。
The record
上記のように、本実施の形態の分散資源スケジューリングシステムは、不規則な間隔でレコードが入力される1つ以上のキュー200と1つ以上のレコード取得主体100から構成され、キュー200は、入力されたレコードに時刻印を付与し、先入れ先出し(FIFO)でレコードを管理する。
As described above, the distributed resource scheduling system according to the present embodiment includes one or
メモリ150内に格納される接続先リストには、接続すべきキューの一覧が記録され、また、残レコード数カウンタ、連続空振りカウンタ、スルーカウンタ、ウェイト開始時刻、レコード取得抑止時間の各エントリは、キュー接続先リスト中の該当するキューと関連付けられている。
In the connection destination list stored in the
図3は、本発明の一実施の形態におけるレコード取得主体が各キューからレコードを取得する動作のフローチャートである。 FIG. 3 is a flowchart of an operation in which a record acquisition entity acquires a record from each queue according to an embodiment of the present invention.
ステップ101) レコード取得主体100は、キュー接続先リスト受信部110において、レコード取得先のキューの一覧を記録したキュー接続先リストを受信し、メモリ150に格納する。
Step 101) In the queue connection destination
ステップ102) レコード取得部120は、メモリ150に格納されたキュー接続先リストの中から1番目に接続するキューをランダムに決定する。
Step 102) The
ステップ103) レコード取得部120は、キューに接続して指定された件数のレコードを先入れ先出し(FIFO)で取得する。特に指定がなければ最も古いレコードを1件取得する。
Step 103) The
ステップ104) レコード取得部120は、キュー接続先リストの順次アクセスポインタを1つ進め、次に接続するキューをラウンドロビン方式により決定する。上記のステップ103,104を繰り返し、キュー接続先リストのキュー200に接続し、レコードを取得する。
Step 104) The
なお、上記では、各レコード取得主体100がラウンドロビン方式に従ってキュー接続先リストの中のキューに順番に接続しているが、例えば、各キューの残レコード数やレコード増加率あるいは増加数、サーバ負荷などの情報から各キューの重みを計算し、ラウンドロビン方式の代わりに重み点きラウンドロビン方式に従って次に接続するキューを決定することも可能である。 In the above, each record acquisition subject 100 is connected to the queues in the queue connection destination list in order according to the round robin method. For example, the number of remaining records, the record increase rate or the increase number of each queue, server load It is also possible to calculate the weight of each queue from such information and determine the next queue to be connected according to the weighted round robin method instead of the round robin method.
次に、上記のステップ103の処理についてキュー200からレコードを取得する動作を説明する。レコードを取得する動作は、図4と図5に示す2つの方法が考えられる。
Next, an operation for acquiring a record from the
まず、最初に図4において、キュー200からのレコード取得の空振りを抑えるための方法を説明する。
First, referring to FIG. 4, a method for suppressing idling of record acquisition from the
図4は、本発明の一実施の形態におけるレコード取得動作のフローチャート(その1)である。 FIG. 4 is a flowchart (part 1) of the record acquisition operation according to the embodiment of the present invention.
ステップ201) レコード取得部120は、キュー200に接続する。
Step 201) The
ステップ202) レコード取得部120は、接続したキューから当該キューの第1の残レコード数を取得する(残レコード数の取得処理はキューのその瞬間の残レコード数を参照するだけなので、排他的なロック処理は必要なく、複数のレコード取得主体が同時に残レコード数を取得することも可能であり、排他的なロック処理を伴うレコード取得処理に比べると非常に軽い処理である)。
Step 202) The
ステップ203) レコード取得抑止部140は、メモリ150内の当該キューのスルーカウンタが0であれば、次のステップ204の処理を行い、当該キューのスルーカウンタが0でなければ(レコード取得抑止中であれば)、ステップ210の処理を行う。
Step 203) If the through counter of the queue in the
ステップ204) 上記の第1の残レコード数が1件以上存在すれば、ステップ205に移行し、残レコード数が0であればステップ207に移行する。 Step 204) If there is one or more first remaining record numbers, the process proceeds to step 205. If the remaining record number is 0, the process proceeds to step 207.
ステップ205) レコード取得部120は、当該キュー200からレコードを取得する。
Step 205) The
ステップ206) メモリ150内の当該キューの連続空振りカウンタを0にし、ステップ212に移行する。
Step 206) The continuous idling counter of the queue in the
ステップ207) ステップ204において、残レコード数が0の場合は、メモリ150内の当該キューの連続空振りカウンタに1加算する。
Step 207) In Step 204, when the number of remaining records is 0, 1 is added to the continuous idle counter of the queue in the
ステップ208) メモリ150内の連続空振りカウンタが第1の関数の計算結果N以上の場合は、ステップ209に移行し、そうでない場合は、ステップ212に移行する。
Step 208) If the continuous idling counter in the
ステップ208) ステップ208において、連続空振りカウンタがN以上である場合は、ステップ209に移行し、そうでない場合は、ステップ212に移行する。 Step 208) If the continuous idling counter is equal to or greater than N in step 208, the process proceeds to step 209. Otherwise, the process proceeds to step 212.
ステップ209) レコード取得抑止部140は、メモリ150の当該キューのスルーカウンタに規定回数Xを設定する(上記の第1の関数は当該キューの単位時間あたりの入力レコード数やレコード取得主体100のサーバ負荷などの情報からNの値を計算する関数であり、当該キューの単位時間あたりの入力レコード数の増加に反してNを小さくし、レコード取得主体100のサーバ負荷の増加に応じてNを大きくする関数が考えられる。例えば、
(レコード取得主体のサーバ負荷)/(当該キューの単位時間当たりの入力レコード数)などが考えられるが、第1の関数がNを定数として返すことも可能である)。ステップ212に移行する。
Step 209) The record
(The server load of the record acquisition subject) / (the number of input records per unit time of the queue) can be considered, but the first function can also return N as a constant). Control goes to step 212.
ステップ210) ステップ203において、スルーカウンタが0でない場合は、レコード増加率計算部130において、上記の第1の残レコード数と当該キューの残レコード数カウンタに記録された第2の残レコード数からレコード増加率あるいは増加数αを計算する。
Step 210) If the through counter is not 0 in Step 203, the record increase
ステップ211) レコード増加率計算部130は、メモリ150内の当該キューのスルーカウンタに第2の関数の計算結果をセットする。ここで、第2の関数はレコード増加率あるいは増加数αに応じて決まる正数を返す関数で、αが大きいほど当該キューのスルーカウンタの値の減少幅を大きくする関数である。例えば、当該キューの現在のスルーカウンタの値をAとすると、A−bα(bは係数、計算結果が負数の場合は0を返す)などの関数が考えられる。また、αの値が閾値Mを超えたかどうかで関数を変えることも可能である。
Step 211) The record increase
ステップ212) 上記の第1の残レコード数を当該キューの残レコードカウンタにセットする。 Step 212) The first remaining record number is set in the remaining record counter of the queue.
上記のように、図4に示す方法は、レコード取得の空振りを抑えるための処理であり、メモリ150のスルーカウンタが正値の場合は、キュー200からレコードを取得しないで、増加率によってスルーカウンタ値を減少させていく。スルーカウンタの値が0になると、レコード取得を試みるが、空振りがN回連続するとスルーカウンタの値を正値に設定して次回はレコード取得をしないようにするものである。
As described above, the method shown in FIG. 4 is a process for suppressing the fluctuating record acquisition. When the through counter of the
次に、もう一つのレコード取得方法について説明する。この方法は、上記の図4で用いたスルーカウンタの代わりにウェイト開始時刻を管理して、レコード取得を抑える方法を説明する。 Next, another record acquisition method will be described. In this method, a method of suppressing the record acquisition by managing the wait start time instead of the through counter used in FIG. 4 will be described.
図5は、本発明の一実施の形態におけるレコード取得動作のフローチャート(その2)である。 FIG. 5 is a flowchart (part 2) of the record acquisition operation according to the embodiment of the present invention.
ステップ301) レコード取得部120は、キュー200に接続する。
Step 301) The
ステップ302) レコード取得部120は、接続したキューから当該キューの第1の残レコード数を取得する(残レコード数の取得処理はキューのその瞬間の残レコード数を参照するだけなので、排他的なロック処理は必要なく、複数のレコード取得主体が同時に残レコード数を取得することも可能であり、排他的なロック処理を伴うレコード取得処理に比べると非常に軽い処理である)。
(Step 302) The
ステップ303) レコード取得抑止部140は、現在時刻とメモリ150のウェイト開始時刻を参照して、現在時刻と当該キューのウェイト開始時刻の差が当該キューのレコード取得抑止時間(ミリ秒)を超えていれば、次のステップ304の処理を行い、現在時刻と当該キューのウェイト開始時刻の差が当該キューのレコード取得抑止時間(ミリ秒)を超えていなければステップ311に移行する。
Step 303) The record
ステップ304) 上記の第1の残レコード数が1件以上存在すれば、ステップ305に移行し、残レコードが0件の場合は、ステップ307に移行する。 Step 304) If there is one or more first remaining records, the process proceeds to step 305. If there are no remaining records, the process proceeds to step 307.
ステップ305) レコード取得部120は、当該キューからレコードを取得する。
Step 305) The
ステップ306) メモリ150内の当該キューの連続空振りカウンタを0にし、ステップ313に移行する。
Step 306) The continuous idling counter of the queue in the
ステップ307) レコード取得抑止部140は、メモリ150を参照して、上記の第1の残レコード数が0件の場合は、当該キューの連続空振りカウンタに1加算する。
Step 307) The record
ステップ308) レコード取得抑止部140は、連続空振りカウンタが第1の関数の計算結果N以上の場合は、ステップ309に移行し、そうでない場合はステップ313に移行する。
Step 308) When the continuous idling counter is equal to or greater than the calculation result N of the first function, the record
ステップ309) レコード取得抑止部140は、メモリ150内の当該キューのウェイト開始時刻に現在時刻をセットする。
Step 309) The record
ステップ310) レコード取得抑止部140は、当該キューのレコード取得抑止時間に規定の時間Y(Yはレコード取得抑止時間の初期値である)をセットする(上記の第1の関数は当該キューの単位時間あたりの入力レコード数やレコード取得主体100のサーバ負荷などの情報からNの値を計算する関数であり、当該キューの単位時間あたりの入力レコード数の増加に反してNを小さくし、レコード取得主体100のサーバ負荷の増加に応じてNを大きくする関数が考えられる。例えば、
(レコード取得主体のサーバ負荷)/(当該キューの単位時間当たりの入力レコード数)などが考えられるが、第1の関数がNを定数として返すことも可能である)。ステップ313に移行する。
Step 310) The record
(The server load of the record acquisition subject) / (the number of input records per unit time of the queue) can be considered, but the first function can also return N as a constant). The process proceeds to step 313.
ステップ311) ステップ303において、現在時刻とウェイト開始時刻の差がレコード取得抑止時間を越えていない場合は、レコード増加率計算部130において、第1の残レコード数と当該キューの残レコード数カウンタに記録された第2の残レコード数からレコード増加率あるいは増加数αを計算する。
Step 311) In step 303, if the difference between the current time and the wait start time does not exceed the record acquisition suppression time, the record increase
ステップ312) レコード増加率計算部130は、当該キューに対するレコード取得抑止時間に第3の関数の計算結果をセットする。ここで、第3の関数は、レコード増加率あるいは増加数αに応じて決まる正数を返す関数で、αが大きいほど当該キューのレコード取得抑止時間の値の減少値を大きくする関数である。例えば、当該キューの現在のレコード取得抑止時間をTとすると、T−cα(cは係数、計算結果が負数の場合は0を返す)等の関数が考えられる。また、αの値が閾値Lを超えたかどうかで関数を変えることも可能である。
Step 312) The record increase
ステップ313) 上記の第1の残レコード数をメモリ150内の当該キューの残レコード数カウンタにセットする。
Step 313) The above first remaining record number is set in the remaining record number counter of the queue in the
上記のように、図5の方法は、図4のスルーカウンタの代わりに、メモリ150内でウェイト開始時刻を管理し、所定の時間の間はレコードを取得しないようにするものである。
As described above, the method of FIG. 5 manages the wait start time in the
なお、上記の図2のレコード取得主体100の構成要素の動作をプログラムとして構築し、レコード取得主体として利用されるコンピュータにインストールして実行させる、または、ネットワークを介して流通させることが可能である。
Note that the operations of the components of the
また、構築されたプログラムをハードディスクや、フレキシブルディスク・CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールする、または、配布することが可能である。 Further, the constructed program can be stored in a portable storage medium such as a hard disk, a flexible disk, or a CD-ROM, and can be installed or distributed in a computer.
なお、本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において種々変更・応用が可能である。 The present invention is not limited to the above-described embodiment, and various modifications and applications can be made within the scope of the claims.
本発明は、分散コンピューティング技術に適用可能である。 The present invention is applicable to distributed computing technology.
100 レコード取得主体
110 キュー接続先リスト受信手段、キュー接続先リスト受信部
120 レコード取得手段、レコード取得部
130 レコード増加率計算手段、レコード増加率計算部
140 レコード取得抑止手段、レコード取得抑止部
150 記憶手段、メモリ
200 キュー
100
Claims (7)
前記少なくとも1つ以上のレコード取得主体は、
キュー接続先リスト、残レコード数カウンタ、連続空振りカウンタ、スルーカウンタ、ウェイト開始時刻、レコード取得抑止時間を格納する記憶手段と、
レコード取得先のキューの一覧を記録したキュー接続先リストを受信し、前記記憶手段に格納するキュー接続先リスト受信手段と、
前記キューに接続して指定された件数のレコードを先入れ先出し(FIFO)でキューから取得するレコード取得手段と、
前記レコード取得手段により同一キューに対して前回のレコード取得時に取得したキューの前記記憶手段内の前記残レコード数カウンタの数と今回のレコード取得時に取得したキューの残レコード数から当該キューのレコード増加率あるいは増加数を計算するレコード増加率計算手段と、
同一キューに対するレコード取得時の前記記憶手段内の前記連続空振りカウンタの回数に応じて当該キューからレコードを取得する処理を抑止するレコード取得抑止手段と、
を有することを特徴とする分散資源取得スケジューリングシステム。 In a distributed computing environment in which records are input to at least one or more queues at irregular intervals, at least one or more record acquisition entities exist, and each record acquisition entity relates to other record acquisition entities and queues and records. A distributed resource acquisition scheduling system that connects to one or more queues independently and in parallel without acquiring or sharing information, and acquiring records from each queue,
The at least one record acquisition subject is:
A storage means for storing a queue connection destination list, a remaining record counter, a continuous idle counter, a through counter, a wait start time, and a record acquisition suppression time;
A queue connection destination list receiving means for receiving a queue connection destination list in which a list of queues of record acquisition destinations is recorded, and storing the queue connection destination list in the storage means;
Record acquisition means for acquiring a specified number of records connected to the queue from the queue by first-in first-out (FIFO);
The number of records in the queue is increased from the number of remaining record counters in the storage means of the queue acquired at the time of the previous record acquisition for the same queue by the record acquisition means and the number of remaining records in the queue acquired at the time of the current record acquisition. A record increase rate calculation means for calculating a rate or an increase number;
Record acquisition suppression means for suppressing the process of acquiring records from the queue according to the number of consecutive idle counters in the storage means at the time of record acquisition for the same queue;
A distributed resource acquisition scheduling system comprising:
前記記憶手段の前記キュー接続先リストに記載されているキューの中から1番目に接続するキューをランダムに決定する手段と、
2番目以降に接続するキューについて1番目に接続したキューを基点として、前記キュー接続先リストに記載されたキューの中からラウンドロビン方式に従って順番に接続し、当該キューからレコードを取得する手段と、
を含む請求項1記載の分散資源取得スケジューリングシステム。 The record acquisition means includes
Means for randomly determining a queue to be connected first among the queues described in the queue connection destination list of the storage means;
A means for acquiring records from the queues connected in order according to the round robin method from the queues described in the queue connection destination list, with the first connected queue as the base point for the second and subsequent queues;
The distributed resource acquisition scheduling system according to claim 1.
当該キューの前記連続空振りカウンタが第1の関数の計算結果Nに達した場合は、前記記憶手段内の当該キューの前記スルーカウンタを予め規定した回数Xにセットし、次回以降、当該キューからレコードを取得する代わりに当該キューの該スルーカウンタを1減算し、当該キューの該スルーカウンタが0になった時点で、前記レコード取得手段による通常のレコード取得処理に戻る手段と、
を有するレコード取得抑止手段を有する
請求項2記載の分散資源取得スケジューリングシステム。 If there is no record to be acquired in the connection destination queue (= the number of remaining records is 0), 1 is added to the continuous idle counter of the queue in the storage means, while the record should be acquired in the queue. If there is a record (record can be obtained), means for setting the continuous idle counter of the queue to 0;
When the continuous idle counter of the queue reaches the calculation result N of the first function, the through counter of the queue in the storage means is set to a predetermined number of times X, and the record from the queue is recorded next time. Means for subtracting 1 from the through counter of the queue and returning to normal record acquisition processing by the record acquisition means when the through counter of the queue reaches 0,
The distributed resource acquisition scheduling system according to claim 2, further comprising: a record acquisition suppression unit including:
当該キューの前記連続空振りカウンタが第1の関数の計算結果Nに達した場合は、前記記憶手段内の当該キューの前記ウェイト開始時刻に現在時刻を設定し、次回以降、当該キューからレコードを取得する代わりに当該キューの該ウェイト開始時刻とその時点での時刻を比較し、その差が予め規定した時間Yミリ秒を超えた時点で、前記レコード取得手段による通常のレコード取得処理を行う手段と、
を有するレコード取得抑止手段を有する
請求項2記載の分散資源取得スケジューリングシステム。 If there is no record to be acquired in the connection destination queue (= the number of remaining records is 0), 1 is added to the continuous idle counter of the queue in the storage means, while the record should be acquired in the queue. If there is a record (record acquisition has been successful), means for setting the continuous idle counter of the queue to 0;
When the continuous idle counter of the queue reaches the calculation result N of the first function, the current time is set to the wait start time of the queue in the storage means, and the record is acquired from the queue after the next time. Instead of performing the normal record acquisition process by the record acquisition means when the wait start time of the queue is compared with the time at that time and the difference exceeds a predetermined time Y milliseconds; ,
The distributed resource acquisition scheduling system according to claim 2, further comprising: a record acquisition suppression unit including:
所定の回数だけ当該キューからのレコード取得を抑止する間に、
前記レコード増加率計算手段により計算された当該キューのレコード増加率あるいは増加数αに応じて決まる正数を返す第2の関数の計算結果を、前記記憶手段内の当該キューの前記スルーカウンタの新たな値として設定する手段を含む
請求項3記載の分散資源取得スケジューリングシステム。 The record acquisition inhibiting means is
While deterring record acquisition from the queue a predetermined number of times,
The calculation result of the second function that returns a positive number determined according to the record increase rate or the increase number α of the queue calculated by the record increase rate calculation means is used as the new value of the through counter of the queue in the storage means. 4. The distributed resource acquisition scheduling system according to claim 3, further comprising means for setting as a correct value.
所定の時間だけ当該キューからのレコード取得を抑止する間に、
前記レコード増加率計算手段により計算された当該キューのレコード増加率あるいは増加数αに応じて決まる正数を返す第3の関数の計算結果を、前記記憶手段内の当該キューの前記レコード取得抑止時間の新たな値として設定する手段を含む
請求項4記載の分散資源取得スケジューリングシステム。 The record acquisition inhibiting means is
While suppressing the acquisition of records from the queue for a predetermined time,
The calculation result of the third function that returns a positive number determined according to the record increase rate or the increase number α of the queue calculated by the record increase rate calculation means is the record acquisition suppression time of the queue in the storage means. 5. The distributed resource acquisition scheduling system according to claim 4, further comprising means for setting as a new value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007306430A JP4758412B2 (en) | 2007-11-27 | 2007-11-27 | Distributed resource acquisition scheduling system and record acquisition program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007306430A JP4758412B2 (en) | 2007-11-27 | 2007-11-27 | Distributed resource acquisition scheduling system and record acquisition program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009129372A JP2009129372A (en) | 2009-06-11 |
JP4758412B2 true JP4758412B2 (en) | 2011-08-31 |
Family
ID=40820188
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007306430A Expired - Fee Related JP4758412B2 (en) | 2007-11-27 | 2007-11-27 | Distributed resource acquisition scheduling system and record acquisition program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4758412B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112085868A (en) * | 2020-09-18 | 2020-12-15 | 陕西千山航空电子有限责任公司 | Multi-acquisition recording system time synchronization method and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1097432A (en) * | 1996-09-20 | 1998-04-14 | Fujitsu Ltd | Round robin system |
JP4238142B2 (en) * | 2004-01-15 | 2009-03-11 | 株式会社日立製作所 | Program component processing request queue configuration method, program component registration method and execution control method, program component registration program and execution control program, and application server |
-
2007
- 2007-11-27 JP JP2007306430A patent/JP4758412B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009129372A (en) | 2009-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11347549B2 (en) | Customer resource monitoring for versatile scaling service scaling policy recommendations | |
CN108733509B (en) | Method and system for backing up and restoring data in cluster system | |
US8719297B2 (en) | System for managing data collection processes | |
US8812639B2 (en) | Job managing device, job managing method and job managing program | |
JP6126099B2 (en) | Marketplace for timely event data distribution | |
US20170109200A1 (en) | Method for scheduling user request in distributed resource system, and apparatus | |
US9477618B2 (en) | Information processing device, information processing system, storage medium storing program for controlling information processing device, and method for controlling information processing device | |
US7783747B2 (en) | Method and apparatus for improving cluster performance through minimization of method variation | |
US20160321292A1 (en) | Distributed resource contention detection and handling | |
WO2006102354A3 (en) | Apparatus and methods for providing queue messaging over a network | |
US9292336B1 (en) | Systems and methods providing optimization data | |
US20120158451A1 (en) | Dispatching Tasks in a Business Process Management System | |
US20170078049A1 (en) | Freshness-sensitive message delivery | |
CN108491255B (en) | Self-service MapReduce data optimal distribution method and system | |
US10684901B2 (en) | Data store device and data management method | |
JP4758412B2 (en) | Distributed resource acquisition scheduling system and record acquisition program | |
JP4392665B2 (en) | Cluster system performance prediction apparatus, performance prediction method, and performance prediction program | |
CN111597056B (en) | Distributed scheduling method, system, storage medium and equipment | |
US9824130B1 (en) | Optimizing synchronization of enterprise content management systems | |
US20080195447A1 (en) | System and method for capacity sizing for computer systems | |
JP6280237B2 (en) | Computer system and data processing method | |
Master et al. | An infinite dimensional model for a many server priority queue | |
Vincent et al. | Perfect simulation of index based routing queueing networks | |
FR2995705A1 (en) | Method for preparation of sequence of execution for data processing program of service, involves assigning set of atomic sequences and atomic subtasks so that each task of program is executed in duration of temporal frame | |
JP5517294B2 (en) | Execution control method and execution control apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100208 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110525 |
|
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: 20110531 |
|
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: 20110602 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140610 Year of fee payment: 3 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |