JP2006190022A - Flow control method of transmitting and receiving processing - Google Patents

Flow control method of transmitting and receiving processing Download PDF

Info

Publication number
JP2006190022A
JP2006190022A JP2005000653A JP2005000653A JP2006190022A JP 2006190022 A JP2006190022 A JP 2006190022A JP 2005000653 A JP2005000653 A JP 2005000653A JP 2005000653 A JP2005000653 A JP 2005000653A JP 2006190022 A JP2006190022 A JP 2006190022A
Authority
JP
Japan
Prior art keywords
processing
transmission
queue
reception
reception processing
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.)
Pending
Application number
JP2005000653A
Other languages
Japanese (ja)
Inventor
Yasushi Kamito
康司 上戸
Katsunori Hijioka
克典 肱岡
Daisuke Suzuki
大介 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2005000653A priority Critical patent/JP2006190022A/en
Publication of JP2006190022A publication Critical patent/JP2006190022A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve throughput while shortening processing time by performing appropriate balance control of each process of receiving and transmitting, and performing batch processing in highly-loaded time. <P>SOLUTION: A memory queue 16 for delivering transactions is arranged between a receiving processing process 15 and a transmitting processing process 17, and both the processes confirm the resource using state of the queue, and control the balance between the processes based on an index value such as "accumulation rate of queue" to the total usable block number of the queue, or "increased/decreased case number of queue" or "increase rate of queue" calculated by comparing the state of the queue in each processing of the last time and this time. The transaction number to be batch-processed is changed to reduce I/O synchronous processing frequency and CPU processing time required for the I/O synchronous processing. According to this, CPU resources can be appropriately distributed to each process at highly-loaded time to improve the throughput. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、送受信処理のフロー制御方法に係り、特に、オンラインシステムのトランザクション処理における送受信処理のフロー制御方法に関する。   The present invention relates to a flow control method for transmission / reception processing, and more particularly to a flow control method for transmission / reception processing in transaction processing of an online system.

オンラインシステムにおけるトランザクション量の増加に対応するための方法に関する従来技術として、例えば、特許文献1、特許文献2等に記載された技術が知られている。   As conventional techniques relating to a method for dealing with an increase in transaction volume in an online system, for example, techniques described in Patent Literature 1, Patent Literature 2, and the like are known.

特許文献1に記載の従来技術は、ノード間で処理を分散させる方法に関するもので、各ノードのCPU負荷値、メモリ負荷値、ディスク負荷値と言ったリソース資源の負荷値を監視して、処理負荷の少ないノードに負荷を分散させるというものである。   The prior art described in Patent Document 1 relates to a method for distributing processing among nodes, and monitors the load values of resource resources such as CPU load values, memory load values, and disk load values of each node to perform processing. The load is distributed to nodes with a low load.

また、特許文献2に記載の従来技術は、高負荷時に受信処理を優先して受信メッセージの取りこぼしを回避し、受信メッセージが一定時間途絶えた時点で、メッセージ受信連絡を継続して行い、その時点で内部処理を行うというものである。   The prior art described in Patent Document 2 prioritizes reception processing at high load to avoid receiving messages, and continues to receive messages when the received messages are interrupted for a certain period of time. This is an internal process.

また、ノード内における各プロセス間でのトランザクション処理のバランス制御を行う方法に関する技術として、受信処理専用プロセスと送信処理専用プロセスとを保有し、各プロセスがトラフィック量に応じて動作した自身のCPU使用時間を監視して、適宜スリープ制御することにより、各プロセス間でスリープ中のCPUを受け渡す方法が知られている。そして、この技術は、特許文献2に記載されているような、各プロセス間にメッセージキューを配置してメッセージを受け渡す手段を実装している。
特開2000−137692号公報 特開平11−282783号公報
In addition, as a technique related to a method for performing a balance control of transaction processing between processes in a node, a dedicated process for reception processing and a dedicated process for transmission processing are used, and each process uses its own CPU that operates according to the amount of traffic. There is known a method of transferring a sleeping CPU between processes by monitoring time and appropriately performing sleep control. This technique implements a means for delivering a message by arranging a message queue between processes as described in Patent Document 2.
JP 2000-137692 A JP-A-11-282784

前述した特許文献1に記載の従来技術は、ノードを増加してトランザクション量の増加に対処するというものであり、保有するハードウェア資産のみでは処理能力を上げることができないという問題点を有しており、また、特許文献2に記載の従来技術は、高負荷が継続すると受信メッセージが大量に蓄積されてしまい、メモリ資源を圧迫する上、未処理のメッセージがノード内部に滞在する時間が増して、処理のリアルタイム性が失われてしまうという問題点を有している。   The prior art described in Patent Document 1 described above is to cope with an increase in transaction volume by increasing nodes, and has a problem that it is not possible to increase the processing capability only with the possessed hardware assets. In addition, according to the prior art described in Patent Document 2, a large amount of received messages are accumulated when a high load continues, and the memory resources are compressed, and the time that unprocessed messages stay inside the node increases. However, there is a problem that the real-time property of the process is lost.

また、一般のノード内における各プロセス間でのトランザクション処理バランス制御方法の技術は、一定のトランザクション量に対してはCPUを効率的にプロセス間で配分しあうことができるが、マシンのCPU能力を超える高負荷状態が継続した場合、トランザクションの処理が追いつかず、システム内部に未処理メッセージが蓄積されていってしまうという問題点を有している。   In addition, the technology of the transaction processing balance control method between processes in a general node can efficiently allocate CPUs among processes for a certain transaction amount, but the CPU capacity of a machine is reduced. When a high load state exceeding the above continues, there is a problem that transaction processing cannot catch up and unprocessed messages are accumulated in the system.

本発明の目的は、前述した従来技術の問題点を解決し、受信、送信の各プロセスの適切なバランス制御を行い、高負荷時には一括処理を行うことにより、処理時間を短縮してスループットを向上させることができるようにしたオンラインシステムのトランザクション処理における送受信処理のフロー制御方法を提供することにある。   The object of the present invention is to solve the above-mentioned problems of the prior art, perform appropriate balance control of each process of reception and transmission, and perform batch processing at high load, thereby shortening processing time and improving throughput. An object of the present invention is to provide a flow control method for transmission / reception processing in transaction processing of an online system that can be performed.

本発明によれば前記目的は、受信処理プロセスと送信処理プロセスとの双方が、受信したトランザクションを蓄えるメモリキューのリソース状態を確認して、キューの総使用可能ブロック数に対する「キューの蓄積率」や前回処理時と今回処理時とにおけるキューの状態を比較して算出した「キューの増減件数」や「キューの増加率」と言った指標値をもとにプロセス間のバランスを制御することにより達成される。   According to the present invention, the object is that both the reception processing process and the transmission processing process confirm the resource state of the memory queue that stores the received transaction, and the “queue accumulation rate” with respect to the total number of usable blocks in the queue. Or by controlling the balance between processes based on index values such as “number of queue changes” and “queue increase rate” calculated by comparing the queue status between the previous process and the current process. Achieved.

また、前記目的は、キューに蓄積されたデータによって使用されているブロック数が一定値を超えた場合に、一括して処理するデータの処理件数を前述のバランス制御に基づいて変動させ、I/O同期処理回数とI/O同期処理とに掛かるCPU処理時間を低減することにより達成される。   Further, the object is to change the number of data to be collectively processed based on the above balance control when the number of blocks used by the data accumulated in the queue exceeds a certain value, This is achieved by reducing the CPU processing time required for the number of O synchronization processes and the I / O synchronization process.

すなわち、本発明によれば前記目的は、受信処理プロセスと送信処理プロセスとの間にメモリキューを備え、前記受信処理プロセスと送信処理プロセスとの間で受信データに対する処理を施したデータを受け渡すコンピュータシステムにおける送受信処理のフロー制御方法において、前記メモリキューの使用状況に応じて、1回の送受信処理で扱う送信件数を変動させ、送受信のシステム同期点処理に費やすトータル時間を調整することにより達成される。   That is, according to the present invention, the object is to provide a memory queue between the reception processing process and the transmission processing process, and to pass data processed on the received data between the reception processing process and the transmission processing process. In the flow control method of transmission / reception processing in a computer system, it is achieved by adjusting the total time spent for system synchronization point processing of transmission / reception by changing the number of transmissions handled in one transmission / reception processing according to the usage status of the memory queue Is done.

さらに、前記目的は、受信処理プロセスと送信処理プロセスとの間にメモリキューを備え、前記受信処理プロセスと送信処理プロセスとの間で受信データに対する処理を施したデータを受け渡すコンピュータシステムにおける送受信処理のフロー制御方法において、前記受信プロセスが、メモリキューに蓄積されているデータの増減件数の指数乗に比例して自身のスリープ時間を調整すると共に、自受信プロセスをスリープさせるタイミングをメモリキューの蓄積件数により決定し、前記送信プロセスが、メモリキューの蓄積率とキュー蓄積率の増加率とに基づいて、一括して送信する送信件数を、予め定めた送信数計算テーブルにより決定し、メモリキューの蓄積件数に応じて自送信プロセスのスリープ時間を調整することにより達成される。   Further, the object is to provide a transmission / reception process in a computer system that includes a memory queue between the reception processing process and the transmission processing process, and delivers data processed for the reception data between the reception processing process and the transmission processing process. In this flow control method, the reception process adjusts its sleep time in proportion to the exponential power of the increase / decrease number of data stored in the memory queue, and stores the timing at which the reception process sleeps in the memory queue. The transmission process determines the number of transmissions to be transmitted in a batch based on a memory queue accumulation rate and a queue accumulation rate increase rate using a predetermined transmission number calculation table, This is achieved by adjusting the sleep time of the self-sending process according to the number of stored messages. .

本発明によれば、受信処理プロセスと送信処理プロセスとの双方が、トランザクションを処理する都度、キューの状態を監視して適切なバランス制御を行うため、キューを圧迫するのを未然に防止でき、システムを健全な状態に保つことができる。   According to the present invention, each time the reception processing process and the transmission processing process process a transaction, the state of the queue is monitored and appropriate balance control is performed, so that it is possible to prevent the queue from being compressed in advance. The system can be kept healthy.

また、本発明によれば、通常負荷時には、着信したトランザクションを順次処理することにより、トランザクションがノード内部に滞在する時間を短くすることを優先して作用させることができ、高負荷時には、負荷量に応じた一括トランザクション方法によりI/O処理回数を少なくして、スループットが向上するように作用させることができるので、トラフィック状況に応じて最適なトランザクション処理を実現することができる。   Further, according to the present invention, it is possible to give priority to shortening the time during which a transaction stays inside a node by sequentially processing incoming transactions at normal load, and load amount at high load. The number of I / O processes can be reduced by the collective transaction method according to the conditions so that the throughput can be improved. Therefore, the optimum transaction process can be realized according to the traffic situation.

以下、本発明による送受信処理のフロー制御方法の実施形態を図面により詳細に説明する。   Embodiments of a flow control method for transmission / reception processing according to the present invention will be described below in detail with reference to the drawings.

図1は本発明の一実施形態による送受信処理のフロー制御を実施するコンピュータシステムの構成を示すブロック図である。図1において、11、11’はLAN、12はOS、13はオンライントランザクション制御処理プログラム(OLTP)、14はTCP/IP通信ソフトウェア、15は受信処理プロセス、16はメモリキュー、17は送信処理プロセス、18はコンピュータシステムである。   FIG. 1 is a block diagram showing a configuration of a computer system that performs flow control of transmission / reception processing according to an embodiment of the present invention. In FIG. 1, 11 and 11 ′ are LANs, 12 is an OS, 13 is an online transaction control processing program (OLTP), 14 is TCP / IP communication software, 15 is a reception processing process, 16 is a memory queue, and 17 is a transmission processing process. , 18 is a computer system.

図1に示すコンピュータシステム18は、オンライントランザクション処理を実施するものであり、受信したトランザクションデータをノード(コンピュータシステム18)の内部で加工処理を行って送信する処理を実行するものである。内部処理の例としては、専用プロトコル変換、回線サービス変換、データ暗号化、データ分析、データ振分サービス等を挙げることができる。コンピュータシステム18を用いる具体的なシステム構成の例としては、例えば、オンライントランザクション受発注システムとして、複数の機関投資家が持つ端末等から受けた株価注文データを、内部で専用プロトコルに変換して証券会社のサーバに送る等の形態である。   A computer system 18 shown in FIG. 1 performs an online transaction process, and executes a process of processing and transmitting received transaction data within a node (computer system 18). Examples of internal processing include dedicated protocol conversion, line service conversion, data encryption, data analysis, data distribution service, and the like. As an example of a specific system configuration using the computer system 18, for example, as an online transaction ordering / ordering system, stock price order data received from a terminal or the like possessed by a plurality of institutional investors is converted into a dedicated protocol inside the securities. For example, it is sent to a company server.

前述したような内部処理と送受信の処理とを行うコンピュータシステム18は、OS12の下で動作するオンライントランザクション制御処理プログラム13(以下、OLTPという)とTCP/IP通信対応ソフトウェア14とを用いたソフトウェアにより構成される。OLTP13は、データベースの一貫性を保つため、トランザクション更新前と更新後の状態をトランザクション処理単位に保存する。これを同期点処理と言うが、この同期点処理に費やす時間は、ファイルI/O処理を伴うことにより非常に大きいことが知られており、また、1件単位に同期点処理を行うより、複数件を纏めて同期点処理を行う方が、その処理における全体の総処理時間は短くなり、処理効率が向上するという特性がある。   The computer system 18 that performs internal processing and transmission / reception processing as described above is based on software using an online transaction control processing program 13 (hereinafter referred to as OLTP) that operates under the OS 12 and TCP / IP communication compatible software 14. Composed. The OLTP 13 stores the state before and after the transaction update in the transaction processing unit in order to maintain the consistency of the database. This is called sync point processing, but the time spent for this sync point processing is known to be very large due to file I / O processing. When the synchronization point process is performed collectively, the total processing time in the process is shortened, and the processing efficiency is improved.

そして、図1に示すコンピュータシステム18は、前述したソフトウェア構成の下に受信処理を行う受信処理プロセス15と送信処理を行う送信処理プロセス17とからなり、両プロセス間にデータを受け渡すためのメモリキュー16を配置して構成されたバッファリング方式のものである。そして、受信処理プロセス15は、LAN11から到来するトランザクションを受信し、受信したデータをメモリキュー16に一旦格納する。送信処理プロセス17は、メモリキュー16に格納されたデータをLAN11’に送信する。なお、LAN11、11’は、異なるものであっても、同一のものであってもよい。前述したような送受信フローの途中で、OLTP13は、受信処理プロセス15または送信処理プロセス17と連携して、受信したトランザクションに対して前述で挙げたような各種の内部処理を加える。   The computer system 18 shown in FIG. 1 includes a reception processing process 15 that performs reception processing and a transmission processing process 17 that performs transmission processing under the above-described software configuration, and a memory for passing data between the two processes. The buffering system is configured by arranging the queue 16. The reception process 15 receives a transaction coming from the LAN 11 and temporarily stores the received data in the memory queue 16. The transmission processing process 17 transmits the data stored in the memory queue 16 to the LAN 11 ′. Note that the LANs 11 and 11 'may be different or the same. In the middle of the transmission / reception flow as described above, the OLTP 13 cooperates with the reception processing process 15 or the transmission processing process 17 to add various internal processes as described above to the received transaction.

図2は受信処理プロセスと送信処理プロセスとのバランス制御について説明する図である。この図には、受信処理プロセス15が行う処理フローの概念と送信処理プロセス17が行う処理フローの概念とを示しており、これらの詳細については、図3、図4に示すフローにより後述する。ここでは、各プロセスでの処理について簡単に説明する。   FIG. 2 is a diagram for explaining the balance control between the reception process and the transmission process. In this figure, the concept of the processing flow performed by the reception processing process 15 and the concept of the processing flow performed by the transmission processing process 17 are shown. Details of these will be described later with reference to the flowcharts shown in FIGS. Here, processing in each process will be briefly described.

受信処理プロセス15は、データを受信してそのデータをメモリキュー16に書き込んだ後、メモリキュー16の蓄積状態(蓄積ブロック数)を確認して、図3に示す受信処理プロセスのバランス制御フローに基づいてスリープ時間を計算する。その後、受信処理プロセス15は、トランザクション処理状態を保存するためのシステム同期点処理を行った後、計算したスリープ時間分スリープする。   The reception processing process 15 receives the data and writes the data to the memory queue 16, and then checks the storage state (the number of storage blocks) in the memory queue 16 to obtain the balance control flow of the reception processing process shown in FIG. Calculate sleep time based on. Thereafter, the reception processing process 15 performs system synchronization point processing for saving the transaction processing state, and then sleeps for the calculated sleep time.

また、送信処理プロセス17は、図4に示す送信処理プロセスのバランス制御フローに基づき、メモリキュー16の蓄積状態(蓄積ブロック数)を確認して一括送信処理件数を計算する。その後、送信処理プロセス17は、一括送信処理件数分のデータをメモリキュー16から取り出して、データ送信を行った後、トランザクション処理状態を保存するためのシステム同期点処理を行い、判断基準に応じてスリープする。   Further, the transmission processing process 17 checks the accumulation state (the number of accumulated blocks) of the memory queue 16 based on the balance control flow of the transmission processing process shown in FIG. Thereafter, the transmission processing process 17 retrieves the data for the number of batch transmission processing items from the memory queue 16, performs data transmission, performs system synchronization point processing for saving the transaction processing state, and according to the determination criteria. Sleep.

前述した受信処理プロセスと送信処理プロセスとのバランス制御において、内部処理は、受信処理プロセスでのデータ受信の処理とメモリキュー書き込みの処理との間、または、送信処理プロセスでのメモリキュー取り出しの処理とデータ送信の処理との間で行われる。   In the above-described balance control between the reception processing process and the transmission processing process, the internal processing is performed between the data reception processing and the memory queue writing processing in the reception processing process, or the memory queue extraction processing in the transmission processing process. And data transmission processing.

図3は受信処理プロセス15での処理動作の詳細を説明するフローチャートであり、次に、これについて説明する。なお、ここで説明する処理は、図2に示す受信処理プロセス15での「キュー蓄積状態確認」、「バランス制御ルールに基づきスリープ時間計算」、「スリープ」の処理である。   FIG. 3 is a flowchart for explaining the details of the processing operation in the reception processing process 15, which will be described next. The processes described here are the processes of “queue accumulation state confirmation”, “sleep time calculation based on balance control rule”, and “sleep” in the reception process 15 shown in FIG.

(1)まず、受信したデータをメモリキュー16に書き込むために新たに使用したメモリキュー16のブロック数を確認する(ステップ301)。 (1) First, the number of blocks of the memory queue 16 newly used for writing the received data to the memory queue 16 is confirmed (step 301).

(2)受信処理プロセスと送信処理プロセスとのバランス制御に必要な各種の情報を格納している共用メモリから蓄積ブロック数318と前回スリープ時間317とを読み込む。前回スリープ時間317は、受信処理プロセス15が前回処理時にスリープした時間を表す変数である。蓄積ブロック数318は、メモリキューの蓄積状況をブロック数で表したもので、受信処理プロセスと送信処理プロセスとの双方により更新される変数である(ステップ302)。 (2) The accumulated block number 318 and the previous sleep time 317 are read from the shared memory storing various information necessary for balance control between the reception process and the transmission process. The previous sleep time 317 is a variable representing the time during which the reception process 15 has gone to sleep during the previous process. The accumulation block number 318 represents the accumulation state of the memory queue by the number of blocks, and is a variable updated by both the reception process and the transmission process (step 302).

(3)ステップ302の処理で読み出した蓄積ブロック数に今回受信したデータで使用されるブロック数を加算して、現在蓄積ブロック数を計算する(ステップ303)。 (3) The number of blocks used in the data received this time is added to the number of storage blocks read in the process of step 302 to calculate the current number of storage blocks (step 303).

(4)受信処理プロセスが前回の処理時点で確認した蓄積ブロック数321を読み込む(ステップ304)。 (4) The number of stored blocks 321 confirmed by the reception processing process at the previous processing time is read (step 304).

(5)ステップ303の処理で計算したメモリキューの現在蓄積ブロック数から、ステップ304の処理で読み込んだ前回の処理時点の蓄積ブロック数321を引き算して、ブロック数の増減(差分)を計算する(ステップ305)。 (5) The increase / decrease (difference) in the number of blocks is calculated by subtracting the number of stored blocks 321 at the time of the previous processing read in step 304 from the current number of blocks stored in the memory queue calculated in step 303. (Step 305).

(6)次に、メモリキューの現在蓄積ブロック数が予め設定した閾値(境界値)319を越えたか否かを確認する。この閾値(境界値)319は、初期に設定した後は更新されない値であり、メモリキューの蓄積ブロック数が一定値以上を超えた場合にフロー制御を発動させるために定める値であり、図2に示すキュー蓄積件数境界値(閾値)24に該当する。この値は、メモリキューの総使用可能ブロック数に対して割合が大き過ぎると、フロー制御が殆ど発動されず、CPUリソースの有効な配分が行われ難くなるが、逆に小さ過ぎると、フロー制御の発動が頻繁に行われ、却ってシステムリソースの有効活用を抑制することがあるので、これを考慮して設定する(ステップ306)。 (6) Next, it is confirmed whether or not the number of currently accumulated blocks in the memory queue exceeds a preset threshold value (boundary value) 319. This threshold value (boundary value) 319 is a value that is not updated after initial setting, and is a value that is determined to activate flow control when the number of accumulated blocks in the memory queue exceeds a certain value. This corresponds to the queue accumulation number boundary value (threshold value) 24 shown in FIG. If this value is too large relative to the total number of usable blocks in the memory queue, flow control is hardly activated, and it becomes difficult to perform effective allocation of CPU resources. Is frequently performed, and on the contrary, effective utilization of system resources may be suppressed. Therefore, the setting is made in consideration of this (step 306).

(7)ステップ306の確認で、メモリキューの現在蓄積ブロック数が閾値を越えていた場合、次に、ステップ305の処理で計算したブロック増減(差分)を評価して、蓄積ブロック数が増加または変動しない傾向にあるか減少する傾向にあるかを判断する(ステップ307)。 (7) If the current accumulated block number in the memory queue exceeds the threshold value in the confirmation in step 306, then the block increase / decrease (difference) calculated in the process in step 305 is evaluated, and the accumulated block number increases or It is determined whether there is a tendency not to change or a tendency to decrease (step 307).

(8)ステップ307の判断で、蓄積ブロック数が増加または変動しない傾向にあった場合、受信処理プロセスに対して、今回スリープさせる時間を、例えば、
今回スリープ時間[秒]=前回スリープ時間+増減ブロック数2 ×スリープ単価
として算出する(ステップ308)。
(8) If it is determined in step 307 that the number of accumulated blocks does not tend to increase or fluctuate, the time to sleep this time for the reception processing process,
This time sleep time [seconds] = previous sleep time + number of increase / decrease blocks 2 × sleep unit price (step 308).

