JP2013179429A - Parallel packet processing method and device for switching distribution destination - Google Patents
Parallel packet processing method and device for switching distribution destination Download PDFInfo
- Publication number
- JP2013179429A JP2013179429A JP2012041507A JP2012041507A JP2013179429A JP 2013179429 A JP2013179429 A JP 2013179429A JP 2012041507 A JP2012041507 A JP 2012041507A JP 2012041507 A JP2012041507 A JP 2012041507A JP 2013179429 A JP2013179429 A JP 2013179429A
- Authority
- JP
- Japan
- Prior art keywords
- packet processing
- distribution
- flow
- unit
- parallel
- 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
Links
Images
Abstract
Description
本発明は、ネットワーク内でデータを送受信および中継する方法及び装置に関し、特に、L7(レイヤ7)/L4(レイヤ4)スイッチのような、転送データでの広い範囲を参照して転送データを修正する処理や参照データの情報に基づきデータをある方路へ転送または廃棄する処理での、並列処理による性能向上の方法と、そのような方法に基づいて構成された装置に関する。 The present invention relates to a method and apparatus for transmitting / receiving and relaying data in a network, and in particular, corrects transfer data with reference to a wide range of transfer data such as L7 (Layer 7) / L4 (Layer 4) switches. The present invention relates to a method for improving performance by parallel processing in processing for transferring data or processing for transferring or discarding data to a certain path based on information of reference data, and an apparatus configured based on such a method.
パケット転送は、一般に、ネットワーク内に設けられるノード装置によって処理される。パケット転送処理に対する要求の多様化と高度化により、パケット転送処理をソフトウェアベースで柔軟に実現しながらも、複数のノード装置を設けたり、ノード装置をマルチプロセッサ構成としたり、ノード装置内のプロセッサとして1チップに複数のコアが集積されたマルチコア構成のものを用いたりして並列処理によるスケールアウトを行い、性能向上を図ることが重要となっている。さらに、仮想化に合わせた柔軟な処理割当てなどを実現するために、動的に各処理プログラムに対する並列数を変更する、または、低消費電力化のために並列数を変化させて電源のオン/オフ制御を実行するという要求も高まってきている。ルータやL7スイッチでのパケット処理のように、短時間に大量の単純処理を実行しなければならない場合には、並列処理が特に有効である。 The packet transfer is generally processed by a node device provided in the network. With the diversification and sophistication of packet transfer processing requirements, packet transfer processing can be implemented flexibly on a software basis, but multiple node devices can be installed, node devices can be configured as multiprocessors, and the processor within the node device It is important to improve performance by scaling out by parallel processing using a multi-core configuration in which a plurality of cores are integrated on one chip. Furthermore, in order to realize flexible processing allocation in accordance with virtualization, the parallel number for each processing program is dynamically changed, or the parallel number is changed in order to reduce power consumption. There is also an increasing demand to execute off control. Parallel processing is particularly effective when a large amount of simple processing must be executed in a short time, such as packet processing at a router or L7 switch.
パケット転送処理での一般的な並列処理は、実際に処理を行う複数のパケット処理部と、それらのパケット処理部に対して負荷分散などを考慮してパケットあるいはデータを振り分ける振分部で実現される。マルチコア構成のプロセッサが用いられるとすれば、パケット処理部は、パケット処理用のプログラムをロードしたコアによって実現され、振分部は振分用のプログラムをロードしたコアによって実現される。したがって、パケット処理部は処理コアとも呼ばれ、振分部は振分コアとも呼ばれる。 General parallel processing in packet transfer processing is realized by a plurality of packet processing units that actually perform processing and a distribution unit that distributes packets or data to these packet processing units in consideration of load distribution and the like. The If a processor having a multi-core configuration is used, the packet processing unit is realized by a core loaded with a packet processing program, and the distribution unit is realized by a core loaded with a distribution program. Therefore, the packet processing unit is also called a processing core, and the sorting unit is also called a sorting core.
図1は、上述した並列処理を実行するパケット処理装置101の一般的な構成を示している。ネットワークとの接続に用いられる2つのインタフェース(I/F)部102,103が設けられており、インタフェース部102,103は、いずれもパケット入力部104とパケット出力部105とに接続している。パケット入力部104は、パケット処理の対象となるパケットを外部から受信するための受信インタフェース回路であり、パケット出力部105は、パケット処理がなされたパケットを外部に送信するための送信インタフェース回路である。パケット入力部104とパケット出力部105は、内部バス106に接続し、内部バス106には、振分部(振分コア)107と複数のパケット処理部(処理コア)108も接続している。パケット処理の実施において必要とするためにデータを保持するデータ保持部109が外部メモリとして設けられており、複数のパケット処理部108は、メモリバス110を介してデータ保持部109に接続する。データ保持部109は、複数のパケット処理部108に対する共有メモリとして機能するものである。この構成においてパケット入力部104、パケット出力部105、内部バス106、振分部107、パケット処理部108及びメモリバス110は、マルチコア構成のプロセッサ(例えばマルチコア構成のCPU(中央演算ユニット))111内に形成されている。
FIG. 1 shows a general configuration of a packet processing apparatus 101 that performs the parallel processing described above. Two interface (I / F)
以下の説明において、個々のパケット処理部108を区別して説明する場合には、コア1、コア2、…などのように「コア」の用語に数字を付したものを使用するものとする。
In the following description, when the individual
各パケット処理部108で実行されるパケット処理は、例えば、ファイアウォール(FW)処理、QoS(Quality of Service)処理、NAPT(Network Address Port Translation)処理、暗号/複号処理などが挙げられ、各パケット処理部108には、これらの処理を実行するためのプログラムが実装される。この構成では、ネットワーク側から受信したパケットは、パケット入力部104を介して、振分部107によって指定されたパケット処理部108に送られる。パケットが送られてきたパケット処理部108は、そのパケットに対してパケット処理を実行し、パケット処理がなされたパケットは、パケット出力部105を介してネットワーク側に送信される。
Examples of packet processing executed by each
各パケット処理部108は、パケット処理の実施に際して、転送テーブルやアドレス変換テーブルなどのデータを参照するためにデータ保持部109にアクセスするが、このデータ保持部109は、複数のパケット処理部108からのアクセスが集中するため、ボトルネックとなりやすく、また、そもそも外部メモリであるデータ保持部109にアクセスする時間自体も性能低下を引き起こす。このボトルネックを回避するために、各パケット処理部108では、データコピー部として機能するキャッシュメモリが設けられており、このキャッシュメモリにデータのコピーの一部を保持することで高速な処理を実現している。ここでのキャッシュメモリは、例えば、マルチコアのプロセッサ111における各コアごとのキャッシュメモリとして設けられているものである。しかしキャッシュメモリの容量は限られていて必要な全データのコピーをキャッシュメモリ上に置くことはできず、キャッシュにおけるミスヒットが発生する。このようなミスヒットが発生すると、パケット処理部108がデータ保持部109へのアクセスを行う必要が生じて性能が低下する。図2は、上述したパケット処理装置における並列処理動作を示している。図2に示したものでは、各パケット処理部108(処理コア1〜4)は同一プログラムの実行が可能であるとし、振分部107は、ハッシュ関数などを用いた単純なアルゴリズムで後述するフロー単位で振分先を決定するものとしている。図2は、キャッシュミスヒットが発生した場合に、データ保持部109への問い合わせが発生することを示している。
Each
できるかぎりキャッシュミスヒットを低減させるためには、振分部107において、同じ処理が施されることになるパケットを可能な限り同じパケット処理部へ振り分けるようにすればよい。このため振分部107は、パケットのヘッダ(5-tuple等)を参照し、同じパケット処理の対象となる一連のパケット群(フロー)を特定して、フロー単位に振り分けを行う。
In order to reduce cache miss hits as much as possible, the
また、複数のパケット処理部108で処理することになるパケットの振り分けを行うことから、振分部107には負荷が集中しやすい。振分処理がボトルネックとなることを防ぐためには、振分部107での振分処理として、単純な動作のものを用いる必要がある。個々のフローとそれらのフローに対して割り当てる処理コア(割当処理コア)のID(識別番号)とをメモリ上のテーブルで管理し、割当処理コアをメモリアクセスを伴う検索により特定するような振分動作は、メモリアクセスが多くてボトルネックとなりやすい。それよりも、非特許文献1に記載されるように、パケットヘッダでのフローを特定する領域からハッシュ関数などによりハッシュ値を算出して、そのハッシュ値に基づき、割当処理コアのIDが記述されたメモリアドレス番地を引く、もしくは、ハッシュ値からある程度まとめたフロー群で割当処理コアIDを検索する、といった動作から割当コアを求める動作の方が好ましく、これらの動作を用いることによって、メモリアクセス数を削減し、高速に処理可能とすることが可能である。
Further, since the packets to be processed by the plurality of
このようにハッシュ関数を用いて振分を行う場合、柔軟な処理割当や省電力化のためにパケット処理部108の並列数を増減させると、新たに加えたパケット処理部108にも処理割当が行われ、あるいは、削減したパケット処理部には処理割当が行われないように、振分アルゴリズム(振分条件)を変更する。具体的には、ハッシュ値を求めるために使用するハッシュ関数の変更、ハッシュ値からフローをまとめる際に用いるしきい値の変更、まとまったフロー群と割当処理コアIDとの対応関係の変更などを行う必要がある。このような振分条件の変更を行うと、並列数の変更前後で多くのフローが異なったパケット処理部へ割り当てられることとなり、その結果、短時間にキャッシュミスヒットが集中して発生し、処理遅延が大きくなる。例えば、並列数を1つ増加させた場合は、新しいパケット処理部108に割り当てられたフローの処理では、全て、キャッシュミスヒットが発生することから、データ保持部109へのアクセス所要時間が長いことに起因して、パケット処理部108での処理遅延が発生する。
In this way, when allocating using a hash function, if the number of parallel processing of the
図3は、パケット処理部108を1つ追加したときのキャッシュミスヒットの発生を説明する図である。(A)に示すように、コア1〜コア3までの3個のパケット処理部(処理コア)108が設けられており、振分部107はそれらの処理コアに対してフローA〜Dを振分けているものとする。ここで新たにコア4を処理コアとして追加したとすると、振分部107は、振分アルゴリズムを3分割用のものから4分割用のものに切り替えて、フローA〜Dを4個のコア1〜4に改めて振分ける。その結果、(B)に示すように、各コアには従前のフローとは異なるフローが割り当てられることとなって、各コアにおいてキャッシュミスヒットが発生することになる。その結果、(C)に示すように、変更タイミングの直後に、処理遅延が急増することになる。
FIG. 3 is a diagram for explaining the occurrence of a cache miss when one
もう一例として、並列数を1つ減少させた場合は、残ったパケット処理部の全てに、減らしたパケット処理部の担当してたフローが割り当てられ、その結果、キャッシュミスヒットが複数のパケット処理部で発生し、データ保持部へのアクセス競合による待ち時間に起因して、各パケット処理部での処理遅延が発生する。個々のパケットに対する処理量は小さいものの多数のパケットに対して低遅延で順序逆転なく処理を実行することが求められるパケット転送処理において、このような振分先の変更時に発生する遅延は大きな課題である。 As another example, when the number of parallel processes is reduced by 1, the flow handled by the reduced packet processing unit is assigned to all of the remaining packet processing units. Processing delay in each packet processing unit due to a waiting time due to contention for access to the data holding unit. Although the amount of processing for each packet is small, the delay that occurs when changing the distribution destination is a major issue in packet transfer processing that requires processing with a low delay and no order inversion for many packets. is there.
パケット転送処理において並列処理を採用する場合、並列数の変更に伴って振分先を変更する際に大きな遅延が発生する。このような遅延の発生は、パケットの正常な転送を阻害する恐れがある。 When parallel processing is adopted in packet transfer processing, a large delay occurs when the distribution destination is changed in accordance with the change of the parallel number. The occurrence of such a delay may hinder the normal transfer of packets.
本発明の目的は、並列処理によってパケットを処理する際に振分先が変更可能であって、かつ、振分先の変更時に発生する処理遅延の影響を低減した並列パケット処理方法を提供することにある。 An object of the present invention is to provide a parallel packet processing method in which a distribution destination can be changed when a packet is processed by parallel processing, and the influence of a processing delay generated when the distribution destination is changed is reduced. It is in.
本発明の別の目的は、並列処理によってパケットを処理する際に振分先が変更可能であって、かつ、振分先の変更時に発生する処理遅延の影響を低減した並列パケット処理装置を提供することにある。 Another object of the present invention is to provide a parallel packet processing apparatus that can change the distribution destination when processing packets by parallel processing and that reduces the influence of processing delay that occurs when the distribution destination is changed. There is to do.
本発明の第1の並列パケット処理方法は、複数のパケット処理手段に対してフローを振り分けて複数のパケット処理手段間で並列にフローに対するパケット処理を実行する並列パケット処理方法であって、複数のパケット処理手段に対してフローを振り分ける、相互に異なる第1及び第2の振分アルゴリズムを用意し、第1の振分アルゴリズムをフローに適用している状態から、フローごとにそのフローに対して第2の振分アルゴリズムが適用される確率が時間経過とともに高くなるようにして、第2の振分アルゴリズムがフローに適用される状態に切り替える。第1の並列パケット処理方法の例示的な態様においては、第1の振分アルゴリズムによって振分先となるパケット処理手段の数と第2の振分アルゴリズムによって振分先となるパケット処理手段の数とが異なるようにしてもよい。 A first parallel packet processing method of the present invention is a parallel packet processing method for distributing a flow to a plurality of packet processing means and executing packet processing on the flow in parallel between the plurality of packet processing means, From the state in which the first distribution algorithm different from each other and the first distribution algorithm different from each other are allocated to the packet processing means, and the first distribution algorithm is applied to the flow, The probability that the second distribution algorithm is applied is increased with the passage of time so that the second distribution algorithm is applied to the flow. In an exemplary aspect of the first parallel packet processing method, the number of packet processing means to be assigned by the first distribution algorithm and the number of packet processing means to be assigned by the second distribution algorithm And may be different.
本発明の第2の並列パケット処理方法は、複数のパケット処理手段に対してフローを振り分けて複数のパケット処理手段間で並列にフローに対するパケット処理を実行する並列パケット処理方法であって、複数のパケット処理手段に対してフローを振り分ける、相互に異なる第1及び第2の振分アルゴリズムを用意し、第1の振分アルゴリズムを用いてフローを複数のパケット処理手段に振り分け、振り分けられたフローのうち、特定のパケット処理手段に振り分けられることとなったフローに対して第2の振分アルゴリズムを適用して再振分を実行する。第2の並列パケット処理方法の例示的な態様においては、第2の振分アルゴリズムは、特定のパケット処理手段を除いた複数のパケット処理手段にフローを振り分ける振分アルゴリズムであるようにしてもよい。 A second parallel packet processing method of the present invention is a parallel packet processing method for distributing a flow to a plurality of packet processing means and executing packet processing on the flow in parallel between the plurality of packet processing means, Prepare different first and second distribution algorithms that distribute flows to packet processing means, and distribute flows to a plurality of packet processing means using the first distribution algorithm. Among them, the second distribution algorithm is applied to the flow that has been distributed to the specific packet processing means, and redistribution is executed. In an exemplary aspect of the second parallel packet processing method, the second distribution algorithm may be a distribution algorithm that distributes a flow to a plurality of packet processing means excluding a specific packet processing means. .
本発明の第3の並列パケット処理方法は、複数のパケット処理手段に対してフローを振り分けて複数のパケット処理手段間で並列にフローに対するパケット処理を実行する並列パケット処理方法であって、複数のパケット処理手段に対してフローを振り分ける振分アルゴリズムを変更可能とし、振分アルゴリズムを変更する前に、その変更によって各フローが複数のパケット処理手段のいずれにおいて処理されるように変化するかを判断し、判断の結果に基づいて事前に、変更後の各フローの処理に必要なデータを対応するパケット処理手段に保持させ、その後、振分アルゴリズムの変更を行う。 A third parallel packet processing method of the present invention is a parallel packet processing method for distributing a flow to a plurality of packet processing means and executing packet processing on the flow in parallel between the plurality of packet processing means, The distribution algorithm for distributing flows to packet processing means can be changed, and before changing the distribution algorithm, it is determined which of the multiple packet processing means will change each flow due to the change. Then, based on the determination result, the data necessary for the processing of each changed flow is held in advance in the corresponding packet processing means, and then the distribution algorithm is changed.
本発明の第1の並列パケット処理装置は、フローに対してパケット処理を行う複数のパケット処理手段と、相互に異なる第1及び第2の振分アルゴリズムにより複数のパケット処理手段にフローを振り分ける振分手段と、第1の振分アルゴリズムをフローに適用している状態から、フローごとにそのフローに対して第2の振分アルゴリズムが適用される確率が時間経過とともに高くなるようにして第2の振分アルゴリズムがフローに適用される状態に切り替えるように、振分手段を制御する制御手段と、を有する。第1の並列パケット処理装置の例示的な態様においては、第1の振分アルゴリズムによって振分先となるパケット処理手段の数と第2の振分アルゴリズムによって振分先となるパケット処理手段の数とが異なっており、制御手段は、複数のパケット処理手段での並列数の変更を契機として、振分手段に状態の切り替えを指示するようにしてもよい。 The first parallel packet processing device according to the present invention includes a plurality of packet processing means for performing packet processing on a flow, and a plurality of packet processing means for distributing flows to the plurality of packet processing means using mutually different first and second distribution algorithms. From the state in which the distribution means and the first distribution algorithm are applied to the flow, the probability that the second distribution algorithm is applied to the flow for each flow is increased with the passage of time. Control means for controlling the distribution means so as to switch to a state in which the distribution algorithm is applied to the flow. In the exemplary aspect of the first parallel packet processing apparatus, the number of packet processing means that are the distribution destinations by the first distribution algorithm and the number of packet processing means that are the distribution destinations by the second distribution algorithm The control unit may instruct the distribution unit to change the state when the parallel number is changed by the plurality of packet processing units.
本発明の第2の並列パケット処理装置は、フローに対してパケット処理を行う複数のパケット処理手段と、第1の振分アルゴリズムにより複数のパケット処理手段にフローを振り分る振分手段と、振分手段を制御する制御手段と、を備え、振分手段は、第1の振分アルゴリズムを適用して振り分けられたフローについてそのフローの振分先に基づいて再振分の要否を判断する再振分判断部を有し、再振分が必要と判断したときに、第1の振分アルゴリズムとは異なる第2の振分アルゴリズムでそのフローを複数のパケット処理手段に再振分し、制御手段は、第1の振分アルゴリズムによって特定のパケット処理手段に割り振られることとなったフローの再振分を振分手段に指示する。第2の並列パケット処理装置の例示的な態様においては、第2の振分アルゴリズムは、特定のパケット処理手段を除いた複数のパケット処理手段にフローを振り分ける振分アルゴリズムであるようにしてもよい。 A second parallel packet processing device of the present invention includes a plurality of packet processing means for performing packet processing on a flow, a distribution means for distributing the flow to the plurality of packet processing means by a first distribution algorithm, Control means for controlling the distribution means, and the distribution means determines whether or not the redistribution is necessary based on the distribution destination of the flow for the flow distributed by applying the first distribution algorithm. A redistribution determination unit that redistributes the flow to a plurality of packet processing means using a second distribution algorithm different from the first distribution algorithm when it is determined that redistribution is necessary. The control unit instructs the distribution unit to redistribute the flow that has been allocated to the specific packet processing unit by the first distribution algorithm. In an exemplary aspect of the second parallel packet processing device, the second distribution algorithm may be a distribution algorithm that distributes a flow to a plurality of packet processing means excluding a specific packet processing means. .
本発明の第3の並列パケット処理装置は、フローに対してパケット処理を行う複数のパケット処理手段と、変更可能な振分アルゴリズムにより複数のパケット処理手段にフローを振り分ける振分手段と、振分アルゴリズム情報と振り分け対象となるパケット処理手段の数と各フロー情報を保持し、振分アルゴリズムの変更後に各フローがいずれのパケット処理手段により処理されるように変化するかを判断し、判断の結果に基づいて必要なデータを予め保持するよう各パケット処理手段に指示した後、振分先を変更するように振分手段を制御する制御手段と、を有する。 A third parallel packet processing device of the present invention includes a plurality of packet processing means for performing packet processing on a flow, a distribution means for distributing the flow to the plurality of packet processing means by a changeable distribution algorithm, Stores the algorithm information, the number of packet processing means to be distributed and each flow information, and determines which packet processing means each flow changes after the distribution algorithm is changed. And control means for controlling the distribution means so as to change the distribution destination after instructing each packet processing means to hold necessary data in advance.
本発明では、振分先の変更に時間の要素を取り入れ、少数のフロー単位に時間的に分散させて第1の振分アルゴリズムが適用される状態から第2の振分アルゴリズムが適用される状態へと振分先変更を行うことで、キャッシュミスヒットの発生の集中を防ぎ、振分先変更時の処理遅延の発生の低減が可能となる。また本発明では、特定の振分先に振り分けられたフローに対して再振分を行うことで、振分処理におけるフローとパケット処理コアの割当管理の負担を軽減しつつ、キャッシュミスヒットの発生の集中を防ぎ、振分先変更時の処理遅延の発生を低減することが可能となる。また本発明では、振分先の変更により各フローがいずれのパケット処理手段で処理されるようになるかを予測し、その予測結果に基づいて各フローのパケット処理に必要なデータを予め各パケット処理手段にキャッシュさせることで、キャッシュミスヒットの発生を防ぎ、振分先変更時の処理遅延の発生を低減することが可能となる。 In the present invention, a state in which the second distribution algorithm is applied from the state in which the first distribution algorithm is applied by incorporating the time element into the change of the distribution destination and temporally distributing it to a small number of flow units. By changing the distribution destination, it is possible to prevent the occurrence of cache miss hits and reduce the processing delay when changing the distribution destination. In addition, in the present invention, by performing redistribution on a flow allocated to a specific distribution destination, a cache miss hit occurs while reducing the burden of allocation management between the flow and the packet processing core in the distribution processing. It is possible to reduce the occurrence of processing delay when changing the distribution destination. In the present invention, it is predicted which packet processing means each flow will be processed by changing the distribution destination, and data necessary for packet processing of each flow is previously stored in each packet based on the prediction result. By causing the processing means to cache, it is possible to prevent the occurrence of a cache miss and reduce the occurrence of a processing delay when changing the distribution destination.
次に、本発明の好ましい実施の形態について、図面を参照して説明する。 Next, a preferred embodiment of the present invention will be described with reference to the drawings.
図4は本発明の実施の一形態のパケット処理装置におけるパケット処理を示す図であって、(A)は実施の一形態のパケット処理装置の要部を示すブロック図、(B)は新旧振分処理を説明する図、(C)はパケット処理における遅延の時間変化を示すグラフである。 4A and 4B are diagrams showing packet processing in the packet processing apparatus according to the embodiment of the present invention. FIG. 4A is a block diagram showing the main part of the packet processing apparatus according to the embodiment, and FIG. The figure explaining minute processing, (C) is a graph which shows the time change of the delay in packet processing.
本実施形態のパケット処理装置は、図1に示したものと同様に、ネットワークとの接続に用いられる複数のインタフェース部と、パケット処理を並列に実行するマルチコア構成のプロセッサ111と、パケット処理の実施において必要とするためにデータを保持する外部メモリとしてデータ保持部109とを備えたものである。図1に示したものとの相違点は、プロセッサ111における各プロセッサコアがどのように使用されるかという点であるので、図4の(A)では、本実施形態のパケット処理装置のうち、プロセッサ111とデータ保持部(外部メモリ)109の部分だけが示されている。
The packet processing apparatus according to the present embodiment has a plurality of interface units used for connection to a network, a
プロセッサ111には、図1に示したものと同様に、パケット入力部104、パケット出力部105、内部バス106、振分部(振分コア)107、複数のパケット処理部(処理コア)108、及びメモリバス110が設けられ、さらに、各パケット処理部108でのパケット処理と振分部107でのフローの振分とを制御するために、制御部112が設けられている。制御部112は、マルチコア構成のプロセッサ111において、制御用のプログラムをロードしたコアによって実現されるのものであり、制御コアとも呼ばれるものである。制御部112は、内部バス106を介して各パケット処理部108と振分部107とに接続しており、各パケット処理部108における処理プログラムを動的に変更し、さらに、振分部107に対して振分方法の変更を指示することで、プログラムのロード状況などに合わせて並列処理数を動的に変更することができ、また、外的要因で並列処理数が変化した場合にその変化にパケット処理装置が対応できるようにする。各パケット処理部108での処理プログラムの動的な変更は、例えば、処理プログラムのロードやリロードによって行われる。特に、本実施形態のパケット処理装置では、複数のパケット処理部108に対するフローの振分での振分先の変更を行う際に、時間の要素を取り入れ、少数のフロー単位に時間的に分散させて振分先変更を行うことで、キャッシュミスヒットの発生の集中を防ぎ、振分先変更時の処理遅延の発生の低減を可能としている。時間の要素を取り入れた振分先の変更を時間変動切替と呼ぶ。また、このパケット処理装置では、特定のパケット処理部に割り当てられていたフローのみを対象として、再度、振分の処理を実行することによって、振分処理におけるフローとパケット処理部の割当管理の負担を軽減しつつ、キャッシュミスヒットの発生の集中を防ぎ、振分先変更時の処理遅延の発生の低減を可能としている。特定のパケット処理部に割り当てられていたフローに対して再度、振分の処理を行うことを再振分と呼ぶ。また、このパケット処理装置では、振分先の変更により各フローがいずれのパケット処理手段で処理されるようになるかを予測し、予測結果に応じて各フローのパケット処理に必要なデータを予め各パケット処理手段にキャッシュさせることでキャッシュミスヒットの発生を防ぎ、振分先変更時の処理遅延の発生を低減することを可能としている。以下、本実施形態での振分先の変更について説明する。
The
まず、時間変動切替による振分アルゴリズムの切替について説明する。 First, switching of the distribution algorithm by time variation switching will be described.
図4(A)に示した構成において、当初は3個のパケット処理部108、具体的にはコア1〜3のみがパケット処理に用いられていたとする。その状態では、振分部107は、入力したフローを3つのコアに振り分けるアルゴリズムを使用して、コア1〜コア3にフローを振り分けている。ここで、制御部112が、並列処理に参加するパケット処理部(処理コア)の数を並列数変更指示を出力することによって、コア4の新規起動あるいは割当変更を行い、あるいは、並列数の変更を検出してコア4が新たに加わったことを認識したものとする(図4の[1])。このとき制御部112は、振分部107に対して、振分先切替の開始と、利用する振分アルゴリズムとを指示する(図4の[2])。振分アルゴリズムの指示は、具体的には、利用するハッシュ関数の指示などである。
In the configuration shown in FIG. 4A, it is assumed that initially three
振分部107は、制御部112からの制御によって、フローを3つのコアに振り分ける振分アルゴリズム(3分割用振分アルゴリズム)と、フローを4つのコアに振り分ける振分アルゴリズム(4分割用振分アルゴリズム)とを実行可能であるとともに、フローごとに2つの振分アルゴリズムのどちらを適用するかを決定する振分アルゴリズム(新旧振分アルゴリズム)を実行可能である。特に新旧振分アルゴリズムは、切替開始指示からの時間経過をしきい値に利用して、新しい振分に対応する振分アルゴリズム(ここでは4分割用振分アルゴリズム)に渡されるフローが徐々に大きくなるように、2つの振分アルゴリズム(3分割用振分アルゴリズムと4分割用振分アルゴリズム)に対してフローを割り当てる。具体的には、図4(B)に示すように、フローからハッシュ値を計算し、ハッシュ値に応じてそのフローを(旧)3分割用振分アルゴリズムに振り分けるか(新)4分割用振分アルゴリズムに振り分けるかを決定し、この決定のしきい値を時間の経過に応じて変化させている。3分割用振分アルゴリズムと4分割用振分アルゴリズムは、新旧振分アルゴリズムよって振り分けられたフローをパケット処理部(処理コア)に振り分ける。このように、新しい振分に対応する振分アルゴリズムが適用されるフロー数を徐々に増やすようにすることにより、コア1〜4から外部メモリへのアクセスの集中を防ぎながら、振分先の変更を行うことができる。
The
図4(C)は、本実施形態でのパケットの処理遅延の時間変化を示すグラフである。このグラフからも分かるように、フローに対して新しい振分を徐々に適用しているので、変更タイミングの直後に処理遅延が急増することはなく、パケット処理性能への振分先変更の影響が小さく、パケット処理に要求される時間的制約を十分に満たすことが可能となる。 FIG. 4C is a graph showing a change over time in packet processing delay in the present embodiment. As can be seen from this graph, since new distribution is gradually applied to the flow, the processing delay does not increase immediately after the change timing, and the influence of changing the distribution destination on the packet processing performance is not affected. It is small and can sufficiently satisfy the time constraint required for packet processing.
図5は、振分部における判断ロジックの具体的な例を示している。切替開始指示の時刻をt0とし、現在の時刻をtとすると、切替開始からの経過時間Δtは、
Δt=t−t0
で表される。そこで、経過時間Δtの関数F(Δt)として、しきい値を表すことにする。フローから求められるハッシュ値(出力Index値)がハッシュ空間においてIndex 0とIndex Xとの間をとるものとすると、出力Indexと、時間変化するしきい値F(Δt)とによって、フローを新旧いずれの振分アルゴリズムに振り分けるかを判断する。しきい値を表す関数Fとしては、F(0)では値がIndex 0であり、所定の時間をTとしてF(T)では値がIndex Xであり、その間は経過時間Δtに応じて例えば直線的に変化するものを用いることができる。
FIG. 5 shows a specific example of determination logic in the distribution unit. When the time of the switching start instruction is t 0 and the current time is t, the elapsed time Δt from the switching start is
Δt = t−t 0
It is represented by Therefore, the threshold value is expressed as a function F (Δt) of the elapsed time Δt. Assuming that the hash value (output index value) obtained from the flow is between
時間変動切替では、柔軟な処理割当や省電力化のためにパケット処理部の並列数を動的に増減させることを、パケット処理性能への影響を少なく実施することができる。 In the time variation switching, dynamically increasing or decreasing the parallel number of packet processing units for flexible process allocation and power saving can be implemented with less influence on packet processing performance.
また、時間変動切替は、パケット処理部への振分フロー数に偏りが発生した場合に、振分処理におけるフローとパケット処理部の割当変更の負担を軽減しつつ、より偏りのない振分方法へと変更するために用いることができる。パケット処理部間で処理量の偏りが生じた時、その偏りは制御部112によって検出される。その検出に基づいて制御部112は、より偏りが生じないように、フロー振分におけるアルゴリズムの変更(例えば、ハッシュ値を求めるために用いられるハッシュ関数の変更、ハッシュ値からフローをまとめる際に用いられるしきい値の変更、など)を振分部107に指示する。振分部107は、この指示に応じて、時間変化するしきい値を用いて、新振分アルゴリズムに振り分けられるフローが徐々に増加するように、フローを新旧の振分アルゴリズムの間で振り分ける。
In addition, when the time variation switching is biased in the number of distribution flows to the packet processing unit, the distribution method is more evenly distributed while reducing the burden of allocation change between the flow and the packet processing unit in the distribution process. Can be used to change When a processing amount deviation occurs between the packet processing units, the deviation is detected by the
図4に示した構成では、並列数変更指示による振分の切替を行う際、制御部112は、処理コアの並列数を変更するためのパケット処理用のプログラムをプロセッサ111にリロードするときに、振分部107に対して振分先変更の契機を指示している。処理コアの数を減少させる場合には、振分先の変更が完了してからプログラムのリロードを行い、処理コアの数を増やす橋には、プログラムのリロードの完了後に振分先変更を開始させる。
In the configuration shown in FIG. 4, when switching the allocation according to the parallel number change instruction, the
フローの偏りが発生したことに基づいて振分の切替を行う場合には、振分部107が各処理コアに振り分けたフローの数を制御部112にフィードバックし、制御部112は、そのフィードバック情報に例えばしきい値を適用して偏りを検出し、偏りを検出したこによって振分先変更を開始させる。あるいは、各コアの負荷状況(例えばCPU使用率)を制御部112が収集し、負荷状況に対して例えばしきい値を適用して偏りを検出するようにしてもよい。
When switching distribution based on the occurrence of flow bias, the number of flows allocated to each processing core by the
次に、再振分による振分アルゴリズムの切替について説明する。 Next, switching of the distribution algorithm by redistribution will be described.
図6は、特定のパケット処理装置(処理コア)において障害が発生した場合のフローの再振分を説明する図である。図6(A)は、図4に示したパケット処理装置において、4個のパケット処理部(コア1〜4)がパケット処理を行っている状態を示している。このとき、図6(B)に示すように、フローは、例えば、コア1、コア2及びコア4に振り分けられている。ここで、コア4において障害が発生したとする。すると、制御部112は、障害発生を検出し(図6の[1])、障害発生の検出に応じて、振分部107に対し、再振分の開始と、利用する振分アルゴリズムとを指示する(図6の[2])。具体的には、既存の振分アルゴリズムで振り分けたフローに対して再振分を要するかどうかの再振分判断を行い、障害を発生したパケット処理部(ここではコア4)に振り分けられたフローについて、障害を発生していないパケット処理部(ここではコア1〜3)に振り分けるように、制御部112は振分部107に指示する。その結果、図6の(C)に示すように、振分部107は、コア4に行くとされていたフローについて、再振分判断の結果、再振分を要するものとして、コア4以外の別のコアに振り分けるようにする。障害発生前に図6の(B)に示すようにフローが振り分けられていたとして、再振分の結果、図6の(D)に示すように、コア4あてのフローをコア3に振り分ける。なお、障害の発生の検出は、制御部112が処理コアの正常性を常時監視することによって、容易に行うことができる。
FIG. 6 is a diagram for explaining flow redistribution when a failure occurs in a specific packet processing device (processing core). FIG. 6A shows a state where four packet processing units (
このように、特定のパケット処理部に障害が発生した場合に、その障害が発生したパケット処理部を除いてフローを振り返るような振分に切り替えることにより、振分処理におけるフローとパケット処理部の割当変更の負担を軽減しつつ、パケット処理性能への影響を低く抑えたまま、すべてのフローに対するパケット処理を継続することができるようになる。再振分での振分アルゴリズムとしては、1つを除くパケット処理部に振分が行われるような振分関数が用いられる。振分関数は、例えば、並列処理に参加するすべてのパケット処理部からある1つのパケット処理部を除き、残ったパケット処理部をハッシュ関数から導出されるアドレス番地に保存することによって構成される。どのパケット処理部が除かれたかだけが異なるこのような振分関数をパケット処理部の数だけ用意し、障害が発生したパケット処理部に応じてそれらの振分関数の中から該当するものを選択して再振分に使用することによって、障害が発生したパケット処理部に振り分けられたフローを正常なパケット処理部に再振分することができる。 In this way, when a failure occurs in a specific packet processing unit, by switching to a distribution that looks back at the flow except for the packet processing unit in which the failure has occurred, the flow in the distribution processing and the packet processing unit Packet processing for all flows can be continued while reducing the burden of allocation change and keeping the impact on packet processing performance low. As a distribution algorithm in the re-distribution, a distribution function is used in which distribution is performed in the packet processing unit except for one. The distribution function is configured by, for example, excluding one packet processing unit from all the packet processing units participating in the parallel processing and storing the remaining packet processing unit at an address address derived from the hash function. Prepare such distribution functions as many as the number of packet processing units, which differ only in which packet processing units have been removed, and select the appropriate distribution function from those depending on the packet processing unit in which a failure has occurred. By using it for redistribution, it is possible to redistribute the flow allocated to the packet processing unit in which a failure has occurred to a normal packet processing unit.
また、再振分による振分アルゴリズムの切替は、複数のパケット処理部のうちの特定のパケット処理部にフローが集中するような偏りが発生した場合に、その偏りを解消するためにも用いることができる。図7は、偏りの解消のための振分先変更の一例を示している。図7の(A)は、コア1〜コア4のうち、コア4に大量のフローが割り当てられている状態を示している。このような偏りを制御部112が検出すると、障害発生の場合と同様に制御部112は、振分部107に対し、再振分の開始と、利用する振分アルゴリズムとを指示する。その結果、振分部107は、図7の(B)に示すように、コア4に行くとされていたフローについて、再振分判断の結果、再振分を要するものとして、コア4での偏りが解消するように、コア1〜コア4の全体にフローが分散するようにフローの再振分を実行する。再振分のアルゴリズムとしては、例えば、異なるハッシュ関数によりフローからハッシュ値を求めて再振分するものが挙げられる。コア4で障害が起きているわけではないので、再振分により一部のフローは依然としてコア4に振り分けられ続けることになる。再振分による振分アルゴリズム切替を行うことにより、パケット処理部への振分フロー数に偏りが発生した場合において、振分処理におけるフローとパケット処理部の割当変更の負担を軽減しつつ、パケット処理性能への影響を低く抑えたまま、より偏りのない振分方法へと変更することができる。
In addition, switching of the distribution algorithm by redistribution should also be used to eliminate a bias that causes a flow to concentrate on a specific packet processing unit among a plurality of packet processing units. Can do. FIG. 7 shows an example of changing the distribution destination for eliminating the bias. FIG. 7A shows a state in which a large number of flows are assigned to the core 4 among the
フローの偏りの発生の検出は、例えば、振分部107が各処理コアに振り分けたフローの数を制御部112にフィードバックし、制御部112が、そのフィードバック情報に例えばしきい値を適用することによって実現できる。あるいは、各コアの負荷状況(例えばCPU使用率)を制御部112が収集し、負荷状況に対して例えばしきい値を適用するようにしてもよい。
For example, detection of the occurrence of a flow deviation is performed by feeding back the number of flows distributed to each processing core by the
次に、各フローの振分先の変更後のパケット処理部108を予測し、その予測に基づいて予め各フローのパケット処理に必要なデータを各パケット処理部108に保持させる切替について説明する。これは振分アルゴリズムには依らないが、ここでは図4(A)を例に説明する。
Next, switching for predicting the
制御部112が、データ保持部109の各フローのフロー情報と、振分アルゴリズム、振り分け対象となるパケット処理部108の数とから、振分アルゴリズムまたは振分先となるパケット処理部108の数の変更により各フローがどのパケット処理部108に振り分けられるように変更されるかを予測し、振分部107に対して振分アルゴリズムの変更の実施を指示する前に、予め、各パケット処理部108のキャッシュ内に、変更後に処理することとなる各フローのパケット処理に必要なデータを保持させる。例えば、パケットのヘッダの5-tupleからハッシュを計算しそのハッシュ値から振分先のパケット処理部を決めている場合には、データ保持部109内の各フローの5-tupleとハッシュ計算に用いるハッシュ関数とハッシュ値からパケット処理部108を決定する割り当て方法とが分かれば、各フローがどのパケット処理部108で処理されることになるかが判断可能である。
Based on the flow information of each flow in the
さらに、時間変動振分や再振分によって同時に振分先が変更されることとなるフロー数を削減することで、予めパケット処理部108が保持すべきデータ量を削減することができ、パケット処理部108のキャッシュの必要サイズを削減することができる。
Furthermore, by reducing the number of flows whose assignment destinations are changed at the same time due to time-variant distribution or redistribution, the amount of data that the
なお、QoS処理のシェイピングのように、パケットごとにテーブル情報が更新される処理に関するデータについては、各パケット処理部108のキャッシュとデータ保持部109との間での情報同期を行い、振分先変更時の情報不整合を防ぐようにする。
For data related to processing in which table information is updated for each packet, such as shaping of QoS processing, information synchronization is performed between the cache of each
次に、本発明に基づくパケット処理装置の具体的な構成について説明する。図8〜図13は、それぞれ、パケット処理装置の構成例を示している。これらのパケット処理装置は、図4に示したものと同様のものであり、振分部107、複数のパケット処理部108及び制御部112の具体的な構成がそれぞれ明らかになっている点で図4に示したものと異なっているから、図8〜図12では、パケット処理装置のうち、パケット入力部103、パケット出力部104、振分部107、複数のパケット処理部108及び制御部112の部分のみが示されている。図13では、パケット入力部103、パケット出力部104、振分部107、複数のパケット処理部108及び制御部112に加え、データ保持部109も示されている。なお、複数のパケット処理部108によって並列処理部113が構成されている。また、パケット処理部(処理コア)108ごとにそのコアを特定するコアID(識別番号)が付与されているものとする。
Next, a specific configuration of the packet processing device according to the present invention will be described. 8 to 13 each show a configuration example of the packet processing device. These packet processing apparatuses are the same as those shown in FIG. 4, and the specific configurations of the
図8は、時間変動切替を実行するパケット処理装置の構成の一例を示している。 FIG. 8 shows an example of the configuration of a packet processing device that executes time variation switching.
振分部107は、それぞれ異なった振分アルゴリズムでフローを振り分ける第1振分処理部122及び第2振分処理部123と、パケット入力部104に入力したパケットをフロー単位で第1振分処理部122及び第2振分処理部123に振り分けて受け渡す振分切替部121と、を備えている。振分切替部121は、振分数の変更などを行っていない定常時には、第1振分処理部122及び第2振分処理部123のいずれか一方にのみ、フローを受け渡す。特に振分切替部121は、図4及び図5に示した振分部107において新旧振分を行うものに相当し、制御部112からの指示により、第1振分処理部122及び第2振分処理部123のうちの一方にフローを受け渡す状態から、徐々に、それらのうちの他方にフローを受け渡す状態に遷移する。
The allocating
ここに示す例では、パケット処理部へのフローの振分のために、ハッシュ値から直接導出されるアドレス番地にコアIDを格納するものとする。各振分処理部122,123は、フローに対してハッシュ関数を適用してハッシュ値を求め、そのハッシュ値で表されるアドレス番地に格納されたコアIDに対応するパケット処理部108にそのフローを振り分けるようになっている。第1振分処理部122は、例えば、3つのアドレス番地のいずれかがフローに応じて導出されるようなハッシュ関数を使用し、第2振分処理部123は、例えば、4つのアドレス番地のいずれかがフローに応じて導出されるようなハッシュ関数を使用する。この場合、第1振分処理部122は3分割用振分アルゴリズムによるフロー振分を行い、第2振分処理部123は4分割用振分アルゴリズムによるフロー振分を行うことになる。振分部107においてこれらのハッシュ関数や振分先数、利用するアドレス番地、コアIDは、制御部112から指示・設定される。
In the example shown here, it is assumed that the core ID is stored at an address address directly derived from the hash value for distribution of the flow to the packet processing unit. Each
制御部112は、情報収集部141と振分指示部142とから構成されている。情報収集部141は、各パケット処理部108の情報を収集・管理し、振分の切替契機を抽出し(図8の[1])、切替契機とパケット処理部108との状況とを振分切替契機通知として振分指示部142に通知する(図8の[2])。振分の切替契機としては、例えば、並列処理数の変動、各パケット処理部での処理フロー数の偏りなどが挙げられ、また、制御部112から並列処理部113に対して並列数変更指示を出したことも含まれる。振分指示部142は、情報収集部141の振分切替契機通知から振分方法(例えば、振分先、ハッシュ関数など)を判断し、第1振分処理部122及び第2振分処理部123のうちの動作していない方に新しい振分方法(振分アルゴリズム)を指示し(図8の[3])、振分切替部121に対して振分切替開始を指示する(図8の[4])。その際に、振分指示部142は、新しい振分アルゴリズムに対して一定時間ごとに少数のフローずつ移っていくように、タイマを参照し、判断しきい値の変更を逐次指示する。
The
このように振分指示部142から指示を受けると、振分切替部121は、図5に示したように、パケットデータからハッシュ関数により求められるハッシュ値と、時間変動する判断しきい値から、フローのパケット処理部108への振分を第1振分処理部122で実施するか第2振分処理部123で実施するかをフローごとに判断し、該当する振分処理部にそのフローを受け渡す。上述したように、振分切替部121は、制御部112からの振分先切替の開始指示から振分先の切り替えを開始する。判断しきい値は、一定時間ごとに少数フローずつ振分先のコアが変更されるように変動し、これによって、フローの受け渡し先は、動作中だった振分処理部からそれまで動作していなかった振分処理部へと徐々に変化し、最終的には、それまで動作していなかった方の振分処理部に全フローが受け渡されることになる。
When receiving an instruction from the
第1振分処理部122が3分割用振分アルゴリズムに対応し、第2振分処理部123が4分割用振分アルゴリズムに対応する場合、パケット処理に関する並列数が3であれば、第1振分処理部122のみにフローが受け渡されている。ここで例えば、パケット処理に関する並列数が3から4に増えると、制御部112は新しいパケット処理部を用意し、振分部107に振分の切替開始を指示する。それにより、振分切替部121による切替が開始され、まず、少数のフローのみが第2振分処理部123に渡されるようになる。制御部112は、一定時間経過後に、第2振分処理部123へ渡されるフローが増えるようにしきい値を変更させ、このしきい値の変更を繰り返す。その結果、最終的には全フローが第2振分処理部123に渡されるようになり、3並列から4並列への移行が完了する。
When the first
図9は、時間変動切替を実行するパケット処理装置の構成の別の例を示している。図9に示すものは、図8に示すものと同様のものであるが、制御部112の振分指示部142は振分部107に対して、判断しきい値の逐次指示を行わず、その代わり、振分部107内に振分変更部124が設けられている点で図8のものと異なっている。振分変更部124は、振分指示部142から切替開始指示を受けると(図9の[4])、その内蔵するタイマを参照し、一定時間経過ごとに、振分切替部121に対して判断しきい値の変更を指示する(図9の[5])。この判断しきい値の変更は、フローの受け渡し先が、動作中だった振分処理部からそれまで動作していなかった振分処理部へと徐々に変化し、最終的にはそれまで動作していなかった方の振分処理部に全フローが受け渡されるように行われる。図8に示したものでは判断しきい値が制御部112からの逐一の指示により変更されるのに対し、図9に示したものでは、振分部107において、タイマ参照により自律的に変更されることになる。
FIG. 9 shows another example of the configuration of the packet processing device that executes time variation switching. 9 is the same as that shown in FIG. 8, but the
図10は、時間変動切替によるパケット処理装置であるが、パケット処理部の数に比べて十分に大きい数の仮想ノードを想定し、各仮想ノードに対してコアIDを割り当てておき、フローの振分に対しては、フローのハッシュ値から仮想ノードを導出し、導出された仮想ノードがどのコアIDに対応しているかに応じて、そのフローをパケット処理部に振り分けるようにしたものである。この構成では、振分部107は、仮想ノード振分部125と実ノード振分部126を備えている。仮想ノード振分部125は、パケットデータにハッシュ関数を適用してハッシュ値を求め、そのハッシュ値から、仮想ノードに対応づけられたアドレス番地を導出する。仮想ノードの数は、振分対象となるパケット処理部108の数よりも十分に多いが、それでも、複数のフローが同一の仮想ノードに振り分けられる。実ノード振分部126は、パケットデータが仮想ノードに振り分けられると、その仮想ノードに対応づけられたアドレス番地に保存されているコアIDを検索し、そのパケットデータのフローを検索されたコアIDのパケット処理部108(すなわち実ノード)へ受け渡す。上述した仮想ノードとコアIDとの対応関係は、実ノード振分部126内に記録されている。
FIG. 10 shows a packet processing device based on time variation switching. Assuming a sufficiently large number of virtual nodes compared to the number of packet processing units, a core ID is assigned to each virtual node, and the flow allocation is performed. For the minutes, a virtual node is derived from the hash value of the flow, and the flow is distributed to the packet processing unit according to which core ID the derived virtual node corresponds to. In this configuration, the
制御部112としては、図8に示したものと同様のものが用いられており、割当変更部142は、実ノード振分部126に対し、仮想ノードとコアIDとの割り当ての変更を指示する(図10の[3])。このとき割当変更部142は、タイマを参照し、一定時間ごとに1つの仮想ノードずつ振分先の処理コアを変更するように、実ノード振分部126に指示する。これにより、振分部107は、振分先の切り替えを開始し、切替開始指示からの時間経過に応じて新しい振分に基づいて振り分けられるフローが徐々に多くなるように、フローの各パケット処理部108への振分が実行されることになる。
The
図10に示したものでは、実ノード振分部126での割当変更は、制御部112からの逐次の指示によって行われていたが、振分部107自体が自律的に割当変更を行うようにしてもよい。図11は、振分部107自体が自律的に割当変更を行うようにした構成を示している。図11に示すものでは、制御部112には割当変更部は設けられず、その代わり、振分部107に割当変更部127が設けられている。制御部112から振分部107に対して振分切替契機通知が直接送られており(図11の[2])、振分部107の割当変更部127は、振分切替契機通知を受けて、実ノード振分部126に割当変更を指示する(図11の[3])。
In the example shown in FIG. 10, the allocation change in the real
図12は、特定のパケット処理部にあてたフローを再振分するように構成したパケット処理装置の構成の一例を示している。 FIG. 12 shows an example of a configuration of a packet processing device configured to redistribute a flow assigned to a specific packet processing unit.
図12に示す装置では、制御部112には、図8及び図9に示すものと同様に、情報収集部141と振分指示部142が設けられている。振分部107には、第1振分処理部128と第2振分処理部129と再振分判断部130が設けられている。
In the apparatus shown in FIG. 12, the
制御部112において情報収集部141は、各パケット処理部108の情報を収集・管理し、再振分を実施する契機を抽出するものである。情報収集部141は、各パケット処理部108から情報収集を行い、障害発生やフロー数の偏りなどの変化を検出し(図12の[1])、フローの再振分を行うべきかどうかを判断して、各パケット処理部108の状況に関する情報とともに再振分契機通知を振分指示部142に通知する(図12の[2])。振分指示部142は、再振分契機通知を受け取ると振分指示部142は、再振分契機通知から振分方法(例えば、振分先、ハッシュ関数など)を判断し、第1振分処理部128及び第2振分処理部129に振分方法(振分アルゴリズム)を指示し(図12の[3])、再振分判断部130に対して、再振分の対象となるコアIDと再振分の開始指示などを送る(図12の[4])。
In the
第1振分処理部128は、振分指示部142からの指示に基づく振分アルゴリズム(振分先、ハッシュ関数など)でパケットデータをフロー単位に各パケット処理機能へ振り分け、そのフローのコアIDを対応付けるものであるが、データそのものは再振分判断部130に渡す。第2振分処理部129は、振分指示部142からの指示に基いて、第1振分処理部128におけるものとな異なる振分アルゴリズム(振分先、ハッシュ関数など)で、パケットデータをフロー単位に各パケット処理部108へ振り分ける機能を有する。再振分判断部130は、振分指示部142からの指示により再振分を行う状態となっている場合には、第1振分処理部128から受け取ったフローについて、そのフローに関連づけられているコアIDから、そのフローが再振分の対象となっているパケット処理部108に振り分けられているか否かを判断する。再振分の対象となっているパケット処理部に振り分けられたフローでなければ、再振分判断部130は、そのフローを、フローに関連付けられたコアIDで示すパケット処理部108に受け渡す。一方、第1振分処理部128から受け取ったフローが再振分の対象となるものである場合には、再振分判断部130は、そのフローを第2振分処理部129に受け渡す。
The first
図12に示したパケット処理装置に関し、具体的な動作を説明する。 A specific operation of the packet processing apparatus shown in FIG. 12 will be described.
まず、いずれかのパケット処理部(処理コア)108において障害が発生した場合を説明する。第2振分処理部129には、あらかじめ、並列処理部113内の複数のパケット処理部108のうち、1つを除くパケット処理部にフローの振分が行われるような振分関数が組み込まれている。いずれかのパケット処理部108での障害発生を制御部112が検出すると、再振分の対象とする処理コアを特定しその処理コアを除くように再振分を開始する指示が振分指示部142から再振分判断部130と第2振分処理部129とに送られる。第1振分処理部128での振分により障害発生コアに振り分けられたフローは、再振分判断部130と第2振分処理部129とによって、障害が発生していない処理コアに再振分されることになる。このような再振分は、例えば、障害が発生した処理コアのコアIDが保存されていたアドレス番地に、再振分関数を呼び出す命令へのポインタを格納することにより実現できる。
First, a case where a failure occurs in any of the packet processing units (processing cores) 108 will be described. The second
次に、いずれかのパケット処理部108に対してフローが偏った場合の再振分を説明する。第2振分処理部は、第1振分処理部とは異なるハッシュ関数及びパケットデータの参照範囲などによる振分関数を保持している。再振分の指示が振分指示部142から再振分判断部130と第2振分処理部129とに送られると、偏りが発生した処理コアに割り振られたフローを再振分判断部130が検出し、検出したフローを第2振分処理部129が再度、振り分けることによって、フローの偏りが是正された振分が行われるようになる。
Next, redistribution when the flow is biased with respect to any one of the
図13は、図8に示したパケット処理装置と同様のものであるが、振分先変更を行う場合に、その変更後に各フローがどのパケット処理部108に振り分けられるかを予測し、予測結果に基づき、変更後の各フローのパケット処理に必要なデータを各パケット処理部108に予め保持させる切替を行うように構成したパケット処理装置の構成の一例を示している。
FIG. 13 is the same as the packet processing apparatus shown in FIG. 8, but when changing the distribution destination, predicts which
制御部112は、まず、データ保持部109に保持されているフロー情報を参照し、制御部112において管理している振分アルゴリズムと、振分先となるパケット処理部108の数とから、振分アルゴリズムの変更または振分先となるパケット処理部108の数の変更により、各フローがどのパケット処理部108に振り分けられるようになるかを予測する。そして、制御部112は、振分部112に対して振分アルゴリズムの変更の実施を指示する前に、各パケット処理部108に対し、変更後に処理することになる各フローのパケット処理に必要なデータ(特定データ)を予め保持するよう指示する。その結果、各パケット処理部108は、データ保持部109から事前の情報取得を行う。
First, the
また、制御部112は、時間変動振分や再振分を実行する際に、そのような振分切替によって同時に振分先が変更されることとなるフローの数が多くならないような振分指示を行い、それに合わせて各パケット処理部108に特定データの取得指示を行うことで、パケット処理部108が予め保持しなければならないデータ量を削減することができ、パケット処理部108のキャッシュの必要サイズを削減することができる。
In addition, when executing the time-variable distribution or the re-distribution, the
なお、QoS処理のシェイピングのように、パケットごとにテーブル情報が更新される処理に関するデータについては、各パケット処理部108のキャッシュとデータ保持部109との間での情報同期を行い、振分先変更時の情報不整合を防ぐようにする。
For data related to processing in which table information is updated for each packet, such as shaping of QoS processing, information synchronization is performed between the cache of each
以上、本発明の実施形態について、パケット処理が単一のプロセッサ内の複数の処理コア(パケット処理部)によて行われる場合を例に挙げて説明した。しかしながら、本発明の実施の形態は上記のものに限られるのものではない。例えば、図14に示すように、パケット処理装置内に複数のプロセッサを設けてこれらの複数のプロセッサにおいてパケット処理を並列に実行するようにした場合にも、本発明の並列パケット処理方法を適用することができる。図14に示したパケット処理装置151は、図4に示したパケット処理装置における処理コア(パケット処理部108)をそれぞれパケット処理用プロセッサ153に置き換え、また、振分部107及び制御部112についても、それぞれ独立のプロセッサ(振分用プロセッサ152及び制御用プロセッサ155)に置き換えたものである。この構成は、マルチプロセッサ構成のものであり、内部バス106及びメモリバス110は、いわゆるプロセッサ内バスではなく、プロセッサ間バスとして、パケット処理装置151内に設けられることになる。また、データ保持部154は、複数のプロセッサ153に対して共通の共有メモリとして設けられている。さらに、本発明の並列パケット処理方法は、ネットワークに設けられた複数のノードに分散させてパケット処理を行う場合にも適用できる。図15は、ネットワークを含むシステムとして構成されたパケット処理システムを示している。図15に示すシステムでは、ネットワーク161に対して、振分ノード162と、複数のパケット処理ノード163と、データサーバ164と、制御ノード165とが設けられている。パケット処理の対象となるパケットはネットワーク161に対して、直接、入出力している。ここで、振分ノード162は振分部107と同様の処理を行い、パケット処理ノード163はパケット処理部108と同様の処理を行い、データサーバ164はデータ保持部109と同等の機能を有し、制御ノード165は制御部112と同様の機能を有している。図15に示すようなシステムも、本発明の並列パケット処理装置の範疇に含まれるものである。
As described above, the embodiment of the present invention has been described by taking as an example a case where packet processing is performed by a plurality of processing cores (packet processing units) in a single processor. However, the embodiment of the present invention is not limited to the above. For example, as shown in FIG. 14, the parallel packet processing method of the present invention is applied even when a plurality of processors are provided in the packet processing apparatus and the packet processing is executed in parallel by the plurality of processors. be able to. The
101,151 パケット処理装置
102,103 インタフェース部
104 パケット入力部
105 パケット出力部
106 内部バス
107 振分部
108 パケット処理部
109,154 データ保持部
110 メモリバス
111 プロセッサ
112 制御部
113 並列処理部
121 振分切替部
122,128 第1振分処理部
123,129 第2振分処理部
124 振分変更部
125 仮想ノード振分部
126 実ノード振分部
127,143 割当変更部
130 再振分判断部
141 情報収集部
142 振分指示部
152 振分用プロセッサ
153 パケット処理用プロセッサ
155 制御用プロセッサ
161 ネットワーク
162 振分ノード
163 パケット処理ノード
164 データサーバ
165 制御ノード
101, 151
Claims (12)
前記複数のパケット処理手段に対して前記フローを振り分ける、相互に異なる第1及び第2の振分アルゴリズムを用意し、
前記第1の振分アルゴリズムを前記フローに適用している状態から、フローごとに当該フローに対して前記第2の振分アルゴリズムが適用される確率が時間経過とともに高くなるようにして、前記第2の振分アルゴリズムが前記フローに適用される状態に切り替える、並列パケット処理方法。 A parallel packet processing method that distributes flows to a plurality of packet processing means and executes packet processing on the flows in parallel between the plurality of packet processing means,
Preparing different first and second distribution algorithms for distributing the flows to the plurality of packet processing means;
From the state where the first distribution algorithm is applied to the flow, the probability that the second distribution algorithm is applied to the flow for each flow is increased with the passage of time, and the first 2. A parallel packet processing method for switching to a state in which the distribution algorithm of 2 is applied to the flow.
前記複数のパケット処理手段に対して前記フローを振り分ける、相互に異なる第1及び第2の振分アルゴリズムを用意し、
前記第1の振分アルゴリズムを用いて前記フローを前記複数のパケット処理手段に振り分け、振り分けられた前記フローのうち、特定のパケット処理手段に振り分けられることとなったフローに対して前記第2の振分アルゴリズムを適用して再振分を実行する、並列パケット処理方法。 A parallel packet processing method that distributes flows to a plurality of packet processing means and executes packet processing on the flows in parallel between the plurality of packet processing means,
Preparing different first and second distribution algorithms for distributing the flows to the plurality of packet processing means;
The flow is distributed to the plurality of packet processing means using the first distribution algorithm, and the second flow is assigned to the flow that has been distributed to a specific packet processing means among the distributed flows. A parallel packet processing method that executes redistribution by applying a distribution algorithm.
前記判断の結果に基づいて事前に、変更後の前記各フローの処理に必要なデータを対応するパケット処理手段に保持させ、その後、前記変更を行う、請求項1乃至5のいずれか1項に記載の並列パケット処理方法。 Before changing in the distribution algorithm, determine which of the plurality of packet processing means each flow is changed by the change,
6. The information processing apparatus according to any one of claims 1 to 5, wherein data necessary for processing of each changed flow is held in advance in a corresponding packet processing unit based on a result of the determination, and then the change is performed. The parallel packet processing method described.
前記複数のパケット処理手段に対して前記フローを振り分ける振分アルゴリズムを変更可能とし、
前記振分アルゴリズムを変更する前に、当該変更によって各フローが前記複数のパケット処理手段のいずれにおいて処理されるように変化するかを判断し、
前記判断の結果に基づいて事前に、変更後の前記各フローの処理に必要なデータを対応するパケット処理手段に保持させ、その後、前記変更を行う、並列パケット処理方法。 A parallel packet processing method that distributes flows to a plurality of packet processing means and executes packet processing on the flows in parallel between the plurality of packet processing means,
The distribution algorithm for distributing the flow to the plurality of packet processing means can be changed,
Before changing the distribution algorithm, determine which of the plurality of packet processing means will change each flow by the change,
A parallel packet processing method in which data necessary for the processing of each changed flow is held in advance in a corresponding packet processing unit based on the determination result, and then the change is performed.
相互に異なる第1及び第2の振分アルゴリズムにより前記複数のパケット処理手段にフローを振り分ける振分手段と、
前記第1の振分アルゴリズムを前記フローに適用している状態から、フローごとに当該フローに対して前記第2の振分アルゴリズムが適用される確率が時間経過とともに高くなるようにして前記第2の振分アルゴリズムが前記フローに適用される状態に切り替えるように、前記振分手段を制御する制御手段と、
を有する、並列パケット処理装置。 A plurality of packet processing means for performing packet processing on the flow;
Distribution means for distributing flows to the plurality of packet processing means by different first and second distribution algorithms;
From the state in which the first distribution algorithm is applied to the flow, the probability that the second distribution algorithm is applied to the flow for each flow is increased with the passage of time. Control means for controlling the allocating means so as to switch to a state in which the allocating algorithm is applied to the flow;
A parallel packet processing apparatus.
第1の振分アルゴリズムにより前記複数のパケット処理手段にフローを振り分る振分手段と、
前記振分手段を制御する制御手段と、
を備え、
前記振分手段は、前記第1の振分アルゴリズムを適用して振り分けられたフローについて当該フローの振分先に基づいて再振分の要否を判断する再振分判断部を有し、再振分が必要と判断したときに、前記第1の振分アルゴリズムとは異なる第2の振分アルゴリズムで当該フローを前記複数のパケット処理手段に再振分し、
前記制御手段は、前記第1の振分アルゴリズムによって特定のパケット処理手段に割り振られることとなったフローの再振分を前記振分手段に指示する、並列パケット処理装置。 A plurality of packet processing means for performing packet processing on the flow;
Distribution means for distributing the flow to the plurality of packet processing means by a first distribution algorithm;
Control means for controlling the allocating means;
With
The distribution means includes a redistribution determination unit that determines whether or not redistribution is necessary based on a distribution destination of the flow with respect to a flow distributed by applying the first distribution algorithm. When it is determined that distribution is necessary, the flow is redistributed to the plurality of packet processing means by a second distribution algorithm different from the first distribution algorithm,
The parallel packet processing device, wherein the control means instructs the distribution means to redistribute a flow that has been allocated to a specific packet processing means by the first distribution algorithm.
変更可能な振分アルゴリズムにより前記複数のパケット処理手段に前記フローを振り分ける振分手段と、
振分アルゴリズム情報と振り分け対象となる前記パケット処理手段の数と各フロー情報を保持し、前記振分アルゴリズムの変更後に前記各フローがいずれのパケット処理手段により処理されるように変化するかを判断し、前記判断の結果に基づいて必要なデータを予め保持するよう前記各パケット処理手段に指示した後、振分先を変更するように前記振分手段を制御する制御手段と、
を有する、並列パケット処理装置。 A plurality of packet processing means for performing packet processing on the flow;
A distribution means for distributing the flow to the plurality of packet processing means by a changeable distribution algorithm;
Holds distribution algorithm information, the number of packet processing means to be distributed and each flow information, and determines which packet processing means each flow changes after the distribution algorithm is changed And, after instructing each packet processing means to hold necessary data in advance based on the result of the determination, a control means for controlling the distribution means to change the distribution destination;
A parallel packet processing apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012041507A JP5672504B2 (en) | 2012-02-28 | 2012-02-28 | Parallel packet processing method and apparatus for switching distribution destination |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012041507A JP5672504B2 (en) | 2012-02-28 | 2012-02-28 | Parallel packet processing method and apparatus for switching distribution destination |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013179429A true JP2013179429A (en) | 2013-09-09 |
JP5672504B2 JP5672504B2 (en) | 2015-02-18 |
Family
ID=49270706
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012041507A Expired - Fee Related JP5672504B2 (en) | 2012-02-28 | 2012-02-28 | Parallel packet processing method and apparatus for switching distribution destination |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5672504B2 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016010017A (en) * | 2014-06-25 | 2016-01-18 | 株式会社日立製作所 | Communication apparatus and communication method |
JP2016021734A (en) * | 2014-06-19 | 2016-02-04 | 富士通株式会社 | Information processing device and information processing method |
WO2016038857A1 (en) * | 2014-09-09 | 2016-03-17 | 日本電気株式会社 | Number-of-scales estimation apparatus, number-of-scales management system, number-of-scales estimation method, number-of-scales management method, and storage medium |
JP5917678B1 (en) * | 2014-12-26 | 2016-05-18 | 株式会社Pfu | Information processing apparatus, method, and program |
JP2018533327A (en) * | 2015-10-27 | 2018-11-08 | センター フォー ディベロップメント オブ テレマティックスCentre For Development Of Telematics | Real-time distributed engine framework for Ethernet virtual connectivity |
JP2020524445A (en) * | 2017-06-16 | 2020-08-13 | ドライブネッツ リミテッド | Parallel information processing on multi-core computing platform |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1127320A (en) * | 1997-07-03 | 1999-01-29 | Fujitsu Ltd | Packet relay control method, packet repeater and program storage medium |
JP2003318953A (en) * | 2002-04-19 | 2003-11-07 | Fujitsu Ltd | Packet processing apparatus |
WO2003103233A1 (en) * | 2002-05-31 | 2003-12-11 | 富士通株式会社 | Packet repeating installation, network connection device, packet repeating method, recording medium, program |
JP2004350188A (en) * | 2003-05-26 | 2004-12-09 | Nec Corp | Data transfer apparatus and program |
JP2008257642A (en) * | 2007-04-09 | 2008-10-23 | Mitsubishi Electric Corp | Packet processor |
JP2010226543A (en) * | 2009-03-25 | 2010-10-07 | Nec Corp | Apparatus, and system for processing packet, method for improving packet processing efficiency used for the apparatus and the system, and program for the method |
JP2012003606A (en) * | 2010-06-18 | 2012-01-05 | Ricoh Co Ltd | Communication device |
JP2012100012A (en) * | 2010-11-01 | 2012-05-24 | Fujitsu Ltd | Analysis processing device, analysis processing program, and analysis processing method |
-
2012
- 2012-02-28 JP JP2012041507A patent/JP5672504B2/en not_active Expired - Fee Related
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1127320A (en) * | 1997-07-03 | 1999-01-29 | Fujitsu Ltd | Packet relay control method, packet repeater and program storage medium |
JP2003318953A (en) * | 2002-04-19 | 2003-11-07 | Fujitsu Ltd | Packet processing apparatus |
WO2003103233A1 (en) * | 2002-05-31 | 2003-12-11 | 富士通株式会社 | Packet repeating installation, network connection device, packet repeating method, recording medium, program |
JP2004350188A (en) * | 2003-05-26 | 2004-12-09 | Nec Corp | Data transfer apparatus and program |
JP2008257642A (en) * | 2007-04-09 | 2008-10-23 | Mitsubishi Electric Corp | Packet processor |
JP2010226543A (en) * | 2009-03-25 | 2010-10-07 | Nec Corp | Apparatus, and system for processing packet, method for improving packet processing efficiency used for the apparatus and the system, and program for the method |
JP2012003606A (en) * | 2010-06-18 | 2012-01-05 | Ricoh Co Ltd | Communication device |
JP2012100012A (en) * | 2010-11-01 | 2012-05-24 | Fujitsu Ltd | Analysis processing device, analysis processing program, and analysis processing method |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016021734A (en) * | 2014-06-19 | 2016-02-04 | 富士通株式会社 | Information processing device and information processing method |
JP2016010017A (en) * | 2014-06-25 | 2016-01-18 | 株式会社日立製作所 | Communication apparatus and communication method |
WO2016038857A1 (en) * | 2014-09-09 | 2016-03-17 | 日本電気株式会社 | Number-of-scales estimation apparatus, number-of-scales management system, number-of-scales estimation method, number-of-scales management method, and storage medium |
JP5917678B1 (en) * | 2014-12-26 | 2016-05-18 | 株式会社Pfu | Information processing apparatus, method, and program |
JP2018533327A (en) * | 2015-10-27 | 2018-11-08 | センター フォー ディベロップメント オブ テレマティックスCentre For Development Of Telematics | Real-time distributed engine framework for Ethernet virtual connectivity |
JP2020524445A (en) * | 2017-06-16 | 2020-08-13 | ドライブネッツ リミテッド | Parallel information processing on multi-core computing platform |
JP7137588B2 (en) | 2017-06-16 | 2022-09-14 | ドライブネッツ リミテッド | Parallel Information Processing on Multicore Computing Platforms |
Also Published As
Publication number | Publication date |
---|---|
JP5672504B2 (en) | 2015-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5672504B2 (en) | Parallel packet processing method and apparatus for switching distribution destination | |
US8898505B2 (en) | Dynamically configureable placement engine | |
Li et al. | Efficient online coflow routing and scheduling | |
Lee et al. | Load-balancing tactics in cloud | |
JP6030807B2 (en) | Open connection with distributed load balancer | |
KR101455899B1 (en) | Microprocessor with software control over allocation of shared resources among multiple virtual servers | |
US9237093B2 (en) | Bandwidth on-demand adaptive routing | |
US8635263B2 (en) | Node processing device and its processing method | |
EP3338184B1 (en) | Technique for reconfiguring a virtual machine | |
CN111190745B (en) | Data processing method, device and computer readable storage medium | |
CN1759379A (en) | System and method for dymanic ordering in a network processor | |
Yildirim et al. | End-to-end data-flow parallelism for throughput optimization in high-speed networks | |
US20170295035A1 (en) | Selecting an optimal network device for reporting flow table misses upon expiry of a flow in a software defined network | |
KR20130095910A (en) | Apparatus and method for managing data stream distributed parallel processing service | |
JP2016051446A (en) | Calculator system, calculator, and load dispersing method and program | |
JP2018185624A (en) | Switch program, switching method and information processor | |
WO2019056771A1 (en) | Distributed storage system upgrade management method and device, and distributed storage system | |
Dai et al. | Two-choice randomized dynamic I/O scheduler for object storage systems | |
Thangakrishnan et al. | Herring: Rethinking the parameter server at scale for the cloud | |
CN111641567B (en) | Dynamic network bandwidth allocation and management based on centralized controller | |
Aleyadeh et al. | Optimal container migration/re-instantiation in hybrid computing environments | |
CN113014611A (en) | Load balancing method and related equipment | |
JP5704567B2 (en) | Node device, system, and packet processing method | |
US9954771B1 (en) | Packet distribution with prefetch in a parallel processing network device | |
Li et al. | Co-Scheduler: A coflow-aware data-parallel job scheduler in hybrid electrical/optical datacenter networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140128 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140926 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141007 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20141027 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20141031 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141120 |
|
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: 20141209 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20141211 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141210 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5672504 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |