JP2015185036A - Load distribution method, system, device and program - Google Patents

Load distribution method, system, device and program Download PDF

Info

Publication number
JP2015185036A
JP2015185036A JP2014062675A JP2014062675A JP2015185036A JP 2015185036 A JP2015185036 A JP 2015185036A JP 2014062675 A JP2014062675 A JP 2014062675A JP 2014062675 A JP2014062675 A JP 2014062675A JP 2015185036 A JP2015185036 A JP 2015185036A
Authority
JP
Japan
Prior art keywords
processing
data
executed
devices
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014062675A
Other languages
Japanese (ja)
Other versions
JP6331554B2 (en
Inventor
文浩 谷口
Fumihiro Taniguchi
文浩 谷口
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2014062675A priority Critical patent/JP6331554B2/en
Publication of JP2015185036A publication Critical patent/JP2015185036A/en
Application granted granted Critical
Publication of JP6331554B2 publication Critical patent/JP6331554B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method and system capable of avoiding deterioration of processing capacity of a whole system, and being suitable for load distribution on a confluence.SOLUTION: A system comprises: at least one first device 21 for processing inputted data and outputting processing result data; and a second device 22 for executing processing with respect to the processing result data outputted from the first device 21. The at least one first device 21 grasps a load state of the second device 22, based on a data amount of pieces of data which are in a processing standby state on the second device 22, and the first device 21 executes the processing which is executed on the second device 22 by an amount according to the load state of the second device 22.

Description

本発明は、負荷分散方法とシステムと装置及びプログラムに関する。   The present invention relates to a load balancing method, system, apparatus, and program.

並列動作可能な複数の装置を備えたシステムにおいて、ある装置の出力が複数の装置への入力として振り分けられる部分(分岐部)と、複数の装置からの出力が他のより少数の装置への入力として合流する部分(合流部)を備えたシステムが知られている。例えば、特許文献1には、プロセッサへの伝送路を選択して該伝送路にパケットを出力する分岐部と、各プロセッサからのパケットを合流させる合流部とを備えた情報処理装置が開示されている。   In a system including a plurality of devices capable of operating in parallel, a part (branch unit) in which the output of one device is distributed as an input to the plurality of devices, and the output from the plurality of devices is input to a smaller number of other devices As such, a system including a portion that merges (a merging portion) is known. For example, Patent Document 1 discloses an information processing apparatus including a branching unit that selects a transmission path to a processor and outputs a packet to the transmission path, and a merging unit that merges packets from each processor. Yes.

この種のシステムにおいて、分岐部では、例えば一つの出力元(送信元)の装置からの出力がそれぞれ分岐先の複数の装置のいずれかへの入力として振り分けられる。合流部では、例えば送信元の複数の装置からの出力を例えば待ち行列等で合流させて処理する。なお、複数の装置は、複数のスイッチ等であってもよく、あるいは複数のプロセッサやCPU(Central Processing Unit)コア等であってもよい。   In this type of system, in the branching unit, for example, the output from one output source (transmission source) device is distributed as an input to each of a plurality of branch destination devices. In the merge unit, for example, outputs from a plurality of transmission source devices are merged in, for example, a queue and processed. The plurality of devices may be a plurality of switches or the like, or may be a plurality of processors, a CPU (Central Processing Unit) core, or the like.

特開2000−207382号公報JP 2000-207382 A

以下に関連技術の分析を与える。   The analysis of related technology is given below.

上記した並列動作可能な複数の装置を備えたシステムにおいて、装置間で負荷に偏りがあると、負荷が大きい部分がシステム全体の処理能力のボトルネックとなり得ることが知られている。このため、システムの処理性能を維持するには、装置の負荷は装置間で平均化されていることが望ましい。   In a system including a plurality of devices capable of operating in parallel as described above, it is known that a portion with a large load can become a bottleneck of the processing capacity of the entire system if there is a bias in load among the devices. For this reason, in order to maintain the processing performance of the system, it is desirable that the load on the apparatus is averaged between the apparatuses.

処理の振分を行う分岐部について、振分先の複数の装置間で負荷を平均化する為の負荷分散制御として、例えば、よく知られたラウンドロビン方式(一定時間毎に順番に割り当て、持ち時間が経過すると、再スケジュール対象の最後に回される)等の適用が可能である。   For example, a well-known round robin method (assigned in order at fixed time intervals and possessed as a load balancing control for averaging the load among a plurality of devices to which the branching is performed. When the time elapses, it can be applied to the end of the rescheduling target).

一方、複数の出力を合流する合流部における負荷の制御については、例えば半二重接続のハブやスイッチで用いられるフロー制御方式のバックプレッシャー方式等が知られている。バックプレッシャー方式は、例えば受信バッファがオーバフローしそうな場合、送信元へコリジョン信号を送信してデータ送信を一時的に中断させる等の制御を行う。   On the other hand, with respect to load control at a confluence section that merges a plurality of outputs, for example, a back pressure method of a flow control method used in a half-duplex connection hub or switch is known. In the back pressure system, for example, when the reception buffer is likely to overflow, control is performed such as transmitting a collision signal to the transmission source to temporarily interrupt data transmission.

このように、合流部における負荷の制御は、合流先の装置が負荷の上昇を検出すると、出力元(送信元)の装置に対して送信を行わせないように制御する。このため、出力元の装置において、処理を進めることができない時間が発生する。その結果、システム全体の処理能力が低下する場合がある。   As described above, the load control in the merging unit is performed such that, when the merging destination device detects an increase in the load, the output source (transmission source) device is not transmitted. For this reason, a time during which processing cannot proceed is generated in the output source device. As a result, the processing capacity of the entire system may be reduced.

したがって、本発明は上記課題に鑑みて創案されたものであって、その目的は、システム全体の処理能力の低下を回避し、例えば合流部等での負荷制御に好適とされるシステム、装置、負荷分散方法、プログラムを提供することにある。   Therefore, the present invention has been devised in view of the above problems, and its purpose is to avoid a decrease in the processing capacity of the entire system, for example, a system, apparatus, and the like that are suitable for load control at a junction or the like, It is to provide a load balancing method and program.

本発明の一の側面によれば、入力されたデータを処理し処理結果データを出力する少なくとも一つの第1の装置と、前記第1の装置から出力される前記処理結果データに対して所定の処理を実行する第2の装置と、を備え、少なくとも一つの前記第1の装置は、前記第2の装置で処理待ち状態にあるデータ量から前記第2の装置の負荷状況を把握し、前記第2の装置で行われる前記所定の処理を、前記第2の装置の負荷状況に応じた分、前記第1の装置で実行するように制御する手段を備えたシステムが提供される。   According to one aspect of the present invention, at least one first device that processes input data and outputs processing result data, and the processing result data output from the first device has a predetermined value. A second device that executes processing, and at least one of the first devices grasps the load status of the second device from the amount of data waiting for processing in the second device, and A system is provided that includes means for controlling the predetermined processing performed by the second device to be executed by the first device by an amount corresponding to the load status of the second device.

本発明の他の側面によれば、入力されたデータを処理し処理結果データを他の装置に出力する手段と、前記他の装置で処理待ち状態にあるデータ量から前記他の装置の負荷状況を把握し、前記他の装置で行われる所定の処理を、前記他の装置の負荷状況に応じた分、実行するように制御する手段を備えた装置が提供される。   According to another aspect of the present invention, means for processing input data and outputting processing result data to another device, and a load status of the other device based on a data amount waiting for processing in the other device Thus, an apparatus is provided that includes means for controlling to execute predetermined processing performed by the other apparatus according to the load status of the other apparatus.

本発明のさらに他の側面によれば、少なくとも一つの第1の装置では、入力したデータを処理し処理結果データを出力し、
第2の装置では、前記第1の装置から出力される前記処理結果データに対して所定の処理を実行し、
少なくとも一つの前記第1の装置は、前記第2の装置で処理待ち状態にあるデータ量から前記第2の装置の負荷状況を把握し、
前記第2の装置で行われる前記所定の処理を、前記第2の装置の負荷状況に応じた分、前記第1の装置で実行するように制御する、負荷分散方法が提供される。
According to still another aspect of the present invention, at least one first device processes input data and outputs processing result data.
The second device executes a predetermined process on the processing result data output from the first device,
At least one of the first devices grasps the load status of the second device from the amount of data waiting for processing in the second device,
There is provided a load distribution method for controlling the predetermined processing performed by the second device to be executed by the first device by an amount corresponding to the load status of the second device.

本発明のさらに他の側面によれば、入力されたデータを処理し処理結果データを他の装置に出力する装置を構成するコンピュータに、
前記他の装置で処理待ち状態にあるデータ量から前記他の装置の負荷状況を把握し、
前記他の装置で行われる所定の処理を、前記他の装置の負荷状況に応じた分、実行するように制御する処理を実行させるプログラムが提供される。
According to still another aspect of the present invention, a computer constituting an apparatus that processes input data and outputs processing result data to another apparatus,
From the amount of data waiting for processing in the other device, grasp the load status of the other device,
There is provided a program for executing a process for controlling to execute a predetermined process performed in the other apparatus by an amount corresponding to a load state of the other apparatus.

本発明のさらに他の側面によれば、前記プログラムを記録したコンピュータ読み出し可能な記録媒体(例えば半導体ストレージや磁気/光ストレージ等)が提供される。   According to still another aspect of the present invention, a computer-readable recording medium (for example, a semiconductor storage or a magnetic / optical storage) that records the program is provided.

本発明によれば、システム全体の処理能力の低下を回避した負荷分散を実現可能とし、例えば合流部等への負荷制御に好適される。   According to the present invention, it is possible to realize load distribution that avoids a decrease in the processing capacity of the entire system, and it is suitable for load control to, for example, a junction.

(A)は本発明の一実施形態を説明する図である。(B)は待ち行列の内容を説明する図である。(A) is a figure explaining one Embodiment of this invention. (B) is a diagram illustrating the contents of a queue. 本発明の一実施形態の動作を説明する流れ図である。It is a flowchart explaining operation | movement of one Embodiment of this invention. 本発明の一実施形態を説明する図である。It is a figure explaining one Embodiment of this invention. 本発明の一実施形態の装置の構成の一例を模式的の例示する図である。It is a figure which illustrates typically an example of the composition of the device of one embodiment of the present invention. 本発明の基本概念を説明する図である。It is a figure explaining the basic concept of this invention.

本発明の実施形態について図面を参照して説明する。はじめに本発明の基本概念について説明する。本発明によれば、図5を参照すると、システム20は、入力されたデータ23に対して処理211を実行し処理結果データ24を出力する少なくとも一つの第1の装置21と、前記第1の装置21から出力される前記処理結果データ24に対して処理221を実行する第2の装置22と、を備えている。前記第1の装置21は、前記第2の装置22で処理待ち状態222にあるデータ量に関する情報213から、前記第2の装置22の負荷状況を把握し、前記第2の装置22で行われる前記処理221を、前記第2の装置22の負荷状況に応じて、前記第1の装置21で実行するように制御する制御手段212を備えている。第1の装置21、第2の装置22は、プロセッサ、CPUコア等の処理装置であってもよい。第1の装置21における処理211、制御手段212は、第1の装置21を構成するコンピュータ、プロセッサ、CPU等で実行されるプログラムにより、その機能を実現するようにしてもよいことは勿論である。   Embodiments of the present invention will be described with reference to the drawings. First, the basic concept of the present invention will be described. According to the present invention, referring to FIG. 5, the system 20 performs at least one first device 21 that performs processing 211 on the input data 23 and outputs processing result data 24, and the first device 21. And a second device 22 that executes processing 221 on the processing result data 24 output from the device 21. The first device 21 grasps the load status of the second device 22 from the information 213 regarding the amount of data in the processing waiting state 222 in the second device 22, and is performed by the second device 22. The processing unit 221 includes a control unit 212 that controls the first device 21 to execute the process 221 in accordance with the load status of the second device 22. The first device 21 and the second device 22 may be processing devices such as a processor and a CPU core. The processing 211 and the control means 212 in the first device 21 may of course implement their functions by a program executed by a computer, a processor, a CPU, or the like that constitutes the first device 21. .

前記第2の装置22で行われる前記処理221を、前記第2の装置22の負荷状況に応じた分、前記第1の装置21で実行するように制御することで、合流部等での負荷制御を行うにあたり、システム全体の処理能力の低下を回避可能としている。   By controlling the processing 221 performed by the second device 22 to be executed by the first device 21 by an amount corresponding to the load status of the second device 22, the load at the junction or the like In performing the control, it is possible to avoid a decrease in the processing capacity of the entire system.

本発明の形態の一つによれば、前記第2の装置(図5の22、あるいは、図1(A)の例えば装置14)は、一つ又は複数の前記第1の装置で処理されたデータを入力し処理実行まで保持する待ち行列(図5の222、あるいは、図1(A)の15)を備え、少なくとも一つの前記第1の装置(図5の21、あるいは、図1(A)の例えば装置11)は、入力されたデータに対して、前記第2の装置(図5の22、あるいは、図1(A)の例えば装置14)の代わりに前記第1の装置(図5の21、あるいは、図1(A)の例えば装置11)で実行する前記処理の件数を、前記第2の装置(図5の22、あるいは、図1(A)の例えば装置14)の前記待ち行列の長さ情報に基づき、決定するようにしてもよい。   According to one aspect of the present invention, the second device (22 in FIG. 5 or, for example, device 14 in FIG. 1A) has been processed by one or more of the first devices. A queue (222 in FIG. 5 or 15 in FIG. 1A) for inputting data and holding it until the execution of processing is provided, and at least one of the first devices (21 in FIG. 5 or FIG. ), For example, the device 11), for the input data, the first device (FIG. 5) instead of the second device (22 in FIG. 5 or the device 14 in FIG. 1A). 21 or the number of processes executed by the device 11 in FIG. 1A, for example, is set to the waiting time of the second device (22 in FIG. 5 or the device 14 in FIG. 1A). You may make it determine based on the length information of a matrix.

本発明の形態の一つによれば、少なくとも一つの前記第1の装置(図1(A)の例えば装置11)は、前記入力したデータに対して、第1の処理(図1(A)の処理―2)又は、前記第1の処理(図1(A)の処理―2)と第2の処理(図1(A)の処理―3)を実行する。
前記第1の装置(図1(A)の例えば装置11)は、前記第1の装置(図1(A)の例えば装置11)で前記第2の処理(図1(A)の処理―3)を実行したデータの件数をカウントするオフロードカウンタ(図4の117)と、前記第2の装置(図1(A)の例えば装置14)の前記待ち行列(図1(A)の15)の長さ情報に基づき、前記第1の装置(図1(A)の例えば装置11)で前記第2の処理(図1(A)の処理―3)を実行するデータの件数の上限となる閾値を取得する手段(図4の閾値算出部118)とを備えた構成としてもよい。
前記第1の装置(図1(A)の例えば装置11)は、前記入力されたデータに対して前記第1の処理(図1(A)の処理―2)を実行したのち、オフロードカウンタのカウント値が前記閾値を超えている場合には、前記第2の処理(図1(A)の処理―3)を実行せずに、前記第1の処理の処理結果データを前記第2の装置(図1(A)の例えば装置14)に送信する構成としてもよい。前記第2の装置(図1(A)の例えば装置14)は、前記第1の装置で、前記第1の処理(図1(A)の処理―2)が実行されたデータに対して第2の処理(図1(A)の処理―3)を実行するようにしてもよい。
一方、オフロードカウンタのカウント値が前記閾値以下の場合には、前記第1の装置(図1(A)の例えば装置11)は、前記第2の処理(図1(A)の処理―3)をさらに実行して前記オフロードカウンタ(図4の117)を1つ増加させ、前記第1の処理(図1(A)の処理―2)と前記第2の処理(図1(A)の処理―3)を施した処理結果データを前記第2の装置(図1(A)の例えば装置14)に送信する構成としてもよい。
According to one embodiment of the present invention, at least one of the first devices (for example, the device 11 in FIG. 1A) performs a first process (FIG. 1A) on the input data. Process-2) or the first process (process-2 in FIG. 1A) and the second process (process-3 in FIG. 1A) are executed.
The first device (eg, device 11 in FIG. 1A) is the first device (eg, device 11 in FIG. 1A) and the second process (process 3 in FIG. 1A). ) And an offload counter (117 in FIG. 4) that counts the number of data executed, and the queue (15 in FIG. 1 (A)) of the second device (eg, device 14 in FIG. 1 (A)). Based on the length information, the upper limit of the number of data to be executed by the first device (eg, the device 11 in FIG. 1A) is the second process (Process 3 in FIG. 1A). It is good also as a structure provided with the means (threshold value calculation part 118 of FIG. 4) which acquires a threshold value.
The first device (for example, the device 11 in FIG. 1A) executes the first processing (processing-2 in FIG. 1A) on the input data, and then performs an offload counter. If the count value exceeds the threshold, the second process (process-3 in FIG. 1A) is not executed, and the process result data of the first process is stored in the second process. It is good also as a structure which transmits to an apparatus (for example, apparatus 14 of FIG. 1 (A)). The second device (eg, the device 14 in FIG. 1A) is the first device for the data for which the first process (Process-2 in FIG. 1A) has been executed. Process 2 (process-3 in FIG. 1A) may be executed.
On the other hand, when the count value of the offload counter is equal to or smaller than the threshold, the first device (for example, the device 11 in FIG. 1A) performs the second processing (processing 3 in FIG. 1A). ) Is further executed to increment the offload counter (117 in FIG. 4) by one, and the first process (process-2 in FIG. 1A) and the second process (FIG. 1A) The processing result data subjected to the process 3) may be transmitted to the second apparatus (for example, the apparatus 14 in FIG. 1A).

本発明の形態の一つによれば、前記第1の装置(図1(A)の例えば装置11)は、前記第1の処理(図1(A)の処理―2)を施したデータ、又は前記第1の処理(図1(A)の処理―2)と前記第2の処理(図1(A)の処理―3)を施した処理結果データを、どの処理まで完了したかを示す完了ステップ情報とともに前記第2の装置(図1(A)の例えば装置14)に送信する構成としてもよい。前記第2の装置(図1(A)の例えば装置14)は、前記待ち行列(図1(A)の15)に、前記第1の装置(図1(A)の例えば装置11)から送信された処理結果データと完了ステップ情報を対応付けて蓄積する(図1(B)参照)構成としてもよい。   According to one aspect of the present invention, the first device (for example, the device 11 in FIG. 1A) receives the data subjected to the first processing (processing-2 in FIG. 1A), Or, it indicates to what processing the processing result data subjected to the first processing (processing-2 in FIG. 1A) and the second processing (processing-3 in FIG. 1A) has been completed. It is good also as a structure which transmits to said 2nd apparatus (for example, apparatus 14 of FIG. 1 (A)) with completion step information. The second device (eg, device 14 in FIG. 1A) transmits to the queue (15 in FIG. 1A) from the first device (eg, device 11 in FIG. 1A). The processed result data and the completed step information may be stored in association with each other (see FIG. 1B).

本発明の形態の一つによれば、前記第1の装置(図1(A)の例えば装置11)は、前記第2の装置(図1(A)の例えば装置14)の前記待ち行列(図1(A)の15)の長さに関して、前記長さの範囲を複数の区分に分割し、前記各区分にそれぞれ対応させて前記閾値を予め設定しておき、取得した前記第2の装置の前記待ち行列の長さから、前記待ち行列の長さに対応した閾値を取得する構成としてもよい(図4参照)。   According to one aspect of the present invention, the first device (eg, device 11 in FIG. 1A) is the queue of the second device (eg, device 14 in FIG. 1A). With respect to the length of 15) in FIG. 1A, the range of the length is divided into a plurality of sections, the threshold is set in advance corresponding to each of the sections, and the acquired second device A threshold value corresponding to the queue length may be acquired from the queue length (see FIG. 4).

以上、基本概念及びその形態を説明したが、以下では例示的な実施形態について説明する。   Although the basic concept and the form thereof have been described above, exemplary embodiments will be described below.

本発明の実施形態によれば、並列に動作する装置(図1(A)の10、11、12、13、14)から構成されるシステム(1)において、複数の装置(11、12、13)と、それらの装置の出力を入力とする装置(14)について、これらの装置(11、12、13、14)間の作業量が平均的になるようにする。特に制限されないが、例えば各装置を、処理装置、例えばCPUコアとしたマルチコアCPUのシステムにおいて、複数のコアと、それら複数のコアの出力を入力とするコアについて、これらのコアの作業量を平均的にする。なお、図1(A)において、2は入力チャネル、3は出力チャネルを表している。   According to the embodiment of the present invention, in the system (1) composed of devices operating in parallel (10, 11, 12, 13, 14 in FIG. 1 (A)), a plurality of devices (11, 12, 13). ) And the device (14) that receives the output of those devices so that the work amount between these devices (11, 12, 13, 14) becomes average. Although not particularly limited, for example, in a multi-core CPU system in which each device is a processing device, for example, a CPU core, with respect to a plurality of cores and a core that receives the outputs of the plurality of cores, the average workload of these cores To do. In FIG. 1A, 2 represents an input channel and 3 represents an output channel.

本発明の実施形態によれば、合流先の装置(14)が、相対的に低負荷時に行っていた処理の一部を、相対的に高負荷になった場合に、複数の出力元(送信元)の装置(11、12、13)で実行するように制御する。これにより、例えば出力元の装置(11、12、13)と、合流先の装置(14)間での負荷の平均化が可能となる。その際、出力元の装置(11、12、13)では、実行中の処理を停止させる等、システムの処理性能を低下させるような制御は行われない。   According to the embodiment of the present invention, when a device (14) that is a merging destination performs a relatively high load on a part of processing performed at a relatively low load, a plurality of output sources (transmissions) Control is performed so as to be executed by the original device (11, 12, 13). As a result, for example, the load between the output source devices (11, 12, 13) and the merging destination device (14) can be averaged. At that time, the output source devices (11, 12, 13) do not perform control for reducing the processing performance of the system, such as stopping the processing being executed.

本発明の実施形態によれば、出力元の装置(11、12、13)は、待ち行列(15)に保持され処理待ち状態に置かれているデータ長から装置(14)の負荷状況(負荷の高低)を判断するようにしてよい。   According to the embodiment of the present invention, the output source device (11, 12, 13) determines the load status (load) of the device (14) from the data length held in the queue (15) and placed in the process waiting state. May be determined.

また、本発明の実施形態によれば、処理の移動については、待ち行列(15)に溜まっているデータの個数に一定の計算を行うことで、段階的に行う。例えば出力元の装置(11、12、13)で実行する処理の割合として、
例えば10%(10個のデータを処理するうち1個について処理−3まで行い、それ以外は処理−2のみを行う)、
20%(10個のデータを処理するうち2個については処理−3まで行い、それ以外は処理−2のみを行う)、
30%(20%と同様)といったように段階的に行う。こうすることで、処理の移動によって、逆に、出力元の装置(11、12、13)の負荷が上がるのを防ぐ。
Further, according to the embodiment of the present invention, the movement of the process is performed in stages by performing a certain calculation on the number of data accumulated in the queue (15). For example, as a ratio of processing executed in the output source device (11, 12, 13),
For example, 10% (1 out of 10 data is processed up to processing-3, otherwise only processing-2 is performed),
20% (2 out of 10 data is processed up to process-3, otherwise only process-2 is performed),
30% (same as 20%). This prevents the load on the output source devices (11, 12, 13) from increasing due to the movement of the process.

<実施形態1>
図1を参照して、本発明の一実施形態を説明する。図1(A)では、入力チャネル2と、出力チャネル3を持つ情報処理システム1が例示されている。入力チャネル2からデータを受信し、受信したデータに対し、処理−1、処理−2、処理−3、処理−4の4つの処理を順に実行し、処理結果のデータを出力チャネル3から送信している。
<Embodiment 1>
An embodiment of the present invention will be described with reference to FIG. In FIG. 1A, an information processing system 1 having an input channel 2 and an output channel 3 is illustrated. Receives data from the input channel 2, performs four processes of process-1, process-2, process-3, and process-4 in order on the received data, and transmits process result data from the output channel 3 ing.

装置10、11、12、13、14は、並列動作可能とされる。装置10、11、12、13、14は、CPUコアで構成してもよい。装置11、12、13、14は、装置間でやり取りされるデータを蓄積保持する待ち行列を備えている。図1(A)では、簡単のため、装置14の待ち行列15のみが示されている。   The devices 10, 11, 12, 13, and 14 can be operated in parallel. The devices 10, 11, 12, 13, and 14 may be configured with a CPU core. The devices 11, 12, 13, and 14 include a queue that stores and holds data exchanged between the devices. In FIG. 1A, only queue 15 of device 14 is shown for simplicity.

装置10は、入力チャネル2で受信したデータを蓄えるためのバッファからなる待ち行列(不図示)を備えている。各装置10、11、12、13、14は並列に動作するが、それぞれの処理時間は一定でない。そのため、各装置は待ち行列を持ち、自装置で処理を実行するまでの間、出力元の装置から送信されたデータを蓄えておく。   The device 10 comprises a queue (not shown) consisting of buffers for storing data received on the input channel 2. Each device 10, 11, 12, 13, 14 operates in parallel, but the processing time is not constant. Therefore, each device has a queue and stores data transmitted from the output source device until the processing is executed by the device itself.

装置11、12、13の待ち行列(不図示)は、装置10から出力されたデータを蓄える。装置14の待ち行列15は、装置11、12、13から出力されたデータを蓄える。特に制限されないが、装置14は、装置11、12、13からの出力を、例えば到着順に、順次、待ち行列15にキューイングし、処理を行うときに、待ち行列15からデキューする。特に制限されないが、各装置11−14の待ち行列は例えば先入れ先出し(First-In, First-Out;FIFO)方式のバッファで構成してもよい。   The queues (not shown) of the devices 11, 12, and 13 store data output from the device 10. The queue 15 of the device 14 stores data output from the devices 11, 12, and 13. Although not particularly limited, the device 14 queues the output from the devices 11, 12, and 13 sequentially in the queue 15, for example, in the order of arrival, and dequeues the output from the queue 15 when processing is performed. Although not particularly limited, the queue of each device 11-14 may be constituted by, for example, a first-in first-out (FIFO) buffer.

図1を参照して、本実施形態の動作の概略を説明する。   The outline of the operation of the present embodiment will be described with reference to FIG.

入力チャネル2からデータを受信(入力)する。入力されたデータに対する処理−1は、装置10で固定的に実行する。装置10は、処理−1を実行し、さらに装置11、12、13に対して出力を振り分ける。   Receive (input) data from input channel 2. Processing-1 for the input data is executed by the apparatus 10 in a fixed manner. The device 10 executes the process 1 and further distributes the output to the devices 11, 12, and 13.

処理−2は、装置10の振分結果に従い、装置11、12、13のいずれかで実行される。   Process-2 is executed by one of the apparatuses 11, 12, and 13 according to the distribution result of the apparatus 10.

処理−3は、装置11、12、13が実行する場合と、装置14が実行する場合の二通りがある。ただし、各データに対しては、いずれかの装置にて、一度だけ実行される。すなわち、例えば出力元の装置11で装置10で振り分けられたデータに対して処理−3を実行して処理結果データを装置14に送信し、装置14が処理−3が施されたデータに対して処理―3を実行することはない。   There are two types of processing-3: a case where the devices 11, 12 and 13 execute and a case where the device 14 executes. However, each data is executed only once by any device. That is, for example, processing-3 is performed on the data distributed by the device 10 in the output source device 11 and the processing result data is transmitted to the device 14, and the device 14 applies the processing-3 to the data. Process-3 is not executed.

処理−4は、装置14で実行される。   Process-4 is executed by the device 14.

特に制限されないが、図1(A)の例では、処理−2は、他の処理と比べて長時間の処理時間を要する処理(処理量大)であることを想定している。この為、処理−2を、3個の装置11、12、13に割り当て、これらの装置11、12、13を並列動作させ、システムの性能(スループット)の低下を回避する。   Although not particularly limited, in the example of FIG. 1A, it is assumed that the process-2 is a process (a large amount of processing) that requires a longer processing time than other processes. For this reason, the process-2 is assigned to the three apparatuses 11, 12, and 13, and these apparatuses 11, 12, and 13 are operated in parallel to avoid a decrease in system performance (throughput).

装置11、12、13の待ち行列(不図示)に蓄えられるデータと、装置14の待ち行列15に蓄えられるデータには、異なる性質がある。すなわち、装置11、12、13の待ち行列(不図示)に蓄えられるデータは、処理−1を実行した結果である。一方、装置14の待ち行列15に蓄えられるデータは、処理−2を実行した結果である場合と、処理−3を実行した結果である場合の2通りがある。   The data stored in the queues (not shown) of the devices 11, 12, and 13 and the data stored in the queue 15 of the devices 14 have different properties. That is, the data stored in the queues (not shown) of the devices 11, 12, and 13 are the results of executing the process-1. On the other hand, there are two types of data stored in the queue 15 of the device 14, that is, a result of executing the process-2 and a result of executing the process-3.

そのため、装置14の待ち行列15には、処理結果と、どの処理まで完了しているかの情報を組にしたデータが蓄えられる。図1(B)は、待ち行列15の内容の一例を模式的に例示する図である。図1(B)に示す例では、待ち行列15の先頭と2番目、4番目のデータは、完了ステップが2、すなわち、処理−2まで完了しており、処理結果がXXX、YYY、WWWであることを表している。待ち行列15の3番目のデータは、完了ステップが3、すなわち、処理−3まで完了しており、処理結果がZZZであることを表している。   Therefore, the queue 15 of the apparatus 14 stores data that is a set of processing results and information indicating which processing has been completed. FIG. 1B is a diagram schematically illustrating an example of the contents of the queue 15. In the example shown in FIG. 1B, the first, second, and fourth data in the queue 15 have completed steps 2, that is, processing 2 is completed, and processing results are XXX, YYY, and WWW. It represents something. The third data in the queue 15 indicates that the completion step is 3, that is, the process 3 is completed, and the process result is ZZZ.

本実施形態では、装置11、12、13において、データに対し、処理−2のみを実行するか、処理−2に加えて処理−3を実行するかは、待ち行列15に蓄えられたデータの長さによって決める構成とされている。装置11、12、13は、受信したデータ毎に、処理−2を実行した後、装置14の待ち行列15のデータの長さを調べる。装置11、12、13は装置14の待ち行列15のデータの長さに応じてデータのどの程度の割合(何パーセント)について処理−3まで実行するかを判断する。装置11、12、13は処理する複数件のデータの内、当該割合(閾値)のデータについて処理−3まで実行する。当該割合を超えるデータについては、処理−2まで実行する。   In the present embodiment, in the devices 11, 12, and 13, whether only the process 2 is executed on the data, or whether the process 3 is executed in addition to the process-2 is determined based on the data stored in the queue 15. The structure is determined by the length. The apparatuses 11, 12, and 13 check the length of the data in the queue 15 of the apparatus 14 after executing process-2 for each received data. The apparatuses 11, 12, and 13 determine how much of the data (percent) is to be executed up to the process 3 according to the data length of the queue 15 of the apparatus 14. The apparatuses 11, 12, and 13 execute up to process-3 for the data of the ratio (threshold value) among a plurality of data to be processed. For data exceeding the ratio, processing up to process-2 is executed.

装置11、12、13での処理結果は、装置11、12、13で実行した処理のステップ(完了ステップ)と共に、装置14に送信され、装置14の待ち行列15に蓄積される。装置14は、待ち行列15からデータを取り出して完了ステップをチェックする。   The processing results of the devices 11, 12, and 13 are transmitted to the device 14 together with the processing steps (completion steps) executed by the devices 11, 12, and 13, and stored in the queue 15 of the device 14. Device 14 retrieves the data from queue 15 and checks the completion step.

完了ステップ2であれば、装置14は、処理結果に処理−3と処理−4を実行し、出力チャネル3から処理結果を出力する。完了ステップが3であれば、装置14は、処理結果に処理−4のみを実行し、出力チャネル3から処理結果を出力する。   If it is the completion step 2, the apparatus 14 performs the process-3 and the process-4 on the processing result, and outputs the processing result from the output channel 3. If the completion step is 3, the device 14 executes only the process-4 on the process result and outputs the process result from the output channel 3.

図4は、図1(A)の装置11(出力元の装置)の構成を説明する図である。なお、図1(A)の装置11乃至13は互いに同一構成としてもよい。また、装置10、装置14も基本構成は装置11と同一としてもよい。   FIG. 4 is a diagram illustrating the configuration of the device 11 (output source device) in FIG. Note that the devices 11 to 13 in FIG. 1A may have the same configuration. The basic configurations of the devices 10 and 14 may be the same as those of the device 11.