(9)ステップ307の判断で、蓄積ブロック数が減少する傾向にあった場合、受信処理プロセスに対して、今回スリープさせる時間を、例えば、
今回スリープ時間[秒]=前回スリープ時間−増減ブロック数2 ×スリープ単価
として算出する(ステップ309)。
(9) If there is a tendency for the number of accumulated blocks to decrease in the determination in step 307, the time to sleep this time for the reception processing process is, for example,
This time sleep time [seconds] = previous sleep time−number of increase / decrease blocks 2 × sleep unit price (step 309).

前述したステップ308、309での処理における今回スリープ時間の算出に使用するスリープ単価320は、マシン性能に応じてユーザチューニングを可能とする予め定められた値であり、予め定めて初期に設定した後は更新されない値である。また、前述のスリープ時間の計算式は、増減ブロック数の指数乗(前述の例では2乗としているが、任意数乗に設定されてよい)として、急速な増減傾向に対処したものである。また、算出される今回スリープ時間に上限値または下限値を設けてもよい。   The sleep unit price 320 used for the calculation of the current sleep time in the processing in steps 308 and 309 described above is a predetermined value that enables user tuning according to the machine performance, and is set in advance and initially set. Is a value that is not updated. In addition, the above-mentioned calculation formula for the sleep time is one that addresses a rapid increase / decrease tendency as an exponential power of the number of increase / decrease blocks (in the above example, it is square, but may be set to an arbitrary power). Further, an upper limit value or a lower limit value may be provided for the calculated current sleep time.

なお、受信処理プロセス側をスリープさせる目的は、送信処理プロセス側へのCPUリソース配分率を増加させ、送信処理プロセスによるメモリキューからのデータ取り出し処理を優先させるためである。   Note that the purpose of putting the reception processing process side to sleep is to increase the CPU resource allocation rate to the transmission processing process side and to prioritize the data extraction processing from the memory queue by the transmission processing process.

(10)ステップ308、309での今回スリープ時間算出の処理の後、算出した今回スリープ時間で、前回スリープ時間317のパラメータを更新する(ステップ310)。 (10) After the current sleep time calculation process in steps 308 and 309, the parameter of the previous sleep time 317 is updated with the calculated current sleep time (step 310).

(11)次に、蓄積ブロック数318、前回処理時の蓄積ブロック数321の両パラメータを、ステップ303の処理で求めた現在蓄積ブロック数に更新する(ステップ311)。 (11) Next, both parameters of the number of storage blocks 318 and the number of storage blocks 321 at the time of the previous process are updated to the current number of storage blocks obtained in the process of step 303 (step 311).

(12)その後、ステップ310、ステップ311の処理で更新した各パラメータの値を共用メモリに書き込んで保存し、ステップ308またはステップ309の処理で算出した今回スリープ時間分、受信処理プロセスをスリープさせて、ここでの処理を終了する(ステップ312、313)。 (12) After that, the value of each parameter updated in the processing of step 310 and step 311 is written and stored in the shared memory, and the reception processing process is put to sleep for the current sleep time calculated in the processing of step 308 or step 309. The processing here is terminated (steps 312 and 313).

(13)ステップ306の判定で、メモリキューの現在蓄積ブロック数が閾値を越えていなかった場合、前回スリープ時間317のパラメータをリセット(0を設定)する。なお、前回スリープ時間317の初期値は0であるとする(ステップ314)。 (13) If it is determined in step 306 that the number of currently accumulated blocks in the memory queue does not exceed the threshold, the parameter of the previous sleep time 317 is reset (set to 0). It is assumed that the initial value of the previous sleep time 317 is 0 (step 314).

(14)次に、蓄積ブロック数318、前回処理時の蓄積ブロック数321の両パラメータを、ステップ303の処理で求めた現在蓄積ブロック数に更新する(ステップ315)。 (14) Next, both parameters of the storage block number 318 and the storage block number 321 at the time of the previous processing are updated to the current storage block number obtained in the process of step 303 (step 315).

(15)その後、ステップ314、ステップ315の処理で更新した各パラメータの値を共用メモリに書き込んで保存し、ここでの処理を終了する(ステップ316)。 (15) After that, the values of the parameters updated in the processing of step 314 and step 315 are written and stored in the shared memory, and the processing here ends (step 316).

図4は送信処理プロセス17での処理動作の詳細を説明するフローチャートであり、次に、これについて説明する。なお、ここで説明する処理は、図2に示す「送信処理プロセス17での「送信数計算テーブル参照」、「バランス制御ルールに基づき一括送信処理件数を計算」、「スリープ」の処理である。   FIG. 4 is a flowchart for explaining the details of the processing operation in the transmission processing process 17. This will be described next. The processes described here are the processes of “refer to transmission number calculation table in transmission process 17”, “calculate the number of batch transmission processes based on balance control rules”, and “sleep” shown in FIG.

(1)まず、共用メモリより蓄積ブロック数411とキューの総使用可能ブロック数413とを読み込む。蓄積ブロック数411は、メモリキューの蓄積状況をブロック数で表したもので、受信処理プロセスと送信処理プロセスとの双方から更新される変数である。また、キューの総使用可能ブロック数413は、メモリキューに割当てるリソース容量から決定されるブロック数であり、予め定めて設定した後は更新されない値である(ステップ401)。 (1) First, the storage block number 411 and the total usable block number 413 of the queue are read from the shared memory. The accumulation block number 411 represents the accumulation state of the memory queue by the number of blocks, and is a variable updated from both the reception processing process and the transmission processing process. The total usable block count 413 of the queue is the number of blocks determined from the resource capacity allocated to the memory queue, and is a value that is not updated after predetermined setting (step 401).

(2)次に、今回処理時のメモリキューの蓄積率(キューの総使用可能ブロック数に対する使用ブロック数)を、
(蓄積ブロック数/総使用可能ブロック数)×100
として計算する(ステップ402)。
(2) Next, the storage rate of the memory queue at the time of the current processing (the number of used blocks with respect to the total number of usable blocks in the queue),
(Number of accumulated blocks / total number of usable blocks) × 100
(Step 402).