図4を参照すると、装置11は、データパスとして、データを受信する受信部111、受信部111で受信したデータ(装置10から受信した処理待ちデータ)を一時的に蓄積保持する受信バッファからなる待ち行列112、待ち行列112から取り出したデータに対して処理を実行する処理部113、処理部113での処理結果と完了ステップを送信する送信部114を備えている。なお、実行する処理が固定された装置10、14では、送信部114は処理結果のみを出力し、完了ステップは、出力しない構成としてもよい。   Referring to FIG. 4, the device 11 includes, as a data path, a receiving unit 111 that receives data, and a reception buffer that temporarily stores and holds data received by the receiving unit 111 (processing waiting data received from the device 10). A queue 112, a processing unit 113 that executes processing on data extracted from the queue 112, and a transmission unit 114 that transmits a processing result and a completion step in the processing unit 113 are provided. In addition, in the apparatuses 10 and 14 in which the processing to be executed is fixed, the transmission unit 114 may output only the processing result, and the completion step may not be output.

装置11は、データパスの受信部111での受信データの待ち行列112への書き込み、待ち行列112からのデータの読み出しと、処理部113で実行する処理の別の処理への切り替え等のスケジューリング、送信部114からの出力を制御する制御部115を備えている。   The apparatus 11 performs scheduling such as writing of received data to the queue 112 at the data path receiving unit 111, reading of data from the queue 112, and switching of processing executed by the processing unit 113 to another processing, A control unit 115 that controls output from the transmission unit 114 is provided.

さらに制御系として、待ち行列112から受信したデータをカウントする受信カウンタ116、装置11において、受信されたデータのうち処理部113で処理3を実行する件数をカウントするオフロード(off−load)カウンタ117と、後段の装置(図1(A)の14)の待ち行列(図1(A)の15)の長さ情報を取得する待ち行列長さ取得部119と、装置14の待ち行列の長さ情報から閾値を導出する閾値算出部118を備えている。制御部115は、これらの各部116−119を制御する。   Further, as a control system, a reception counter 116 that counts data received from the queue 112, and an off-load counter that counts the number of cases in which the processing unit 113 executes the processing 3 among the received data in the device 11. 117, a queue length acquisition unit 119 for acquiring length information of the queue (15 in FIG. 1A) of the subsequent device (14 in FIG. 1A), and the queue length of the device 14 A threshold value calculation unit 118 for deriving a threshold value from the depth information is provided. The control unit 115 controls each of these units 116-119.

off−loadカウンタ117は、装置14における負荷の軽減(off−load)を制御するためのカウンタであり、装置14の負荷の程度に応じて装置11の処理部113での処理3が実行されるデータの件数を管理するためのカウンタである。   The off-load counter 117 is a counter for controlling load reduction (off-load) in the device 14, and processing 3 in the processing unit 113 of the device 11 is executed according to the degree of load on the device 14. This is a counter for managing the number of data items.

装置14の負荷の程度が相対的に高いと判断されると、装置11では、より多くの受信データに対して処理3を実行する。相対的に低負荷のときに装置14で行われる処理―3を、装置14が相対的に高負荷のときは、装置14に代わって、装置11で行い、負荷がさらに高い場合には、装置11でより多くの受信データに対して処理3を実行する。   If it is determined that the load level of the device 14 is relatively high, the device 11 performs the process 3 on more received data. The process-3 performed by the device 14 when the load is relatively low is performed by the device 11 instead of the device 14 when the device 14 is relatively high load. 11, process 3 is executed for more received data.

この負荷分散制御を実現するため制御部115は、処理2を実行後、off−loadカウンタ117の値が閾値算出部118で装置14の待ち行列の長さに基づき算出された閾値よりも大のとき、完了ステップ=2とともに、装置14に出力する。off−loadカウンタ117の値が閾値以下の場合、処理3を実行し、off−loadカウンタ117を1つ増加させ、完了ステップ=3とともに、装置14に出力する。   In order to realize this load distribution control, the control unit 115 executes the process 2 and then the value of the off-load counter 117 is larger than the threshold value calculated by the threshold value calculation unit 118 based on the queue length of the device 14. Output to the device 14 together with the completion step = 2. When the value of the off-load counter 117 is equal to or smaller than the threshold value, the process 3 is executed, the off-load counter 117 is incremented by one, and output to the apparatus 14 together with the completion step = 3.

なお、図4では、簡単のため、制御部115が、データパスの各部111−114と、制御系の各部116−119をそれぞれ制御信号線で制御する構成として図示しているが、データパスと制御系の制御部を別に備えた構成としてもよいし、あるいは、制御部115内に制御系の各部116−119を備えた構成としてもよい。   In FIG. 4, for the sake of simplicity, the control unit 115 is illustrated as a configuration in which the data path units 111 to 114 and the control system units 116 to 119 are controlled by control signal lines. It is good also as a structure provided with the control part of the control system separately, or it is good also as a structure provided with each part 116-119 of the control system in the control part 115.

図2は、本発明の一実施形態の動作を説明する流れ図である。図3は、本発明の一実施形態の動作を説明する図である。図2乃至図4を参照して、装置11、12、13のより詳細な動作を説明する。装置11、12、13は、同じ手順に従って動作を行うので、装置11として説明する。   FIG. 2 is a flowchart illustrating the operation of one embodiment of the present invention. FIG. 3 is a diagram for explaining the operation of the embodiment of the present invention. With reference to FIGS. 2 to 4, the detailed operation of the devices 11, 12, and 13 will be described. The devices 11, 12, and 13 operate according to the same procedure, and will be described as the device 11.

装置11において、受信カウンタ116のカウント値と閾値は0〜100とされているが、かかる値に制限されるものでないことは勿論である(例えば100を他の値に変更してもよい)。閾値が100の場合、装置11における受信データに対する処理―3の処理件数(off−loadカウンタ117でカウントされる)は最大100までとなる。   In the apparatus 11, the count value and the threshold value of the reception counter 116 are set to 0 to 100. However, it is a matter of course that the value is not limited to this value (for example, 100 may be changed to another value). When the threshold value is 100, the maximum number of processing-3 processing items (counted by the off-load counter 117) for received data in the apparatus 11 is 100.

例えばパワーアップやリセット時等の装置11の初期化時に、装置11の制御部115は、受信カウンタ116とoff−loadカウンタ117を0クリアする(ステップS1)。   For example, when the device 11 is initialized, such as during power-up or reset, the control unit 115 of the device 11 clears the reception counter 116 and the off-load counter 117 to 0 (step S1).

装置11は、装置10からのデータを処理するループ(無限ループ)に入る(例えば外部からの停止の指示等に基づく割り込みやリセットによりデータ処理を停止する以外、データ処理を繰り返す)。   The device 11 enters a loop (infinite loop) for processing data from the device 10 (for example, data processing is repeated except that data processing is stopped by interruption or reset based on an external stop instruction or the like).

装置11の処理部113は、待ち行列112からデータを受信する(ステップS2)。これに応じて、制御部115は、受信カウンタ116のカウント値を1つ増加させる(ステップS3)。なお、装置11において、処理部113が待ち行列112からデータを受信すると、待ち行列112の長さ(処理待ち状態として保持されるデータの量に対応する)は1単位減少する。   The processing unit 113 of the device 11 receives data from the queue 112 (step S2). In response to this, the control unit 115 increases the count value of the reception counter 116 by one (step S3). In the apparatus 11, when the processing unit 113 receives data from the queue 112, the length of the queue 112 (corresponding to the amount of data held in the process waiting state) decreases by one unit.

その結果、受信カウンタ116のカウント値が100を超えた場合(ステップS4のYES分岐)、制御部115は、受信カウンタ116とoff−loadカウンタ117を0クリアし(ステップS5)、その後、ステップS6に移る。受信カウンタ116のカウント値が例えば100以下の場合(ステップS4のNO分岐)、ステップS6に移る。   As a result, when the count value of the reception counter 116 exceeds 100 (YES branch of step S4), the control unit 115 clears the reception counter 116 and the off-load counter 117 to 0 (step S5), and then step S6. Move on. If the count value of the reception counter 116 is 100 or less, for example (NO branch of step S4), the process proceeds to step S6.

ステップS6では、処理部113が受信したデータに対して処理−2を実行する。   In step S6, process-2 is performed on the data received by the processing unit 113.

待ち行列長さ取得部119は、合流先の装置14の待ち行列15(図1(A)参照)の長さ情報を取得する(ステップS7)。装置14は、待ち行列15を管理する管理部から、自装置内の待ち行列15の長さ情報を、制御系通信路(不図示)を介して、装置11に通知する構成としてもよい。   The queue length acquisition unit 119 acquires length information of the queue 15 (see FIG. 1A) of the joining apparatus 14 (step S7). The device 14 may be configured to notify the device 11 of the length information of the queue 15 in the own device from the management unit that manages the queue 15 via a control communication channel (not shown).

閾値算出部118は、取得した合流先の装置14の待ち行列15(図1(A))に対して所定の演算を行うことで(あるいはテーブルルックアップ方式で)、閾値を算出(導出)し、制御部115に算出した閾値を供給する(ステップS8)。   The threshold value calculation unit 118 calculates (derivates) the threshold value by performing a predetermined calculation (or using a table lookup method) on the queue 15 (FIG. 1A) of the acquired joining device 14. Then, the calculated threshold value is supplied to the control unit 115 (step S8).

閾値は、例えば具体的なシステムに応じて設定される。特に制限されないが、簡単な例として、図3に示すように、取得した装置14の待ち行列15の長さが「18」であれば、閾値算出部118で算出される閾値は10となる。また、取得した装置14の待ち行列15の長さが「0」〜「9」であれば、装置14での負荷は低いと判断されるため、閾値は「0」となる。この場合、装置11では受信したデータに対して処理3は実行せず、装置14で処理3を実行する。   The threshold is set according to a specific system, for example. Although not particularly limited, as a simple example, as illustrated in FIG. 3, when the length of the queue 15 of the acquired device 14 is “18”, the threshold calculated by the threshold calculation unit 118 is 10. If the length of the queue 15 of the acquired device 14 is “0” to “9”, it is determined that the load on the device 14 is low, so the threshold value is “0”. In this case, the apparatus 11 does not execute the process 3 on the received data, and the apparatus 14 executes the process 3.

制御部116は、閾値算出部118で算出された閾値とoff−loadカウンタ117のカウント値とを比較する。off−loadカウンタ117のカウント値が閾値を超えている場合(ステップS9のYES分岐)、完了ステップ=2(「処理−2まで処理した」ことを表す情報)と共に、処理−2の結果を、装置14に送信し(ステップS10)、ステップS2に戻る。   The control unit 116 compares the threshold value calculated by the threshold value calculation unit 118 with the count value of the off-load counter 117. When the count value of the off-load counter 117 exceeds the threshold value (YES branch of step S9), the completion step = 2 (information indicating “processing up to processing-2”) and the result of processing-2 are It transmits to the apparatus 14 (step S10), and returns to step S2.

装置11において、閾値算出部118で算出された閾値がoff−loadカウンタ117のカウント値以上である場合(ステップS9のNO分岐)、処理部113は、受信データ(例えば、ステップS6で処理―2が実行されたデータ)に対して、処理−3を実行する(ステップS11)。   In the apparatus 11, when the threshold value calculated by the threshold value calculation unit 118 is equal to or larger than the count value of the off-load counter 117 (NO branch in step S9), the processing unit 113 receives the received data (for example, processing in step S6-2). Process-3 is executed on the data that has been executed (step S11).

その後、制御部115は、off−loadカウンタ117のカウント値を+1増加させる(ステップS12)。   Thereafter, the control unit 115 increases the count value of the off-load counter 117 by +1 (step S12).

制御部115は、送信部114から、完了ステップ=3(「処理−3まで処理した」ことを表す情報)と共に、処理−3の結果を、装置14に送信し(ステップS13)、ステップS2に戻る。   The control unit 115 transmits the result of processing-3 to the device 14 together with the completion step = 3 (information indicating that “processing up to processing-3”) from the transmission unit 114 (step S13). Return.

なお、装置11において、処理−2、処理―3で処理、off−loadカウンタ117のカウント値を+1増加させるデータ(待ち行列112から取り出されるデータ)は、データを、出力元の装置(図1(A)の装置10)から装置11に送信されるパケットデータ、フレームデータ等、固定長(一定の長さ)のデータ単位であってもよい。あるいは、可変長データであってもよい。この場合、単位データ長(サイズ)の2倍のデータ量のデータに対して、処理−3を実行した場合、off−loadカウンタ117のカウント値を単位データ長の2倍、したがって+2増加させるようにしてもよい。   It should be noted that in the device 11, the data that is processed in processing-2 and processing-3, and that increases the count value of the off-load counter 117 by +1 (data that is extracted from the queue 112) is the same as the output source device (FIG. 1). The data unit may be a fixed length (fixed length) such as packet data, frame data, etc. transmitted from the device 10) to the device 11. Alternatively, variable length data may be used. In this case, when processing-3 is performed on data having a data amount twice the unit data length (size), the count value of the off-load counter 117 is increased by twice the unit data length, and thus +2. It may be.

なお、実装に依存するが、図2のステップS7の合流先装置の待ち行列の長さ取得処理において、合流先装置の待ち行列の長さの取得の処理時間等を考慮して、受信データごとに合流先装置(図1(A)の14)の待ち行列の長さを取得するのではなく、ある所定期間ごとに、取得するようにしてもよい。   Although depending on the implementation, in the queue length acquisition process of the joining destination device in step S7 of FIG. 2, for each received data, the processing time for obtaining the queue length of the joining destination device is taken into consideration. Instead of acquiring the queue length of the destination device (14 in FIG. 1A), the queue length may be acquired every predetermined period.

上記した実施形態によれば、以下のような作用効果を奏する。   According to the above-described embodiment, the following operational effects are obtained.

A) 合流先の装置(図1(A)の14)の負荷が上昇した場合に、負荷をデータの出力元の装置(図1(A)の11、12、13)との間で負担する構成としている。この結果、システム全体で負荷を平均化している。すなわち、システム全体でのリソース、能力の有効活用を可能とし、スループットの向上に貢献する。 A) When the load of the joining device (14 in FIG. 1 (A)) increases, the load is shared with the data output device (11, 12, 13 in FIG. 1 (A)). It is configured. As a result, the load is averaged over the entire system. In other words, it enables effective utilization of resources and capabilities in the entire system and contributes to an improvement in throughput.

B) 合流先の装置(図1(A)の14)の負荷の測定を行うために、専用の装置、処理を追加する必要はない。装置の待ち行列の長さの管理機能は、リソースの管理のために、一般的に、待ち行列を備えた装置に具備されている。この機能を用いて、出力元の装置は、合流先の装置の待ち行列の長さ情報を取得し、合流先の装置の負荷状況を判断するためである。 B) It is not necessary to add a dedicated device or process to measure the load of the joining device (14 in FIG. 1A). A device queue length management function is typically provided in devices with queues for resource management. This is because the output source device uses this function to acquire the queue length information of the joining destination device and determine the load status of the joining destination device.

C) 装置11、12、13間でも処理の負荷分散を促すという作用効果を奏する。装置11、12、13では、処理―2(又は処理2と処理−3)を実行するか、装置11、12、13が追加で実行することになる処理−3の量は、データの処理能力の高い装置程高くなる。多量のデータを処理可能な装置程、処理−3を実行するデータの件数が増えるためである。 C) There is an effect that the load distribution of the processing is promoted between the devices 11, 12, and 13. In the apparatuses 11, 12, and 13, the process-2 (or the process 2 and the process-3) is executed, or the amount of the process-3 that the apparatuses 11, 12, and 13 additionally execute is the data processing capability. The higher the device, the higher. This is because an apparatus capable of processing a large amount of data increases the number of data items for executing process-3.