(3)次に、共用メモリから前回処理時のキューの蓄積率412の値を読み込む。なお、前回処理時のキューの蓄積率412の値は、1〜100(≠0)の値であるとする(ステップ403)。 (3) Next, the value of the queue accumulation rate 412 at the previous processing is read from the shared memory. It is assumed that the value of the queue accumulation rate 412 at the time of the previous processing is a value of 1 to 100 (≠ 0) (step 403).

(4)次に、メモリキューの蓄積率の増加率(前回処理時のメモリキュー蓄積率に対する今回処理時のメモリキュー蓄積率の増分)を計算する。なお、ここでの計算の詳細とその考え方については、図5を参照して後述する(ステップ404)。 (4) Next, an increase rate of the memory queue storage rate (increase of the memory queue storage rate at the current processing relative to the memory queue storage rate at the previous processing) is calculated. The details of the calculation here and the concept thereof will be described later with reference to FIG. 5 (step 404).

(5)その後、ステップ402の処理で計算した今回処理時のメモリキューの蓄積率と、ステップ404の処理で計算したメモリキュー増加率とに基づいて、図6に示す共用メモリ内の送信数計算テーブルを参照し、1つのトランザクションで処理する件数(一括送信処理件数)を決定する。なお、送信数計算テーブルの詳細は、図6を参照して後述する(ステップ405)。 (5) Thereafter, the number of transmissions in the shared memory shown in FIG. 6 is calculated based on the storage rate of the memory queue at the time of the current process calculated in the process of step 402 and the memory queue increase rate calculated in the process of step 404. Referring to the table, the number of cases to be processed in one transaction (the number of batch transmission processes) is determined. Details of the transmission number calculation table will be described later with reference to FIG. 6 (step 405).

(6)次に、前回処理時のキューの蓄積率412のパラメータに対して、ステップ402の処理で計算した今回処理時のメモリキューの蓄積率により共用メモリを更新する(ステップ406)。 (6) Next, the shared memory is updated with the storage rate of the memory queue at the current process calculated in the process of step 402 with respect to the parameter of the storage rate 412 of the queue at the previous process (step 406).

(7)次に、蓄積ブロック数411のパラメータに対して、ステップ405の処理で決定した一括送信処理件数を引き算した値を、新たな蓄積ブロック数411として共用メモリを更新する(ステップ407)。 (7) Next, the shared memory is updated with the value obtained by subtracting the batch transmission processing number determined in step 405 as the new storage block number 411 for the parameter of storage block number 411 (step 407).

前述した処理を実行することにより、一括送信処理件数を決定することができ、引き続き、決定された一括送信処理件数に基づいたスリープ時間を決定する処理が行われるので、つぎに、これについて説明する。   By executing the processing described above, the number of batch transmission processing cases can be determined, and the process of determining the sleep time based on the determined number of batch transmission processing cases is subsequently performed. This will be described next. .

(8)ステップ407の処理で更新した蓄積ブロック数411のパラメータと、通常時の一括送信処理件数414とを共用メモリから読み込む。通常時の一括送信処理件数414は、予め定めて設定した後は更新されない値であり、送信処理プロセスが1回の処理でメモリキューから何件のデータ(ブロック)を取り出して処理をするかを表す基準値である。(ステップ408)。 (8) The parameter of the storage block number 411 updated in the process of step 407 and the normal batch transmission processing number 414 are read from the shared memory. The normal batch transmission processing number 414 is a value that is not updated after being set in advance, and indicates how many data (blocks) the transmission processing process takes out from the memory queue for processing in one process. The reference value to represent. (Step 408).

(9)次に、蓄積ブロック数411と通常時の一括送信処理件数414とを比較し、蓄積ブロック数411が通常時の一括送信処理件数414より大きいか否かを判定する。なお、ここでの比較判定は、通常時の一括送信処理件数(ブロック数)=通常時の一括送信処理件数1データ当り1ブロックを使用するものとして行う(ステップ409)。 (9) Next, the storage block number 411 is compared with the normal batch transmission processing number 414 to determine whether the storage block number 411 is larger than the normal batch transmission processing number 414. Here, the comparison determination is performed on the assumption that the number of normal batch transmission processing (number of blocks) = the number of normal batch transmission processing uses one block per data (step 409).

(10)ステップ409の判定で、蓄積ブロック数411が、通常時の一括送信処理件数414に満たない場合、共用メモリよりスリープ時間415を読み込み、送信処理プロセスを、その時間だけスリープさせることとして、ここでの処理を終了する。このスリープ時間415は、予め定めて設定した後は更新されない値である(ステップ410)。 (10) When the number of accumulated blocks 411 is less than the normal batch transmission processing number 414 in the determination in step 409, the sleep time 415 is read from the shared memory, and the transmission processing process is set to sleep for that time. The process here ends. The sleep time 415 is a value that is not updated after being set in advance (step 410).

(11)ステップ409の判定で、蓄積ブロック数411が、通常時の一括送信処理件数414より大きかった場合、送信処理プロセスをスリープさせないこととして、ここでの処理を終了する。 (11) If it is determined in step 409 that the number of accumulated blocks 411 is larger than the normal batch transmission processing number 414, the transmission processing process is not put to sleep, and the processing here ends.

送信処理プロセス側をスリープさせる目的は、受信処理プロセス側へのCPUリソース配分率を増やして、受信処理プロセスによるメモリキューへの書込み処理を優先させるためである。これにより、受信処理プロセス側がメモリキューに一定件数を蓄積した時点で、送信処理プロセス側は一括してトランザクション送信処理を行うことができる。なお、データ送信処理で、メモリキューに蓄積されているデータ件数が、通常時の一括送信処理件数414に満たない場合、蓄積されているデータ件数の全ての処理を行う。   The purpose of causing the transmission processing process to sleep is to increase the CPU resource allocation rate to the reception processing process and give priority to the writing process to the memory queue by the reception processing process. As a result, when the reception processing process side accumulates a certain number of records in the memory queue, the transmission processing process side can collectively perform transaction transmission processing. In the data transmission process, when the number of data stored in the memory queue is less than the normal batch transmission processing number 414, all processes of the stored data number are performed.

図5はメモリキューの蓄積率と増加率との考え方を説明すると共に、その計算式を示す図である。ここで説明する計算式は、前述で説明した図4に示すフローのステップ404の処理で使用される。   FIG. 5 is a diagram for explaining the concept of the accumulation rate and the increase rate of the memory queue and showing the calculation formula thereof. The calculation formula described here is used in the process of step 404 of the flow shown in FIG. 4 described above.

メモリキューの前回までの蓄積分としてのブロック数を表す前回蓄積ブロック数を(c)、今回蓄積分としてのブロック数を前回蓄積ブロック数に加えた今回蓄積ブロック数を(b)、キューの総使用可能ブロック数を(a)とすると、メモリキューの使用状況は、図5(a)に示すように表すことができる。そして、一般に、キュー蓄積率[%]は、図5(b)に示すように、
キュー蓄積率[%]=蓄積使用ブロック数/キューの総使用可能ブロック数×100
として表すことができる。
The previous accumulated block number indicating the number of blocks as the previous accumulated number of memory queues is (c), the current accumulated block number obtained by adding the current accumulated block number to the previous accumulated block number (b), and the total number of queues If the number of usable blocks is (a), the usage status of the memory queue can be expressed as shown in FIG. In general, the queue accumulation rate [%] is as shown in FIG.
Queue accumulation rate [%] = Number of accumulated blocks used / Number of total usable blocks in queue x 100
Can be expressed as

このことから、前回処理時のキュー蓄積率は、
前回処理時のキュー蓄積率
=蓄積ブロック数(c)/キューの総使用可能ブロック数(a)×100 ……(1)
として求められ、また、今回処理時のキュー蓄積率は、
今回処理時のキュー蓄積率
=蓄積ブロック数(b)/キューの総使用可能ブロック数(a)×100 ……(2)
として求めることができる。
From this, the queue accumulation rate during the previous process is
Queue accumulation rate at the time of the previous processing = Number of accumulated blocks (c) / Total number of usable blocks in queue (a) x 100 (1)
In addition, the queue accumulation rate at the time of processing this time is
Queue accumulation rate at the time of processing this time = number of accumulated blocks (b) / total number of usable blocks in queue (a) × 100 (2)
Can be obtained as

式(1)、式(2)からメモリキューの蓄積率の増加率は、
キュー増加率[%]
=(今回処理時のキュー蓄積率−前回処理時のキュー蓄積率)/前回処理時のキュー蓄積率
として求めることができる。
From Equation (1) and Equation (2), the increase rate of the memory queue accumulation rate is
Queue increase rate [%]
= (Queue accumulation rate during current processing−queue accumulation rate during previous processing) / queue accumulation rate during previous processing.

図6は送信数計算テーブルの構成例を示す図である。このテーブルは、図4に示すフローのステップ405の処理で、1トランザクションで処理する件数(一括送信処理件数)を決定するために参照される。   FIG. 6 is a diagram illustrating a configuration example of a transmission number calculation table. This table is referred to in order to determine the number of items to be processed in one transaction (the number of batch transmission processing items) in the process of step 405 of the flow shown in FIG.

図6に示す送信数計算テーブルの値は、通常時の一括送信処理件数を仮に10件として定め、この値を基準値とし、基準値に対して増加率と蓄積率の重みを乗じたものである。増加率と蓄積率の重みを、図6のカッコ内に示した値として、この値を用いて、
送信数計算テーブルの値
=基準値×増加率×蓄積率
として算出したものである。
The values in the transmission number calculation table shown in FIG. 6 are determined by assuming that the number of batch transmission processes in normal times is 10, and using this value as a reference value, multiplying the reference value by the weight of the increase rate and the accumulation rate. is there. Using this value as the value shown in parentheses in FIG.
Value of transmission number calculation table = reference value × increase rate × accumulation rate.

但し、このテーブルは、システムの特性に応じてチューニング可能としておく。また、このテーブルは、データ1件あたりで使用するブロック数を1ブロックとして表現し、図の説明を簡易化して示している。なお、蓄積率、増加率は、図4に示すフローの処理により算出されたものである。   However, this table can be tuned according to the system characteristics. Further, this table expresses the number of blocks used per data as one block, and simplifies the description of the figure. The accumulation rate and the increase rate are calculated by the flow process shown in FIG.

前述した本発明の実施形態における各処理は、処理プログラムとして構成することができ、この処理プログラムは、HD、DAT、FD、MO、DVD−ROM、CD−ROM等の記録媒体に格納して提供することができる。   Each processing in the above-described embodiment of the present invention can be configured as a processing program, and this processing program is stored in a recording medium such as HD, DAT, FD, MO, DVD-ROM, and CD-ROM and provided. can do.

本発明の一実施形態による送受信処理のフロー制御を実施するコンピュータシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the computer system which implements the flow control of the transmission / reception process by one Embodiment of this invention. 受信処理プロセスと送信処理プロセスとのバランス制御について説明する図である。It is a figure explaining balance control of a reception processing process and a transmission processing process. 受信処理プロセス15での処理動作の詳細を説明するフローチャートである。10 is a flowchart for explaining details of processing operations in a reception processing process 15; 送信処理プロセス17での処理動作の詳細を説明するフローチャートである。10 is a flowchart for explaining details of a processing operation in a transmission processing process 17; メモリキューの蓄積率と増加率との考え方を説明すると共に、その計算式を示す図である。It is a figure which shows the calculation formula while explaining the view of the accumulation rate and increase rate of a memory queue. 送信数計算テーブルの構成例を示す図である。It is a figure which shows the structural example of a transmission number calculation table.

符号の説明Explanation of symbols