<変形例1>
前記実施形態の変形例として、パイプライン処理への適用がある。図1の前記実施形態では、前段の装置11〜13の3台、後段の装置14の1台である。前段の装置と後段の装置が各1台の部分に着目して、前段、後段の装置のパイプライン処理に前記実施形態の機構を導入することが可能である。すなわち、前段の装置が、後段の装置の負荷状況に応じて後段の装置で行われるパイプラインステージを後段の装置に代わって実行する。この場合、前段の装置が1つであるため、上記C)の作用効果は得られないが、A)、B)の作用効果は得られる。
<Modification 1>
As a modification of the embodiment, there is application to pipeline processing. In the embodiment shown in FIG. 1, there are three devices 11 to 13 in the front stage and one device 14 in the rear stage. It is possible to introduce the mechanism of the above-described embodiment into the pipeline processing of the preceding and succeeding apparatuses by paying attention to one part of each of the preceding and succeeding apparatuses. That is, the preceding apparatus executes the pipeline stage performed by the subsequent apparatus in place of the subsequent apparatus in accordance with the load status of the subsequent apparatus. In this case, since the apparatus of the preceding stage is one, the effect of C) cannot be obtained, but the effect of A) and B) can be obtained.

<変形例2>
更に別の変形例では、装置間で、動的に割り付ける処理を複数としている。図1を参照して説明した前記実施形態では、前段(出力元)の装置11、12、13で実行するか、後段(合流先)の装置14で実行するかを、動的に決める対象の処理は、処理−3に限定されている。しかしながら、装置14が実行する処理として、処理−3、処理−4、処理−5等が含まれる場合、処理−3と処理−4を動的に、前段(出力元)の装置で実行することも可能である。この場合、後段(合流先)の装置14の待ち行列15に設定されるデータに付属させる完了ステップの情報は、「2」、「3」、「4」のいずれかになる。この完了ステップの情報に応じて、装置14は、
「処理−3、処理−4、処理−5を実行する」、
「処理−4、処理−5を実行する」、
「処理−5を実行する」
のいずれかを選択する。
<Modification 2>
In yet another modification, a plurality of processes for dynamically allocating between apparatuses are used. In the above-described embodiment described with reference to FIG. 1, it is an object of dynamically determining whether to execute in the upstream (output source) devices 11, 12, and 13 or in the downstream (merging destination) device 14. The process is limited to process-3. However, when the processing executed by the device 14 includes processing-3, processing-4, processing-5, etc., the processing-3 and processing-4 should be dynamically executed by the preceding device (output source). Is also possible. In this case, the information of the completion step attached to the data set in the queue 15 of the apparatus 14 at the subsequent stage (joining destination) is any one of “2”, “3”, and “4”. In response to this completion step information, the device 14
“Execute process-3, process-4, process-5”,
“Execute process-4 and process-5”,
“Execute process-5”
Select one of the following.

上記実施形態は、例えばシステムがその一部に、1個以上の前段の装置(処理装置)と、1個の後段の装置(処理装置)を含む場合、当該部分の負荷制御に適用して好適とされる。また定型的なデータを大量に処理する、通信装置に適用して好適とされる。   For example, when the system includes one or more preceding devices (processing devices) and one succeeding device (processing devices) as part of the system, the above-described embodiment is suitable for application to load control of the parts. It is said. It is also suitable for application to a communication device that processes a large amount of routine data.

なお、上記の特許文献の開示を、本書に引用をもって繰り込むものとする。本発明の全開示(請求の範囲を含む)の枠内において、さらにその基本的技術思想に基づいて、実施形態ないし実施例の変更・調整が可能である。また、本発明の請求の範囲の枠内において種々の開示要素(各請求項の各要素、各実施例の各要素、各図面の各要素等を含む)の多様な組み合わせ乃至選択が可能である。すなわち、本発明は、請求の範囲を含む全開示、技術的思想にしたがって当業者であればなし得るであろう各種変形、修正を含むことは勿論である。   The disclosure of the above patent document is incorporated herein by reference. Within the scope of the entire disclosure (including claims) of the present invention, the embodiments and examples can be changed and adjusted based on the basic technical concept. Various combinations or selections of various disclosed elements (including each element of each claim, each element of each embodiment, each element of each drawing, etc.) are possible within the scope of the claims of the present invention. . That is, the present invention of course includes various variations and modifications that could be made by those skilled in the art according to the entire disclosure including the claims and the technical idea.

1、20 システム
2 入力チャネル
3 出力チャネル
10、11、12、13、14 装置
15 待ち行列
21 第1の装置
22 第2の装置
23 入力データ
24、25 処理結果
111 受信部
112 待ち行列
113 処理部
114 送信部
115 制御部
116 受信カウンタ
117 オフロード(off−load)カウンタ
118 閾値算出部
119 待ち行列長さ取得部
211、221 処理
212 制御手段(制御機能)
213 処理待ち状態のデータ量(待ち行列の長さ)
222 処理待ち状態のデータ(待ち行列)
1, 20 System 2 Input channel 3 Output channel 10, 11, 12, 13, 14 Device 15 Queue 21 First device 22 Second device 23 Input data 24, 25 Processing result 111 Receiving unit 112 Queue 113 Processing unit 114 Transmission Unit 115 Control Unit 116 Reception Counter 117 Off-Load Counter 118 Threshold Calculation Unit 119 Queue Length Acquisition Unit 211, 221 Processing 212 Control Means (Control Function)
213 Amount of data waiting to be processed (queue length)
222 Data waiting for processing (queue)

Claims (10)