11、11’ LAN
12 OS
13 オンライントランザクション制御処理プログラム(OLTP)
14 TCP/IP通信ソフトウェア
15 受信処理プロセス
16 メモリキュー
17 送信処理プロセス
18 コンピュータシステム
11, 11 'LAN
12 OS
13 Online transaction control processing program (OLTP)
14 TCP / IP communication software 15 Reception processing process 16 Memory queue 17 Transmission processing process 18 Computer system

Claims (3)

受信処理プロセスと送信処理プロセスとの間にメモリキューを備え、前記受信処理プロセスと送信処理プロセスとの間で受信データに対する処理を施したデータを受け渡すコンピュータシステムにおける送受信処理のフロー制御方法において、前記メモリキューの使用状況に応じて、1回の送受信処理で扱う送信件数を変動させ、送受信のシステム同期点処理に費やすトータル時間を調整することを特徴とする送受信処理のフロー制御方法。   In a flow control method of transmission / reception processing in a computer system comprising a memory queue between a reception processing process and a transmission processing process, and passing data processed for reception data between the reception processing process and the transmission processing process, A transmission / reception processing flow control method, characterized by adjusting a total time spent for transmission / reception system synchronization point processing by changing the number of transmissions handled in one transmission / reception processing in accordance with a use state of the memory queue. 前記1回の送受信処理で扱う送信件数を、メモリキューの蓄積率とキュー蓄積率の増加率とをパラメータとして決定することを特徴とする請求項1記載の送受信処理のフロー制御方法。   2. The flow control method for transmission / reception processing according to claim 1, wherein the number of transmissions handled in the single transmission / reception processing is determined using a memory queue accumulation rate and a queue accumulation rate increase rate as parameters. 受信処理プロセスと送信処理プロセスとの間にメモリキューを備え、前記受信処理プロセスと送信処理プロセスとの間で受信データに対する処理を施したデータを受け渡すコンピュータシステムにおける送受信処理のフロー制御方法において、前記受信プロセスは、メモリキューに蓄積されているデータの増減件数の指数乗に比例して自身のスリープ時間を調整すると共に、自受信プロセスをスリープさせるタイミングをメモリキューの蓄積件数により決定し、前記送信プロセスは、メモリキューの蓄積率とキュー蓄積率の増加率とに基づいて、一括して送信する送信件数を、予め定めた送信数計算テーブルにより決定し、メモリキューの蓄積件数に応じて自送信プロセスのスリープ時間を調整することを特徴とする送受信処理のフロー制御方法。   In a flow control method of transmission / reception processing in a computer system comprising a memory queue between a reception processing process and a transmission processing process, and passing data processed for reception data between the reception processing process and the transmission processing process, The reception process adjusts its own sleep time in proportion to the exponential power of the increase / decrease number of data accumulated in the memory queue, and determines the timing for causing the own reception process to sleep according to the accumulation number of the memory queue, Based on the memory queue accumulation rate and the queue accumulation rate increase rate, the transmission process determines the number of transmissions to be sent in a batch by using a predetermined transmission number calculation table, and automatically determines the number of transmissions in the memory queue. Flow control of transmission / reception processing characterized by adjusting sleep time of transmission process Law.
JP2005000653A 2005-01-05 2005-01-05 Flow control method of transmitting and receiving processing Pending JP2006190022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005000653A JP2006190022A (en) 2005-01-05 2005-01-05 Flow control method of transmitting and receiving processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005000653A JP2006190022A (en) 2005-01-05 2005-01-05 Flow control method of transmitting and receiving processing

Publications (1)

Publication Number Publication Date
JP2006190022A true JP2006190022A (en) 2006-07-20

Family

ID=36797171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005000653A Pending JP2006190022A (en) 2005-01-05 2005-01-05 Flow control method of transmitting and receiving processing

Country Status (1)

Country Link
JP (1) JP2006190022A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020528586A (en) * 2019-03-04 2020-09-24 アリババ グループ ホウルディング リミテッド Methods and devices for providing transaction data to blockchain systems for processing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020528586A (en) * 2019-03-04 2020-09-24 アリババ グループ ホウルディング リミテッド Methods and devices for providing transaction data to blockchain systems for processing
US11341493B2 (en) 2019-03-04 2022-05-24 Advanced New Technologies Co., Ltd. Methods and devices for providing transaction data to blockchain system for processing

Similar Documents

Publication Publication Date Title
WO2010100859A1 (en) Distributed system
US7712103B2 (en) Method and system for managing load balancing in data processing system
JP4170302B2 (en) Load control device and load control program
EP3128420B1 (en) Service flow control method, controller and system in object-based storage system
EP2725862A1 (en) Resource allocation method and resource management platform
US20120271943A1 (en) Method, apparatus, and system for scheduling distributed buffer resources
CN111522636A (en) Application container adjusting method, application container adjusting system, computer readable medium and terminal device
CN107302580B (en) Load balancing method and device, load balancer and storage medium
CN105119997A (en) Data processing method of cloud computing system
US9135064B2 (en) Fine grained adaptive throttling of background processes
CN109815204A (en) A kind of metadata request distribution method and equipment based on congestion aware
CN107872480B (en) Big data cluster data balancing method and device
JPH10240548A (en) Task scheduling device and method
JP2006190022A (en) Flow control method of transmitting and receiving processing
JP2007179246A (en) Method, program and server for computer management
CN109582460B (en) Redis memory data elimination method and device
CN107229424B (en) Data writing method for distributed storage system and distributed storage system
TWI718252B (en) Task scheduling method and device
CN109670691A (en) Method, equipment and the customer service system distributed for customer service queue management and customer service
JP5526748B2 (en) Packet processing device, packet distribution device, control program, and packet distribution method
TWI584667B (en) Method for request scheduling and scheduling device
CN112996112B (en) Frequency domain resource allocation method, device, electronic equipment and storage medium
WO2020235055A1 (en) Virtual machine monitoring device, virtual machine monitoring method, and program
CN113805802A (en) Method, server and storage medium for accessing current limit
JP2006113827A (en) Load distribution method by cpu margin management and transaction priority