入力されたデータを処理し処理結果データを出力する少なくとも一つの第1の装置と、
前記第1の装置から出力される前記処理結果データに対して所定の処理を実行する第2の装置と、
を備え、
少なくとも一つの前記第1の装置は、
前記第2の装置で処理待ち状態にあるデータ量から前記第2の装置の負荷状況を把握し、前記第2の装置で行われる前記所定の処理を、前記第2の装置の負荷状況に応じた分、前記第1の装置で実行するように制御する手段を備えた、ことを特徴とするシステム。
At least one first device for processing input data and outputting processing result data;
A second device that executes a predetermined process on the processing result data output from the first device;
With
At least one of the first devices is
The load status of the second device is ascertained from the amount of data waiting for processing in the second device, and the predetermined processing performed in the second device is performed according to the load status of the second device. A system comprising: means for controlling to be executed by the first apparatus.
前記第2の装置は、一つ又は複数の前記第1の装置で処理されたデータを入力し処理実行まで保持する待ち行列を備え、
少なくとも一つの前記第1の装置は、
前記入力されたデータに対して、前記第2の装置の代わりに前記第1の装置で実行する前記所定の処理の件数を、前記第2の装置の前記待ち行列の長さ情報に基づき、決定する、ことを特徴とする請求項1記載のシステム。
The second device includes a queue that receives data processed by one or more of the first devices and holds the data until the processing is executed.
At least one of the first devices is
The number of the predetermined processes to be executed by the first device instead of the second device is determined based on the queue length information of the second device for the input data. The system according to claim 1, wherein:
少なくとも一つの前記第1の装置は、
前記入力したデータに対して、第1の処理又は、前記第1の処理と第2の処理を実行し、
前記第2の装置で行われる前記所定の処理が前記第2の処理であり、
前記第1の装置は、
前記第1の装置で前記第2の処理を実行したデータの件数をカウントするオフロードカウンタと、
前記第2の装置の前記待ち行列の長さ情報に基づき、前記第1の装置で前記第2の処理を実行するデータの件数の上限となる閾値を取得する手段と、
を備え、
前記第1の装置は、
前記入力されたデータに対して前記第1の処理を実行したのち、
前記オフロードカウンタのカウント値が前記閾値を超えている場合には、前記第2の処理を実行せずに、前記第1の処理の処理結果データを前記第2の装置に送信し、
前記第2の装置は、
前記第1の装置で前記第1の処理が実行されたデータに対して前記第2の処理を実行し、
前記第1の装置において、
前記オフロードカウンタのカウント値が前記閾値以下の場合には、前記第2の処理をさらに実行して前記オフロードカウンタを1つ増加させ、前記第1の処理と前記第2の処理を施した処理結果データを前記第2の装置に送信する、ことを特徴とする請求項2記載のシステム。
At least one of the first devices is
Performing the first process or the first process and the second process on the input data;
The predetermined process performed in the second device is the second process;
The first device includes:
An offload counter that counts the number of data for which the second processing has been executed by the first device;
Means for obtaining a threshold value that is an upper limit of the number of data to be executed by the first device based on the queue length information of the second device;
With
The first device includes:
After executing the first process on the input data,
When the count value of the offload counter exceeds the threshold value, the processing result data of the first process is transmitted to the second device without executing the second process,
The second device includes:
Executing the second process on the data on which the first process has been executed by the first device;
In the first device,
When the count value of the offload counter is less than or equal to the threshold value, the second process is further executed to increase the offload counter by one, and the first process and the second process are performed. The system according to claim 2, wherein processing result data is transmitted to the second device.
少なくとも一つの前記第1の装置は、前記第1の処理を施したデータ、又は前記第1の処理と前記第2の処理を施した処理結果データを、どの処理まで完了したかを示す完了ステップ情報とともに前記第2の装置に送信し、
前記第2の装置は、前記待ち行列に、前記第1の装置から送信された処理結果データと完了ステップ情報を対応付けて蓄積する、ことを特徴とする請求項3記載のシステム。
Completion step indicating at which one of the first devices the data that has been subjected to the first processing or the processing result data that has been subjected to the first processing and the second processing has been completed. Send to the second device along with the information;
The system according to claim 3, wherein the second device stores the processing result data transmitted from the first device and completion step information in association with each other in the queue.
少なくとも一つの前記第1の装置は、前記第2の装置の前記待ち行列の長さに関して、前記長さの範囲を複数の区分に分割し、前記各区分にそれぞれ対応させて前記閾値を予め設定しておき、取得した前記第2の装置の前記待ち行列の長さから、前記待ち行列の長さに対応した閾値を取得する、ことを特徴とする請求項2乃至4のいずれか1項に記載のシステム。   At least one of the first devices divides the length range into a plurality of sections with respect to the queue length of the second device, and presets the threshold value corresponding to each of the sections. The threshold value corresponding to the queue length is acquired from the queue length of the acquired second device, according to any one of claims 2 to 4. The described system. 互いに並列に動作する複数の前記第1の装置を備えた、ことを特徴とする請求項1乃至5のいずれか1項に記載のシステム。   The system according to claim 1, further comprising a plurality of the first devices operating in parallel with each other. 入力されたデータを処理し処理結果データを他の装置に出力する手段と、
前記他の装置で処理待ち状態にあるデータ量から前記他の装置の負荷状況を把握し、
前記他の装置で行われる所定の処理を、前記他の装置の負荷状況に応じた分、実行するように制御する手段を備えた、ことを特徴とする装置。
Means for processing the input data and outputting the processing result data to another device;
From the amount of data waiting for processing in the other device, grasp the load status of the other device,
An apparatus comprising: means for controlling to execute a predetermined process performed in the other apparatus according to a load state of the other apparatus.
前記入力されたデータに対して、前記他の装置の代わりに実行する前記処理の件数を、前記他の装置で処理実行までデータを保持する待ち行列の長さ情報に基づき、決定する、ことを特徴とする請求項7記載の装置。   Determining the number of processes to be executed on behalf of the other apparatus for the input data based on length information of a queue that holds the data until the process is executed by the other apparatus; 8. A device according to claim 7, characterized in that 少なくとも一つの第1の装置では、入力したデータを処理し処理結果データを出力し、
第2の装置では、前記第1の装置から出力される前記処理結果データに対して所定の処理を実行し、
少なくとも一つの前記第1の装置は、前記第2の装置で処理待ち状態にあるデータ量から前記第2の装置の負荷状況を把握し、
前記第2の装置で行われる前記所定の処理を、前記第2の装置の負荷状況に応じた分、前記第1の装置で実行するように制御する、ことを特徴とする負荷分散方法。
At least one first device processes input data and outputs processing result data.
The second device executes a predetermined process on the processing result data output from the first device,
At least one of the first devices grasps the load status of the second device from the amount of data waiting for processing in the second device,
A load distribution method comprising: controlling the predetermined processing performed by the second device to be executed by the first device by an amount corresponding to a load situation of the second device.
入力されたデータを処理し処理結果データを他の装置に出力する装置を構成するコンピュータに、
前記他の装置で処理待ち状態にあるデータ量から前記他の装置の負荷状況を把握し、
前記他の装置で行われる所定の処理を、前記他の装置の負荷状況に応じた分、実行するように制御する処理を実行させるプログラム。
In a computer constituting a device that processes input data and outputs processing result data to other devices,
From the amount of data waiting for processing in the other device, grasp the load status of the other device,
A program for executing a process of controlling to execute a predetermined process performed in the other apparatus according to a load state of the other apparatus.
JP2014062675A 2014-03-25 2014-03-25 Load balancing method, system, apparatus and program Active JP6331554B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014062675A JP6331554B2 (en) 2014-03-25 2014-03-25 Load balancing method, system, apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014062675A JP6331554B2 (en) 2014-03-25 2014-03-25 Load balancing method, system, apparatus and program

Publications (2)

Publication Number Publication Date
JP2015185036A true JP2015185036A (en) 2015-10-22
JP6331554B2 JP6331554B2 (en) 2018-05-30

Family

ID=54351457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014062675A Active JP6331554B2 (en) 2014-03-25 2014-03-25 Load balancing method, system, apparatus and program

Country Status (1)

Country Link
JP (1) JP6331554B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000057329A (en) * 1998-08-03 2000-02-25 Internatl Business Mach Corp <Ibm> Method for dynamically changing processing allotment and computer
JP2000339120A (en) * 1999-05-31 2000-12-08 Tokyo Denshi Sekkei Kk Picture output system and picture output controller
JP2001146049A (en) * 1999-11-19 2001-05-29 Nec Corp Printer system, drawing processing method using the same and recording medium having program performing drawing processing recorded thereon
JP2003280850A (en) * 2001-11-16 2003-10-02 Samsung Electronics Co Ltd High speed printer and high speed printing method using the printer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000057329A (en) * 1998-08-03 2000-02-25 Internatl Business Mach Corp <Ibm> Method for dynamically changing processing allotment and computer
JP2000339120A (en) * 1999-05-31 2000-12-08 Tokyo Denshi Sekkei Kk Picture output system and picture output controller
JP2001146049A (en) * 1999-11-19 2001-05-29 Nec Corp Printer system, drawing processing method using the same and recording medium having program performing drawing processing recorded thereon
JP2003280850A (en) * 2001-11-16 2003-10-02 Samsung Electronics Co Ltd High speed printer and high speed printing method using the printer

Also Published As

Publication number Publication date
JP6331554B2 (en) 2018-05-30

Similar Documents

Publication Publication Date Title
US10454850B2 (en) Apparatus and method for buffering data in a switch
US12073265B2 (en) Event handling in distributed event handling systems
US8831025B2 (en) Parallel processing using multi-core processor
US8990452B2 (en) Dynamic reduction of stream backpressure
EP3295629B1 (en) Query plan and operation-aware communication buffer management
US9882845B2 (en) Using content based routing to scale cast iron like appliances
JP2017050001A (en) System and method for use in efficient neural network deployment
US10659372B2 (en) Multi-core lock-free rate limiting apparatus and method
CN109697122A (en) Task processing method, equipment and computer storage medium
US20140189695A1 (en) Methods for Packet Scheduling with Order in Software-Based Parallel Processing
EP2850533A1 (en) Server node interconnect devices and methods
EP3238386B1 (en) Apparatus and method for routing data in a switch
US20200125395A1 (en) Automated switching between interrupt context i/o processing and thread context i/o processing
CN105159779B (en) Method and system for improving data processing performance of multi-core CPU
WO2012106906A1 (en) Stream dispatching method and device for multi-core processor
Li et al. Prioritizing soft real-time network traffic in virtualized hosts based on xen
CN102567120B (en) Node scheduling priority determining method and node scheduling priority determining device
JP6331554B2 (en) Load balancing method, system, apparatus and program
US20140040903A1 (en) Queue and operator instance threads to losslessly process online input streams events
CN111858019B (en) Task scheduling method and device and computer readable storage medium
CN111427673A (en) Load balancing method, device and equipment
US10270701B2 (en) Management node, terminal, communication system, communication method, and program storage medium
KR20210137472A (en) Pipeline arithmetic unit, programmable logic controller, and execution method of pipelined processing
CN107544788B (en) Data flow graph congestion detection method with time stamp
JP2013222407A (en) System having flow rate control function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180123

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180326

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180416

R150 Certificate of patent or registration of utility model

Ref document number: 6331554

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150