JP4118757B2 - Weighted priority control method - Google Patents
Weighted priority control method Download PDFInfo
- Publication number
- JP4118757B2 JP4118757B2 JP2003194998A JP2003194998A JP4118757B2 JP 4118757 B2 JP4118757 B2 JP 4118757B2 JP 2003194998 A JP2003194998 A JP 2003194998A JP 2003194998 A JP2003194998 A JP 2003194998A JP 4118757 B2 JP4118757 B2 JP 4118757B2
- Authority
- JP
- Japan
- Prior art keywords
- queue
- priority
- queue buffer
- algorithm
- buffer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、通信装置の帯域制御方法に関するものであり、特に、回線にデータを出力する際に、回線交換処理と同時に帯域制御を行う重み付け優先制御方法に関するものである。
【0002】
【従来の技術】
データを出力する1つの出力先、たとえば、回線の直前に設置された複数の待ち行列(キュー)それぞれに設定された重み付けの値にしたがって、各キューのデータに対して回線の帯域のうちの一定の割合の帯域を保証するためのアルゴリズムとして、重み付けラウンドロビン(WRR:Weighted Round Robin)方式や重み付けフェアキューイング(WFQ:Weighted Fair Queuing)方式がある。
【0003】
WRR方式は、データを読み出すキューの順番を予め決めておき、その順番にしたがって、各キューから順次データを読み出していくラウンドロビン(回転優先制御)を行う際に、各キューに重み付けの値を設定しておき、データを読み出すごとに重み付けの値をデクリメントしていく。そして、重み付けの値が「0」になったキューからはデータを読み出さずに、つぎのキューのデータを読み出すことで、各キューから出力するデータの出力頻度を制御して、一定の割合の帯域を保証するものである。したがって、特にATM(Asynchronous Transfer Mode)のセルなど固定長のデータを扱う場合、デクリメントと重み付けの値が設定可能なカウンタで実現可能であり、ハードウエアで構成するにあたっても、非常に簡単かつ小規模な回路で実現することができる。
【0004】
このような理由から、WRR方式を用いた装置の実装や機能に様々な拡張や工夫をこらした技術が考えられている。第1の従来技術では、優先インデックスを用いたアルゴリズムを基本とし、優先インデックステーブルを用いた構成に対して、優先ソートリストを設けて、実際のパケット転送シーケンス(ラウンド)ごとに、全フローあるいは所定フローを優先インデックスの大きい順(降順)に格納し、この優先ソートリスト内の先頭の各フローから順にパケットを転送し、その後、優先ソートリスト外の各フローからパケットを転送するようにして、WRR方式の問題である遅延ジッタ性能を向上するようにしている(たとえば、特許文献1参照)。
【0005】
また、第2の従来技術では、セルバッファ回路にセルがないときには有意のセル有無フラグを送出するセル有無フラグ出力回路と、カウントメモリの対応するカウント値が減算され「0」になったときに有意のウエイト有無フラグを送出するウエイト有無フラグ送出回路と、セル有無フラグまたはウエイト有無フラグの何れか一方または両方が有意である時に一斉に有意のカウント初期化フラグを送出するカウント初期化フラグ送出回路とをセルバッファ毎に備え、各セルバッファ回路の中の1つのセルバッファ回路を選択してセルを出力する時に、対応するカウント初期化フラグが有意の場合、対応するカウンタ値のみを初期化するようにして、カウンタ値の初期化する時間の制約をなくすことで、セルバッファ回路の数に関係なくメモリを使用してカウンタを構成することができるようにしている。(たとえば、特許文献2参照)。
【0006】
【特許文献1】
特開平11−298523号公報
【特許文献2】
特開2000−278272号公報
【0007】
【発明が解決しようとする課題】
上記第1の従来技術では優先インデックスを用いたアルゴリズムを、上記第2の技術ではWRR方式のアルゴリズムを用いている。すなわち、上記従来技術は両者とも、それ自体が1つのアルゴリズムの体を成しており、つぎに読み出すべきキューを選択するのは、そのアルゴリズムが唯一であるという環境のみに適合する。そのため、上記2つの従来技術では、つぎに読み出すべきキューを選択するアルゴリズムが2つである場合、不都合が生じることがある。
【0008】
たとえば、一般的に、ネットワーク上に流れるデータは、帯域制御の要求の通りに流れるわけではない。ネットワーク上に流れるデータをミクロな時間単位で見ると、あるところにデータが集中して帯域制御の要求する通りにデータを読み出していたのでは、キューからデータがあふれてしまい、あふれたデータは破棄される。
【0009】
このような場合、RED(Random Early Detection)により破棄が1つのデータ系列に集中しないようにするのが一般的であるが、データを破棄しないに越したことはない。そこで、「キューからデータがあふれる前にデータが集中しているキューを検知して、検知したキューのデータを優先的に回線に出力する」というアルゴリズムを上記2つの従来技術に追加したとする。すなわち、WRR方式などの帯域制御を維持するアルゴリズムと、それとは別につぎに読み出すべきキューを選択する(この場合は、データが集中しているキューを選択する)アルゴリズムとがあるとする。これら2つのアルゴリズムがそれぞれに選択したキューが異なり、帯域制御を維持するアルゴリズムとは異なるアルゴリズムが選択したキューからデータを読み出した場合、上記2つの従来技術では、帯域制御の効果そのものを失わないための手順は検討されていない。
【0010】
そのため、上記2つの従来技術では、キューの状況に応じて帯域制御を維持するアルゴリズムと、それとは別のアルゴリズムとを使い分ける必要がある場合、帯域制御の精度を維持することはできないという問題があった。
【0011】
この発明は上記に鑑みてなされたもので、帯域制御を維持するアルゴリズムと、それとは異なるアルゴリズムとを有し、帯域制御を維持するアルゴリズムとは異なるアルゴリズムにより選択されたキューからデータを読み出した場合でも、帯域制御を維持するアルゴリズムの帯域の精度を維持することができる重み付け優先制御方法を得ることを目的としている。
【0012】
【課題を解決するための手段】
上記目的を達成するために、この発明にかかる重み付け優先制御方法は、複数のキュー・バッファに蓄積されているデータを前記複数のキュー・バッファ毎に割り付けられている重み付けの値の割合で各キュー・バッファから読み出して前記データの帯域を保証する重み付け優先制御方法であって、前記重み付けの値を初期値とし、各キュー・バッファからのデータ読み出しの度に算出される優先度に基づき前記複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファを選択することにより、前記データの帯域を保証する第1のアルゴリズムと、この第1のアルゴリズムとは異なる処理によってデータを読み出すキュー・バッファを選択する第2のアルゴリズムとを有し、前記第1および第2のアルゴリズムによって選択されたキュー・バッファが異なる場合には、所定の条件が成立する以外の場合前記第2のアルゴリズムによって選択されたキュー・バッファを優先するとともに、前記優先するキュー・バッファ以外のすべてのキュー・バッファの第1のアルゴリズムにおける優先度を上げる処理を行う事を特徴とする。
【0013】
この発明によれば、各キュー・バッファごとに割り付けられた重み付けの値を初期値とし、各キュー・バッファからのデータ読み出しの度に算出される優先度に基づき複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファを選択することによりデータの帯域を保証する第1のアルゴリズムによって選択されたキュー・バッファと、第1のアルゴリズムとは異なる処理によってデータを読み出すキュー・バッファを選択する第2のアルゴリズムによって選択されたキュー・バッファとが異なる場合には、所定の条件が成立する場合を除いて、第2のアルゴリズムによって選択されたキュー・バッファを優先するとともに、優先するキュー・バッファ以外のすべてのキュー・バッファの優先度を上げるようにしている。ただし、第2のアルゴリズムによって選択されたキュー・バッファを優先して、優先するキュー・バッファ以外の全てのキュー・バッファの優先度を上げる場合、実装上は優先度を上げる限度がある。この場合、キュー・バッファの優先度が限度を超えた場合を所定の条件として、優先度が限度値を超えた場合には第1のアルゴリズムによって選択されたキュー・バッファを優先することにより、実装上の問題を解決するとともに、第2のアルゴリズムによって選択されたキュー・バッファを選択し続けて帯域保証が維持できなくなるという現象を防ぐことができる。
【0014】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかる重み付け優先制御方法の好適な実施の形態を詳細に説明する。
【0015】
実施の形態1.
図1〜図5を用いて本発明の実施の形態1を説明する。図1は、この発明における実施の形態1の重み付け優先制御方法に基づいて動作する重み付け優先制御装置の構成を示すブロック図である。図1に示した重み付け優先制御装置は、一定量のデータ(パケット)を蓄積する複数(この場合は3つ)のキュー・バッファ11〜13と、予め定められた2つの異なるアルゴリズムのうちの一方のアルゴリズムに基づいてキュー・バッファ11〜13の1つを選択するキュー制御部30と、キュー制御部30が選択したキュー・バッファのパケットを読み出し、回線に出力する多重化部20とを備えている。
【0016】
キュー制御部30は、重み付けによる帯域制御を行い回線の帯域の一定量の割合を保証する第1のアルゴリズムと、帯域制御とは異なるアルゴリズムによりパケットを読み出すべきキュー・バッファを決定する第2のアルゴリズムとを有し、キュー・バッファ11〜13を監視して、キュー・バッファ11〜13の状態に基づいて、第1のアルゴリズムで選択したキュー・バッファと第2のアルゴリズムで選択したキュー・バッファのどちらを優先するかを選択する。そして、選択したキュー・バッファを多重化部20に通知する。
【0017】
第1のアルゴリズムは、複数のキュー・バッファそれぞれに設定された重み付けの値を初期値とし、各キュー・バッファからのデータ読み出しの度に算出される優先度に基づき複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファを選択することにより、データの帯域を保証するアルゴリズムであり、ここではWRR方式とする。
【0018】
第2のアルゴリズムは、キュー・バッファからパケットがあふれる前にデータが集中しているキュー・バッファを検知して、検知したキュー・バッファのパケットを優先的に回線に出力するアルゴリズムである。
【0019】
キュー制御部30は、キュー・バッファ11〜13に対応した重み付けの値をカウントするカウンタ31〜33と、キュー・バッファ11〜13がそれぞれ保持するパケットの合計パケット長を監視するキュー監視部34と、つぎにパケットを読み出すべきキュー・バッファを選択するキュー選択部35と、キュー・バッファ11〜13の重み付けの値に基づいてそれぞれの優先度を算出する重み付け演算部36とを備えている。
【0020】
キュー監視部34は、キュー・バッファ11〜13がそれぞれに蓄積するパケットの合計パケット長が予め定められた閾値を超えていないかを監視する。そして、蓄積したパケットの合計パケット長が閾値を超えているキュー・バッファを検出した場合、検出したキュー・バッファを識別するための情報を含む超過情報をキュー選択部35に出力する。
【0021】
キュー選択部35は、第1のアルゴリズムまたは第2のアルゴリズムに基づいてつぎにパケットを読み出すべきキュー・バッファを選択して、選択したキュー・バッファのパケットを読み出すように多重化部20に通知する。キュー選択部35は、キュー監視部34から超過情報の通知を受けた場合、第2のアルゴリズムに基づいて選択したキュー・バッファを第1のアルゴリズムに基づいて選択したキュー・バッファよりも優先して多重化部20に通知する。そして、第2のアルゴリズムに基づいてキュー・バッファを選択した際に、選択したキュー・バッファに対応するカウンタのカウント値(優先度)がマイナスの値になると、重み付け演算部36に重み付けの値を算出するように通知する。
【0022】
第1のアルゴリズムの場合、キュー選択部35は、パケットが蓄積されているキュー・バッファに対応するカウンタのカウント値が「0」でないものをラウンドロビンによって検索し、最初に検出したカウンタに対応するキュー・バッファをパケット読み出し対象のキュー・バッファとして選択する。この場合は、カウンタ31、カウンタ32、カウンタ33、カウンタ31の順(ラウンドロビン方向)にカウント値を確認する。キュー選択部35は、最後に選択したキュー・バッファを記憶しておき、つぎにパケットを読み出すべきキュー・バッファを選択する際には、記憶しているキュー・バッファに対応するカウンタのカウント値を確認する。そして、カウント値が「0」の場合は、順次ラウンドロビン方向のカウンタの値を確認し、カウント値が「0」でないカウンタに対応するキュー・バッファを選択する。
【0023】
第2のアルゴリズムの場合、キュー選択部35は、キュー監視部34から通知された超過情報内のキュー・バッファを選択する。ただし、同一のキュー・バッファを選択する超過情報が連続してきた場合には、予め定められた一定の回数を限度に超過情報により通知されたキュー・バッファを連続して選択する。
【0024】
カウンタ31〜33は、各カウンタに対応したキュー・バッファが選択されてパケットが回線に出力された場合、カウント値をデクリメントする。ここでは、カウンタ31がキュー・バッファ11に、カウンタ32がキュー・バッファ12に、カウンタ33がキュー・バッファ13にそれぞれ対応する。
【0025】
重み付け演算部36は、カウンタ31〜33のカウント値がすべて「0」になると、予め定められたキュー・バッファ11〜13の重み付けの値を各カウンタに設定する。また、第2のアルゴリズムにより選択したキュー・バッファに対応するカウンタのカウント値がマイナスになると、各カウンタのカウント値に予め定められた重み付けの値を加算した値を各カウンタに設定する。すなわち、マイナスになったカウンタのカウント値をプラスにするために、各カウンタのカウント値にそれぞれの重み付けの値を加算して、第1のアルゴリズムによる帯域制御の重み付けの比率を維持するようにする。
【0026】
図2〜図5は、キュー・バッファ11〜13に蓄積されているパケットと、カウンタ31〜33の値と、キュー選択部35が選択したキュー・バッファのパケットを多重化部20が読み出して、読み出したパケットを回線40に出力した様子を示す図である。図2〜図5を参照して、この発明における実施の形態1の重み付け優先制御方法に基づいて動作する重み付け優先制御装置の動作を説明する。ここでは、キュー・バッファ11の重み付けの値を「1」、キュー・バッファ12の重み付けの値を「3」、キュー・バッファ13の重み付けの値を「2」とし、キュー・バッファ11〜13に蓄積されるパケットの長さは全て同一(固定長)であるものとする。
【0027】
まず、図2および図3を参照して、第1のアルゴリズムに基づいてパケットを出力する動作を説明する。図2(a)において、キュー・バッファ11はパケットA1〜A4を、キュー・バッファ12はパケットB1〜B5を、キュー・バッファ13はパケットC1〜C4をそれぞれ蓄積しており、カウンタ31には「1」が、カウンタ32には「3」が、カウンタ33には「2」が設定されている。すなわち、カウンタ31〜33には、重み付けの値が優先度の初期値として重み付け演算部36により設定されている。また、キュー監視部34に予め定められている閾値は、点線で示したようにここではパケット6個分のパケット長とする。
【0028】
キュー・バッファ11〜13に蓄積されているパケットの合計パケット長が各キュー・バッファとも閾値を超えていないので、キュー選択部35は第1のアルゴリズムに基づいてキュー・バッファを選択する。キュー選択部35は、キュー・バッファ11の優先度を示すカウンタ31のカウント値を確認する。カウンタ31のカウント値は「1」であるので、キュー選択部35はキュー・バッファ11を選択して、キュー・バッファ11のパケットを読み出すように多重化部20に通知する。
【0029】
図2(b)に示すように、多重化部20は、キュー・バッファ11のパケットA1を読み出して、読み出したパケットA1を回線40に出力する。キュー選択部35がキュー・バッファ11を選択したので、カウンタ31はカウント値をデクリメントして、カウント値を「0」にする。
【0030】
キュー・バッファ11を選択したので、キュー選択部35は、キュー・バッファ12に対応するカウンタ32のカウント値を確認する。カウンタ32のカウント値は「3」であるので、キュー選択部35はキュー・バッファ12を選択して、キュー・バッファ12のパケットを読み出すように多重化部20に通知する。
【0031】
図2(c)に示すように、多重化部20は、キュー・バッファ12のパケットB1を読み出して、読み出したパケットB1を回線40に出力する。キュー選択部35がキュー・バッファ12を選択したので、カウンタ32はカウント値をデクリメントして、カウント値を「2」にする。
【0032】
キュー・バッファ12を選択したので、キュー選択部35は、キュー・バッファ13に対応するカウンタ33のカウント値を確認する。カウンタ33のカウント値は「2」であるので、キュー選択部35はキュー・バッファ13を選択して、キュー・バッファ13のパケットを読み出すように多重化部20に通知する。
【0033】
図2(d)に示すように、多重化部20は、キュー・バッファ13のパケットC1を読み出して、読み出したパケットC1を回線40に出力する。キュー選択部35がキュー・バッファ13を選択したので、カウンタ33はカウント値をデクリメントして、カウント値を「1」にする。
【0034】
キュー・バッファ13を選択したので、キュー選択部35は、カウンタ31のカウント値を確認する。カウンタ31のカウント値は「0」である。そのため、キュー選択部35は、ラウンドロビン方向でカウンタ31のつぎのカウンタ32のカウント値を確認する。カウンタ32のカウント値は「2」であるので、キュー選択部35は、キュー・バッファ12を選択して、キュー・バッファ12のパケットを読み出すように多重化部20に通知する。
【0035】
図2(e)に示すように、多重化部20は、キュー・バッファ12のパケットB2を読み出して、読み出したパケットB2を回線40に出力する。キュー選択部35がキュー・バッファ12を選択したので、カウンタ32はカウント値をデクリメントして、カウント値を「1」にする。
【0036】
キュー・バッファ12を選択したので、キュー選択部35は、キュー・バッファ13に対応するカウンタ33のカウント値を確認する。カウンタ33のカウント値は「1」であるので、キュー選択部35はキュー・バッファ13を選択して、キュー・バッファ13のパケットを読み出すように多重化部20に通知する。
【0037】
図3(f)に示すように、多重化部20は、キュー・バッファ13のパケットC2を読み出して、読み出したパケットC2を回線40に出力する。キュー選択部35がキュー・バッファ13を選択したので、カウンタ33はカウント値をデクリメントして、カウント値を「0」にする。
【0038】
キュー・バッファ13を選択したので、キュー選択部35は、キュー・バッファ11に対応するカウンタ31のカウント値を確認する。カウンタ31のカウント値は「0」であるので、キュー選択部35は、ラウンドロビン方向でカウンタ31のつぎのカウンタ32のカウント値を確認する。カウンタ32のカウント値は「1」であるので、キュー選択部35はキュー・バッファ12を選択して、キュー・バッファ12のパケットを読み出すように多重化部20に通知する。
【0039】
図3(g)に示すように、多重化部20は、キュー・バッファ12のパケットB3を読み出して、読み出したパケットB3を回線40に出力する。キュー選択部35がキュー・バッファ12を選択したので、カウンタ32はカウント値をデクリメントして、カウント値を「0」にする。
【0040】
ここで、カウンタ31〜33のそれぞれのカウント値が全て「0」となる。キュー選択部35は、カウンタ33、カウンタ31、カウンタ32の順に各カウンタのカウント値を確認して、各カウンタのカウント値が「0」であることを確認すると、重み付け演算部36に初期値を設定するように通知する。
【0041】
通知を受けると重み付け演算部36は、予め定められたキュー・バッファ11〜13の重み付けの値をカウンタ31〜33に設定する。キュー・バッファ11の重み付けが「1」、キュー・バッファ12の重み付けが「3」、キュー・バッファ13の重み付けが「2」であるので、重み付け演算部36は、図3(h)に示すように、カウンタ31に「1」を、カウンタ32に「3」を、カウンタ33に「2」を設定する。
【0042】
重み付け演算部36がカウンタ31〜33に新たにカウント値を設定した後、キュー選択部35は、ラウンドロビン方向に順にカウンタ31〜33のカウント値を確認して、カウント値が「0」でない場合には、そのカウンタに対応するキュー・バッファを選択し、カウント値が「0」の場合には、つぎのカウンタのカウント値を確認する。多重化部20は、キュー選択部35が選択したキュー・バッファのパケットを読み出して回線40に出力する動作を繰り返す。図3(j)、図3(k)および図3(m)はその様子を示している。
【0043】
つぎに、図4および図5を参照して、キュー・バッファ11に蓄積されたパケットが予め定められた閾値を超えた場合を例にあげて、重み付け優先制御装置が第2のアルゴリズムに基づいてパケットを出力する動作を説明する。ここでは、第2のアルゴリズムにより同一のキュー・バッファを連続して選択する限度を4回とする。
【0044】
図4(a)において、キュー・バッファ11は、パケットA1〜A5を、キュー・バッファ12はパケットB1〜B5を、キュー・バッファ13はパケットC1〜C5をそれぞれ蓄積しており、カウンタ31には「1」が、カウンタ32には「3」が、カウンタ33には「2」が設定されている。すなわち、カウンタ31〜33には、キュー・バッファ11〜13の重み付けの値が初期値として重み付け演算部36により設定されている。また、キュー監視部34に予め定められている閾値は、点線で示したようにここではパケット6個分のパケット長とする。
【0045】
キュー・バッファ13〜33に蓄積されているパケットの量は、それぞれ5つで閾値を超えていないので、キュー選択部35は第1のアルゴリズムに基づいてキュー・バッファを選択する。キュー選択部35は、カウンタ32のカウント値が 「3」であることを確認して、キュー・バッファ12を選択する。図4(b)に示すように、多重化部20は、キュー・バッファ12のパケットB1を読み出して、読み出したパケットB1を回線40に出力する。キュー選択部35がキュー・バッファ12を選択したので、カウンタ32はカウント値をデクリメントして、カウント値を「2」にする。また、パケットB1を回線40に出力している間に、キュー・バッファ11にパケットA6〜A9が、キュー・バッファ12にパケットB6が新たに蓄積され、キュー・バッファ11に蓄積されたパケットの合計パケット長が閾値を超えたとする。キュー監視部34は、キュー・バッファ11に蓄積されたパケットの量が閾値を超えたことを検知して、キュー・バッファ11が閾値を超えたことを通知するための超過情報をキュー選択部35に出力する。
【0046】
キュー・バッファ12を選択したので、本来、キュー選択部35は、カウンタ33のカウント値が「2」であることを確認してキュー・バッファ13を選択する。しかし、キュー監視部34から超過情報が通知されたため、通知された超過情報に含まれるキュー・バッファ11を選択する。すなわち、第1のアルゴリズムに基づいて選択したキュー・バッファ12ではなく、第2のアルゴリズムに基づいて選択したキュー・バッファ11を優先して、キュー・バッファ11のパケットを読み出すように多重化部20に通知する。
【0047】
図4(c)に示すように、多重化部20は、キュー・バッファ11のパケットA1を読み出して、読み出したパケットA1を回線40に出力する。キュー選択部35がキュー・バッファ11を選択したので、カウンタ31はカウント値をデクリメントして、カウント値を「0」にする。
【0048】
キュー・バッファ11に蓄積されているパケットの合計パケット長は「8」となるが、まだ閾値を超えている。キュー監視部34は、キュー・バッファ11が閾値を超えていることを超過情報によりキュー選択部35に通知する。キュー選択部35は、通知された超過情報に含まれるキュー・バッファ11を選択して、キュー・バッファ11のパケットを読み出すように多重化部20に通知する。
【0049】
図4(d)に示すように、多重化部20は、キュー・バッファ11のパケットA2を読み出して、読み出したパケットA2を回線40に出力する。キュー選択部35がキュー・バッファ11を選択したので、カウンタ31はカウント値をデクリメントして、カウント値を「−1」にする。
【0050】
カウンタ31のカウント値が「−1」になると、重み付け演算部36は、各カウンタのカウント値に予め定められた重み付けの値を加算した値を各カウンタに設定する。キュー・バッファ11の重み付けの値は「1」、キュー・バッファ12の重み付けの値は「3」、キュー・バッファ13の重み付けの値は「2」であり、カウンタ31のカウント値は「−1」、カウンタ32のカウント値は「2」、カウンタ33のカウント値は「2」である。重み付け演算部36は、図4(e)に示すように、カウンタ31のカウント値「−1」とキュー・バッファ11の重み付けの値「1」を加算した値「0」をカウンタ31に、カウンタ32のカウント値「2」とキュー・バッファ12の重み付けの値「3」を加算した値「5」をカウンタ31に、カウンタ33のカウント値「2」とキュー・バッファ13の重み付けの値「2」を加算した値「4」をカウンタ33に、それぞれ設定する。
【0051】
キュー・バッファ11に蓄積されているパケットの合計パケット長は「7」となるが、まだ閾値を超えている。キュー監視部34は、キュー・バッファ11が閾値を超えていることを超過情報によりキュー選択部35に通知する。キュー選択部35は、通知された超過情報に含まれるキュー・バッファ11を選択して、キュー・バッファ11のパケットを読み出すように多重化部20に通知する。
【0052】
図4(f)に示すように、多重化部20は、キュー・バッファ11のパケットA3を読み出して、読み出したパケットA3を回線40に出力する。キュー選択部35がキュー・バッファ11を選択したので、カウンタ31はカウント値をデクリメントして、カウント値を「−1」にする。
【0053】
カウンタ31のカウント値が「−1」になると、重み付け演算部36は、各カウンタのカウント値に予め定められた重み付けの値を加算した値を各カウンタに設定する。キュー・バッファ11の重み付けの値は「1」、キュー・バッファ12の重み付けの値は「3」、キュー・バッファ13の重み付けの値は「2」であり、カウンタ31のカウント値は「−1」、カウンタ32のカウント値は「5」、カウンタ33のカウント値は「4」である。重み付け演算部36は、図5(g)に示すように、カウンタ31のカウント値「−1」とキュー・バッファ11の重み付けの値「1」を加算した値「0」をカウンタ31に、カウンタ32のカウント値「5」とキュー・バッファ12の重み付けの値「3」を加算した値「8」をカウンタ31に、カウンタ33のカウント値「4」とキュー・バッファ13の重み付けの値「2」を加算した値「6」をカウンタ33に、それぞれ設定する。キュー・バッファ11に蓄積されているパケットの合計パケット長は「6」になり、閾値以下となる。キュー・バッファ11に蓄積されているパケットの量が閾値以下になったので、キュー選択部35は、第1のアルゴリズムに基づいてキュー・バッファを選択する。キュー・バッファ11を選択していたので、キュー選択部35は、カウンタ32のカウント値を確認する。カウンタ32の値は「8」であるので、キュー選択部35は、キュー・バッファ12を選択して、キュー・バッファ12のパケットを読み出すように多重化部20に通知する。
【0054】
図5(h)に示すように、多重化部20は、キュー・バッファ12のパケットB2を読み出して、読み出したパケットB2を回線40に出力する。キュー選択部35がキュー・バッファ12を選択したので、カウンタ32はカウント値をデクリメントして、カウント値を「7」にする。
【0055】
その後、新たにキュー・バッファ11〜13にパケットが蓄積されても、キュー・バッファ11〜13のそれぞれに蓄積されたパケットの合計パケット長が閾値を超えなければ、キュー選択部35は第1のアルゴリズムに基づいてキュー・バッファを選択する。第1のアルゴリズムでの動作については図2および図3を参照して説明したものと同様となるのでここでは詳細な動作の説明は省略する。
【0056】
キュー選択部35は、ラウンドロビン方向にカウンタ31〜33のカウント値が「0」でないものを検索し、最初に検出したカウンタに対応するキュー・バッファをパケット読み出し対象のキュー・バッファとして選択し、多重化部20は、キュー選択部35が選択したキュー・バッファのパケットを読み出して、読み出したパケットを回線40に出力する。そして、キュー選択部35が選択したキュー・バッファに対応するカウンタは、カウント値をデクリメントする。このような動作を、カウンタ31〜33のカウント値が全て「0」になるまで繰り返す。図5(h)では、カウンタ31のカウント値は「0」である。したがって、キュー・バッファ12とキュー・バッファ13に蓄積されているパケットが、それぞれのカウンタ32、33のカウント値が「0」になるまで、交互に回線40に出力される。その様子を、図5(j)、図5(k)および図5(m)に示す。そして、キュー・バッファ11〜13に蓄積されたパケットがなくなることなく、かつ、キュー・バッファ11〜13に蓄積されたパケットが閾値を超えることなくパケットが蓄積されたとすると、最終的には図5(n)に示すように、カウンタ31〜33のカウント値全てが「0」となる。
【0057】
カウンタ31〜33のカウント値が全て「0」になると、重み付け演算部36は、予め定められたキュー・バッファ11〜13の重み付けの値をカウンタ31〜33に設定する。そして、キュー選択部35は重み付けの値が設定されたカウンタ31〜33の値を用いてキュー・バッファを選択する。
【0058】
ここで、実際に、カウンタ31〜33に重み付けの値が設定されてから、全てのカウンタのカウント値が「0」になるまでの期間に出力されたパケットが、キュー・バッファ11〜13に予め定められた重み付けの値である「1:3:2」の割合となっているかを確認する。図5(n)に示すように、キュー・バッファ11から出力されたパケットはA1〜A3の3つであり、キュー・バッファ12から出力されたパケットはB1〜B9の9つであり、キュー・バッファ13から出力されたパケットはC1〜C6の6つである。したがって、各キュー・バッファから出力されたパケットの割合は、「3:9:6=1:3:2」であり、重み付けの値である「1:3:2」が維持されていることがわかる。
【0059】
このようにこの実施の形態1では、複数のキュー・バッファに蓄積されているデータに対して一定の割合の帯域を保証するために、予め定められた重み付けの値による優先度に基づいて複数のキュー・バッファの優先順位を決定してデータを読み出すキュー・バッファを選択する第1のアルゴリズムと、第1のアルゴリズムとは異なる第2のアルゴリズムによりデータを読み出すキュー・バッファを選択する第2のアルゴリズムがあり、これら2つのアルゴリズムにより選択したキュー・バッファが異なる場合には、第2のアルゴリズムにより選択したキュー・バッファを優先してデータを出力する。その際に、優先したキュー・バッファ以外の全てのキュー・バッファ優先度を上げるようにしているため、第2のアルゴリズムにより選択したキュー・バッファを優先した場合でも、第1のアルゴリズムの帯域保証の精度を維持することができる。
【0060】
なお、説明を簡単にするために、第2のアルゴリズムによってキュー・バッファ1を選択する条件を閾値として説明したが、第2のアルゴリズムによってキュー・バッファ1を選択する条件にヒステリシスを用いてもよい。
【0061】
また、この実施の形態1では、第2のアルゴリズムにより同一のキュー・バッファを連続して選択する限度を4回とした。したがって、たとえば、キュー・バッファ11に蓄積されているパケットが閾値を超えた場合、キュー・バッファ11から第2のアルゴリズムによって4回連続でパケットを読み出した後、さらにキュー・バッファ11に蓄積されているパケットが閾値を超えていても、第1のアルゴリズムを優先することになる。しかし、第1のアルゴリズムを優先する条件はこれに限るものではなく、つぎのような条件も考えられる。
【0062】
第2のアルゴリズムを優先したことにより、第2のアルゴリズムで選択されたキュー・バッファ以外のカウンタのカウント値は増加する。本発明では、このカウント値の増加の限度値を設定しておき、カウント値が限度値を超えた場合には、キュー監視部34の要求に拘わらず、限度値を超えたカウンタに対応するキュー・バッファからパケットの読み出しを優先するか、全てのカウンタのカウント値が限度値以下になるまで第1のアルゴリズムによって選択されたキュー・バッファからパケットを読み出すようにしてもよい。カウンタ値の限度値は、各キュー・バッファの重み付けの値、システムに要求される性能、リソースとして実装されるキュー・バッファの深さにより決定すればよい。すなわち、第1のアルゴリズムおよび第2のアルゴリズムの達成度の折り合いは、そのシステムによって決定すればよい。このように、各カウンタのカウント値(優先度)が限度値までは第2のアルゴリズムを優先するが、優先度が限度値を超えた場合には帯域を保証する第1のアルゴリズムを優先することにより、実装時のカウンタのビット値を決定することができ、実装上の問題を解決することができるとともに、第2のアルゴリズムを守り続けて帯域保証が維持できなくなるという現象を防ぐことができる。
【0063】
また、この実施の形態1では、第2のアルゴリズムを「キュー・バッファからパケットがあふれる前にデータが集中しているキュー・バッファを検知して、検知したキュー・バッファのパケットを優先的に回線に出力する」とした。しかし、第2のアルゴリズムはこれに限定されるものではなく、帯域を保証する帯域制御のアルゴリズムとは異なるものであればよい。たとえば、帯域制御のアルゴリズムと優先度が競合するものとして、入力バッファ型スイッチに帯域制御のアルゴリズムを追加した場合がある。この場合、入力バッファ型スイッチのスイッチ交換アルゴリズムと、帯域制御のアルゴリズムとが競合することがある。入力バッファ型スイッチは、N(Nは自然数)×Nポートの交換を行う際に、交換するデータの入力と出力のポートを常に「1:1」に接続しなければデータを流すことができない。つまり、複数の入力ポートから1つの出力ポートへ1回の交換でデータを転送することは不可能であり、交換アルゴリズムがスイッチのスループット性能に与える影響は大きい。そのため交換アルゴリズム性能を維持するのと、帯域制御を維持するのとでは、どちらを優先すべきかはシステム設計で決定すればよい。
【0064】
実施の形態2.
図6〜図8を用いて本発明の実施の形態2を説明する。実施の形態1では、帯域制御のアルゴリズムとそれとは異なるアルゴリズムとをキュー・バッファの常態に応じて選択して固定長のパケットを回線に出力する際に、帯域制御の制度を維持するようにした。しかしながら、実際のシステムにおいて、パケットは固定長とは限らない。この実施の形態2では、キュー・バッファの状態に応じて帯域制御のアルゴリズムとそれとは異なるアルゴリズムとを選択して、可変長のパケットを回線に出力した際にも、帯域制御の精度を維持するものである。
【0065】
図6は、この発明における実施の形態2の重み付け優先制御方法に基づいて動作する重み付け優先制御装置の構成を示すブロック図である。図6に示した重み付け優先制御装置は、図1に示した実施の形態1の重み付け優先制御装置のキュー制御部30の変わりにキュー制御部30aを備えている。実施の形態1と同じ機能を持つ構成部分には同一符号を付し、重複する説明は省略する。
【0066】
キュー制御部30aは、重み付けによる帯域制御を行い回線の帯域の一定量の割合を保証する第1のアルゴリズムと、帯域制御とは異なるアルゴリズムによりパケットを読み出すべきキュー・バッファを決定する第2のアルゴリズムとを有し、キュー・バッファ11〜13を監視して、キュー・バッファ11〜13の状態に基づいて、第1のアルゴリズムで選択したキュー・バッファと第2のアルゴリズムで選択したキュー・バッファのどちらを優先するかを選択する。そして、選択したキュー・バッファを多重化部20に通知する。
【0067】
第1のアルゴリズムは、複数のキュー・バッファそれぞれに設定された重み付けの値を初期値とし、各キュー・バッファからのデータ読み出しの度に算出される優先度に基づき複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファを選択することにより、データの帯域を保証するアルゴリズムである。
【0068】
この発明における実施の形態2の重み付け優先制御装置と、実施の形態1の重み付け優先制御装置との違いは、扱うパケットが可変長であるのか固定長であるのかの違いである。そのため、実施の形態2では、重み付け処理が実施の形態1のWRR方式とは異なるアルゴリズムを採用する。
【0069】
まず、可変長のパケットの制御に適用される重み付け処理について説明する。ここで、キュー・バッファ11の重み付けの値を「4」、キュー・バッファ12の重み付けの値を「3」、キュー・バッファ13の重み付けの値を「6」とする。これら重み付けの値は、キュー・バッファ11から読み出された総パケット長をx1、キュー・バッファ12から読み出された総パケット長をx2、キュー・バッファ13から読み出された総パケット長をx3とすると、回線40にパケットを出力する時の帯域が、「x1:x2:x3=4:6:3」の比で維持されるようにすることを意味する。この実施の形態2の第1のアルゴリズムにおいては、これら重み付けの値の逆数を帯域制御に利用する。ここで、制御値をyとすると、制御値yは、
y=(1/重み付けの値)×100 ・・・(式1)
で表される。ただし、yは小数点以下を四捨五入した整数とする。(式1)では、100をかけるようにしているが、これに限定されるものではなく、ハードウエアで実現する場合にはそのハードウエアに応じて、また、システムの要求する精度に応じて適切な値を決定すればよい。
【0070】
(式1)を用いた場合、キュー・バッファ11の制御値y1は、
y1=(1/4)×100=25
となり、キュー・バッファ12の制御値y2は、
y2=(1/6)×100=33
となり、キュー・バッファ13の制御値y3は、
y3=(1/3)×100=17
となる。この実施の形態2の重み付け優先制御装置は、これらの制御値y1〜y3に基づいて帯域制御を行う。
【0071】
第1のアルゴリズムは、キュー・バッファ11〜13の先頭のパケット長とキュー・バッファ11〜13に対応した制御値y1〜y3との積をカウント値(優先度)とし、これらのカウント値を比較して、一番小さい値のカウント値のキュー・バッファを選択する。すなわち、常に各キュー・バッファの一番先頭のパケットだけが考慮の対象として重み付けの帯域制御を行う。なお、カウント値が等しい場合には、ラウンドロビン等を付加的に実施して常に1つを選択する。
【0072】
第2のアルゴリズムは、実施の形態1と同様に、キュー・バッファからパケットがあふれる前にパケットが集中しているキュー・バッファを検知して、検知したキューのデータを優先的に回線に出力するためのアルゴリズムである。
【0073】
キュー制御部30aは、キュー・バッファ11〜13に対応した重み付けの値を記憶するカウント値レジスタ37〜39と、キュー・バッファ11〜13がそれぞれ蓄積しているパケットの合計パケット長を監視するキュー監視部34と、つぎにパケットを読み出すべきキュー・バッファを決定するキュー選択部35aと、キュー・バッファ11〜13の重み付けの値を算出する重み付け演算部36aとを備えている。
【0074】
キュー選択部35aは、第1のアルゴリズムまたは第2のアルゴリズムに基づいてつぎにパケットを読み出すべきキュー・バッファを選択して、選択したキュー・バッファのパケットを読み出すように多重化部20に通知するとともに、選択したキュー・バッファを重み付け演算部36aに通知する。
【0075】
第1のアルゴリズムの場合、キュー選択部35aは、カウント値レジスタ37〜39に保持されているカウント値を比較して、一番小さい値のカウント値を検索し、検索したカウント値を保持するカウント値レジスタに対応するキュー・バッファを選択する。カウント値が等しい場合には、ラウンドロビン等を付加的に実施して常に1つを選択する。第2のアルゴリズムの場合、キュー選択部35aは、キュー監視部34から通知された超過情報内のキュー・バッファを選択する。
【0076】
キュー選択部35aが選択したキュー・バッファに対応するカウント値レジスタのカウント値が「0」以上の場合、重み付け演算部36aは、キュー選択部35aが選択したキュー・バッファに対応するカウント値レジスタのカウント値を各カウント値レジスタのカウント値から減算する。そして、減算したカウント値をカウント値レジスタに設定する。また、キュー選択部35aが選択したキュー・バッファに対応するカウント値レジスタには、選択したキュー・バッファの先頭のパケット長と(式1)に基づいて算出した制御値の積を設定する。
【0077】
キュー選択部35aが選択したキュー・バッファに対応するカウント値レジスタのカウント値が「0」より小さい場合、重み付け演算部36aは、キュー選択部35aが選択したキュー・バッファに対応するカウント値レジスタのカウント値に、選択したキュー・バッファの先頭のパケット長と(式1)に基づいて算出した制御値の積を加算する。そして、加算した値をキュー選択部35aが選択したキュー・バッファに対応するカウント値レジスタに設定する。
【0078】
カウント値レジスタ37〜39は、各カウンタに対応したキュー・バッファの先頭パケットのパケット長と(式1)に基づいて算出された制御値との積を保持する。カウント値レジスタ37がキュー・バッファ11に、カウント値レジスタ38がキュー・バッファ12に、カウント値レジスタ39がキュー・バッファ13にそれぞれ対応する。
【0079】
図7および図8は、キュー・バッファ11〜13に蓄積されているパケットと、カウント値レジスタ37〜39の値と、キュー選択部35aが選択したキュー・バッファのパケットを多重化部20が読み出して、読み出したパケットを回線40に出力した様子を示す図である。図7および図8を参照して、この発明における実施の形態2の重み付け優先制御装置の動作を説明する。
【0080】
まず、図7を参照して、第1のアルゴリズムに基づいてパケットを出力する動作を説明する。図7(a)において、キュー・バッファ11はパケットA1〜A3を、キュー・バッファ12はパケットB1〜B4を、キュー・バッファ13はパケットC1〜C3をそれぞれ蓄積している。予め定められている基準パケット長を「1」とすると、パケットA1のパケット長は「3」、パケットA2のパケット長は「2」、パケットA3のパケット長は「2」、パケットB1のパケット長は「1」、パケットB2のパケット長は「2」、パケットB3のパケット長は「3」、パケットB4のパケット長は「1」、パケットC1のパケット長は「2」、パケットC2のパケット長は「1」、パケットC3のパケット長は「4」である。
【0081】
カウント値レジスタ37には(式1)を用いて算出した制御値y1である「25」とキュー・バッファ11の先頭のパケットA1のパケット長「3」を乗算した値「75」が、カウント値レジスタ38には(式1)を用いて算出した制御値y2である「33」とキュー・バッファ12の先頭のパケットB1のパケット長「1」を乗算した値「33」が、カウント値レジスタ39には(式1)を用いて算出した制御値y3である「17」とキュー・バッファ13の先頭のパケットC1のパケット長「2」を乗算した値「34」が設定されている。
【0082】
ここでは、キュー監視部34に予め定められている閾値は、点線で示したように基準パケット長7個分のパケット長とする。キュー・バッファ11に蓄積されているパケットA1〜A3の合計パケット長、キュー・バッファ12に蓄積されているパケットB1〜B4の合計パケット長、キュー・バッファ13に蓄積されているパケットC1〜C3の合計パケット長は、それぞれ「7」であり、閾値を超えていない。
【0083】
キュー選択部35aは、カウント値レジスタ37〜39に設定されているカウント値を比較して一番小さいカウント値を検索し、検索したカウント値レジスタに対応するキュー・バッファを選択する。そして、選択したキュー・バッファのパケットを読み出すように多重化部20に通知するとともに、選択したキュー・バッファを重み付け演算部36aに通知する。ここでは、カウント値レジスタ38に保持されているカウント値「33」が一番小さいので、キュー選択部35aはキュー・バッファ12を選択する。
【0084】
図7(b)に示すように、多重化部20は、キュー・バッファ12のパケットB1を読み出して、読み出したパケットB1を回線40に出力する。カウント値レジスタ38のカウント値が「0」以上であるので、重み付け演算部36aは、カウント値レジスタ37〜39のそれぞれのカウント値からカウント値レジスタ38のカウント値を減算し、減算した値を新たなカウント値としてカウント値レジスタ37〜39に設定する。
【0085】
ここでは、図7(a)に示したように、カウント値レジスタ37のカウント値が「75」、カウント値レジスタ38のカウント値が「33」、カウント値レジスタ39のカウント値が「34」である。したがって、カウント値レジスタ37のカウント値は「42」、カウント値レジスタ38のカウント値は「0」、カウント値レジスタ39のカウント値は「1」となる。
【0086】
キュー・バッファ12のパケットB1を読み出したので、重み付け演算部36aは、キュー・バッファ12の先頭のパケットB2のパケット長「2」と(式1)に基づいて算出したキュー・バッファ12の制御値y2である「33」との積「66」をカウント値レジスタ38に設定する。したがって、図7(b)に示すように、カウント値レジスタ37のカウント値は「42」、カウント値レジスタ38のカウント値は「66」、カウント値レジスタ39のカウント値は「1」となる。
【0087】
このように第1のアルゴリズムでは、キュー選択部35aは、カウント値レジスタ37〜39のカウント値を比較して、一番小さいカウント値を検索して、検索したカウント値レジスタに対応するキュー・バッファを選択し、多重化部20は、選択されたキュー・バッファに蓄積されている先頭のパケットを回線40に出力する。重み付け演算部36aは、選択されたキュー・バッファに対応するカウント値レジスタのカウント値を、各カウント値レジスタの値から減算して、新たなカウント値を各カウント値レジスタに設定する。そして、選択されたキュー・バッファに対応するカウント値レジスタには、キュー・バッファの先頭のパケットのパケット長と(式1)を用いて算出した制御値との積をカウント値として設定する動作を繰り返す。その時のキュー・バッファ11〜13に蓄積されているパケットと、カウント値レジスタ37〜39の値と、キュー選択部35aが選択したキュー・バッファのパケットを多重化部20が読み出して、読み出したパケットを回線40に出力した様子を図7(c)〜図7(f)に示す。
【0088】
ここで、第1のアルゴリズムがWRR方式やWRQ方式と同様に、キュー・バッファに蓄積されるパケットが輻輳してきた時点においても、各キュー・バッファ毎に出力先の帯域の一定割合以上の帯域を保証することが可能であることを簡単に説明する。
【0089】
ある時間t内に出力先に読み出されたパケットについて、キュー・バッファS(ここでは、キュー・バッファ11〜13であり、S=11,12,13とする)から読み出されたパケット数をNs(ここでは、キュー・バッファSごとに、1、2、…、Ns)、キュー・バッファSから読み出されたパケットそれぞれのパケット長をsPn、各キュー・バッファ毎の重み付けをBsとすると、キュー・バッファS帯域が重み付けの値で維持されるためには、
【数1】
が成り立つ必要がある。
【0090】
【数2】
は、キュー・バッファSから出力された実際の帯域をあらわすので、それぞれの比がBsに対応していればよい。厳密には、(式2)の各項が等しく(「=」で結ばれる)ならなければならないが、有限の時間tにおいて、パケット長が可変であるため等しくはならない。(式2)を比の形式で表すと、
【数3】
となる。ここでは、時間tは共通であるので削除している。そして、各項のΣ内の項、11P1/B11,11P2/B11,11P3/B11,…,11Pn/B11は、まさに重み付け演算部36aが算出する「キュー・バッファ11の先頭のパケット長×重み付けの値の逆数」に他ならない。したがって、上述したような動作を行うことは、ある時間tにおける(式3)の各項の差を、常に極力小さく(最小ではない)維持していくことになる。厳密には、最小でなければならないが、ハードウエアで実現する場合、他の要件も含めて考えると帯域制御の方式の1つとして十分である。
【0091】
つぎに、図8を参照して、この発明における実施の形態2の重み付け優先制御装置が、第2のアルゴリズムに基づいてパケットを出力する動作を説明する。
【0092】
図8(a)において、キュー・バッファ11はパケットA1〜A3を、キュー・バッファ12はパケットB1〜B4を、キュー・バッファ13はパケットC1〜C4をそれぞれ蓄積している。予め定められている基準パケット長を「1」とすると、パケットA1のパケット長は「3」、パケットA2のパケット長は「2」、パケットA3のパケット長は「2」、パケットB1のパケット長は「1」、パケットB2のパケット長は「2」、パケットB3のパケット長は「3」、パケットB4のパケット長は「1」、パケットC1のパケット長は「2」、パケットC2のパケット長は「1」、パケットC3のパケット長は「4」である。
【0093】
カウント値レジスタ37には(式1)を用いて算出した制御値y1である「25」とキュー・バッファ11の先頭のパケットA1のパケット長「3」を乗算した値「75」が、カウント値レジスタ38には(式1)を用いて算出した制御値y2である「33」とキュー・バッファ12の先頭のパケットB1のパケット長「1」を乗算した値「33」が、カウント値レジスタ39には(式1)を用いて算出した制御値y3である「17」とキュー・バッファ13の先頭のパケットC1のパケット長「2」を乗算した値「34」が設定されている。
【0094】
ここでは、キュー監視部34に予め定められている閾値は、点線で示したように基準パケット長7個分のパケット長とする。キュー・バッファ11に蓄積されているパケットA1〜A3の合計パケット長、キュー・バッファ12に蓄積されているパケットB1〜B4の合計パケット長、キュー・バッファ13に蓄積されているパケットC1〜C3の合計パケット長は、それぞれ「7」であり、閾値を超えていない。しがたって、キュー制御部30aは、上述した第1のアルゴリズムに基づいてキュー・バッファ選択して、多重化部20は、キュー制御部30aが選択したパケットを読み出して、読み出したパケットを回線40に出力する動作を繰り返し、パケットB1、パケットC1、パケットC2、パケットA1の順に回線40にパケットを出力する(図7(b)〜図7(e)参照)。
【0095】
ここで、図8(b)に示すように、キュー・バッファ13にパケット長「1」のパケットC4とパケット長「3」のパケットC5が蓄積されたとする。キュー・バッファ13に蓄積されているパケットC3〜C5の合計パケット長は「8」となり、閾値「7」を超える。キュー監視部34は、キュー・バッファ13に蓄積されているパケットC3〜C5の合計パケット長が閾値を超えたことを検知して、キュー・バッファ13が閾値を超えたことを通知するための超過情報をキュー選択部35aに出力する。
【0096】
キュー監視部34から超過情報が通知されたため、キュー選択部35aは、通知された超過情報に含まれるキュー・バッファ13を選択する。すなわち、第1のアルゴリズムに基づいてカウント値の一番小さいキュー・バッファ12ではなく、第2のアルゴリズムに基づいて選択したキュー・バッファ13を優先し、キュー・バッファ13のパケットを読み出すように多重化部20に通知する。
【0097】
多重化部20は、キュー・バッファ13のパケットC3を読み出して、読み出したパケットC3を回線40に出力する。重み付け演算部36aは、カウント値レジスタ37〜39のそれぞれのカウント値からカウント値レジスタ39のカウント値を減算し、減算した値を新たなカウント値としてカウント値レジスタ37〜39に設定する。
【0098】
図8(b)に示したように、カウント値レジスタ37のカウント値が「50」、カウント値レジスタ38のカウント値が「24」、カウント値レジスタ39のカウント値が「44」である。したがって、カウント値レジスタ37のカウント値は「6」、カウント値レジスタ38のカウント値は「−20」、カウント値レジスタ39のカウント値は「0」となる。
【0099】
キュー・バッファ13のパケットC3を読み出したので、重み付け演算部36aは、キュー・バッファ13の先頭のパケットC4のパケット長「1」と(式1)に基づいて算出したキュー・バッファ13の制御値y3である「17」を乗算した値「17」をカウント値レジスタ37に設定する。したがって、図8(c)に示すように、カウント値レジスタ37のカウント値は「6」、カウント値レジスタ38のカウント値は「−20」、カウント値レジスタ39のカウント値は「17」となる。
【0100】
ここで、キュー・バッファ11にパケット長「2」のパケットA4とパケット長「3」のパケットA5が蓄積されたとする(図8(c)参照)。キュー・バッファ11に蓄積されているパケットA2〜A5の合計パケット長が「8」となり、閾値「7」を超える。キュー監視部34は、キュー・バッファ11に蓄積されているパケットA2〜A5の合計パケット長が閾値を超えたことを検知して、キュー・バッファ11が閾値を超えたことを通知するための超過情報をキュー選択部35aに出力する。
【0101】
キュー監視部34から超過情報が通知されたため、キュー選択部35aは、通知された超過情報に含まれるキュー・バッファ11を選択して、キュー・バッファ11のパケットを読み出すように多重化部20に通知する。
【0102】
多重化部20は、キュー・バッファ11のパケットA2を読み出して、読み出したパケットA2を回線40に出力する。重み付け演算部36aは、カウント値レジスタ37〜39のそれぞれのカウント値からカウント値レジスタ37のカウント値を減算し、減算した値を新たなカウント値としてカウント値レジスタ37〜39に設定する。
【0103】
図8(c)に示したように、カウント値レジスタ37のカウント値が「6」、カウント値レジスタ38のカウント値が「−20」、カウント値レジスタ39のカウント値が「17」である。したがって、カウント値レジスタ37のカウント値は「0」、カウント値レジスタ38のカウント値は「−26」、カウント値レジスタ39のカウント値は「11」となる。
【0104】
キュー・バッファ11のパケットA2を読み出したので、重み付け演算部36aは、キュー・バッファ11の先頭のパケットA3のパケット長「2」と(式1)に基づいて算出したキュー・バッファ11の制御値y1である「25」との積「50」をカウント値レジスタ37に設定する。したがって、図8(d)に示すように、カウント値レジスタ37のカウント値は「50」、カウント値レジスタ38のカウント値は「−26」、カウント値レジスタ39のカウント値は「11」となる。
【0105】
図8(d)に示したように、キュー・バッファ11のパケットA2を出力し、キュー・バッファ11〜13に新たに蓄積されたパケットもないので、キュー・バッファ11〜13に蓄積されているパケットの各合計パケット長は、どれも閾値を超えていない。したがって、キュー選択部35aは、第1のアルゴリズムに基づいてキュー・バッファを選択する。すなわち、カウント値レジスタ37〜38のそれぞれのカウント値の一番小さいカウント値レジスタに対応するキュー・バッファを選択する。図8(d)においては、キュー選択部35aは、カウント値が「−26」のキュー・バッファ12を選択し、多重化部20は、キュー・バッファ12のパケットB2を回線40に出力する。
【0106】
重み付け演算部36aは、キュー・バッファ12の先頭のパケットB3のパケット長「3」と(式1)に基づいて算出したキュー・バッファ12の制御値y2である「33」を乗算した値「99」を、カウント値レジスタ38のカウント値「−26」に加算する。そして、加算した値「73」をカウント値レジスタ38に設定する。重み付け演算部36aは、キュー・バッファ11とキュー・バッファ13に対応するカウント値レジスタ37とカウント値レジスタ39のカウント値については変更しない。すなわち、パケットを読み出したキュー・バッファに対応するカウント値レジスタのカウント値が 「0」より小さい場合(カウント値が負数の場合)、重み付け演算部36aは、他のカウント値レジスタのカウント値を新たに設定せず、パケットを読み出したキュー・バッファに対応するカウント値レジスタのカウント値にパケット長と制御値との積を加算する。そして、加算した値をパケットを読み出したキュー・バッファに対応するカウント値レジスタに設定する。したがって、図8(e)に示すように、カウント値レジスタ37のカウント値は「50」、カウント値レジスタ38のカウント値は「73」、カウント値レジスタ39のカウント値は「11」となり、カウント値レジスタ37〜39のカウント値は、全て「0」以上となる。
【0107】
その後、キュー選択部35aは、カウント値レジスタ37〜39のカウント値を比較して、一番小さいカウント値のカウント値レジスタに対応するキュー・バッファ13を選択し、多重化部20は、キュー・バッファ13のパケットC4を回線40に出力する。そして、重み付け演算部36aは、カウント値レジスタ39のカウント値をカウント値レジスタ37〜39のカウント値から減算するとともに、キュー・バッファ13の先頭パケットC5のパケット長と(式1)に基づいて算出した制御値y3を乗算して、カウント値レジスタ37〜39のカウント値を算出して、それぞれのカウント値レジスタに設定する。その様子を図8(f)に示す。
【0108】
このようにこの実施の形態2では、複数のキュー・バッファに蓄積されているデータに対して一定の割合の帯域を保証するために、予め定められた重み付けの値による優先度に基づいて複数のキュー・バッファの優先順位を決定してデータを読み出すキュー・バッファを選択する第1のアルゴリズムと、第1のアルゴリズムとは異なる第2のアルゴリズムによりデータを読み出すキュー・バッファを選択する第2のアルゴリズムがあり、これら2つのアルゴリズムにより選択したキュー・バッファが異なる場合には、第2のアルゴリズムにより選択したキュー・バッファを優先してデータを出力する。その際に、優先したキュー・バッファの優先度を下げるようにしているため、第2のアルゴリズムにより選択したキュー・バッファを優先した場合でも、第1のアルゴリズムの帯域保証の精度を維持することができる。
【0109】
なお、カウント値レジスタの値が負数になったときの取り扱いとして、負数値をいくつまで許可するかという制限が、実現性に大きく影響する。この制限は、重みの逆数を整数に変換するために乗算する値(この場合は100)と、パケット長として規格化された値(この場合は1から、最大4まで)によって決まる。システムに要求される性能にもよるが、最大長のパケット、数個から数十個分程度、借入ができるようにするのが妥当である。もちろんリソースとして実装されるキュー・バッファの深さもこの値を決定する要因である。そしてこのときの処理は、あるキュー・バッファのカウント値レジスタが負数の限度値に達した場合には、今度はキュー監視部34の要求に拘わらず、負数の限度に達したカウント値レジスタに対応するキュー・バッファからのパケットの読み出しを最優先するというように、互いのアルゴリズムの達成度に折り合いをつけるようにすればよい。
【0110】
また、実施の形態1および2では、帯域制御を第1のアルゴリズムとし、キュー・バッファに保持するデータ長による制御を第2のアルゴリズムとして説明したが、これに限定されるものではなく、つぎにデータを読み出すべき優先制御処理が複数あって、それらの優先制御処理が共謀する可能性がある環境において適用可能である。
【0111】
【発明の効果】
以上説明したように、各キュー・バッファ1ごとに割り付けられた重み付けの値を初期値とし、各キュー・バッファからのデータ読み出しの度に算出される優先度に基づき複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファ1を選択することによりデータの帯域を保証する第1のアルゴリズムによって選択されたキュー・バッファと、第1のアルゴリズムとは異なる処理によってデータを読み出すキュー・バッファを選択する第2のアルゴリズムによって選択されたキュー・バッファとが異なる場合には、所定の条件が成立する場合を除いて、第2のアルゴリズムによって選択されたキュー・バッファを優先するとともに、優先するキュー・バッファ以外のすべてのキュー・バッファの優先度を上げるようにしているため、第2のアルゴリズムにより選択したキュー・バッファを優先した場合でも、第1のアルゴリズムの帯域の保証の精度を維持することができる。
【図面の簡単な説明】
【図1】 この発明における実施の形態1の重み付け優先制御方法に基づいて動作する重み付け優先制御装置の構成を示すブロック図である。
【図2】 図1に示した重み付け優先制御装置の動作を説明するための図である。
【図3】 図1に示した重み付け優先制御装置の動作を説明するための図である。
【図4】 図1に示した重み付け優先制御装置の動作を説明するための図である。
【図5】 図1に示した重み付け優先制御装置の動作を説明するための図である。
【図6】 この発明における実施の形態2の重み付け優先制御方法に基づいて動作する重み付け優先制御装置の構成を示すブロック図である。
【図7】 図6に示した重み付け優先制御装置の動作を説明するための図である。
【図8】 図6に示した重み付け優先制御装置の動作を説明するための図である。
【符号の説明】
11,12,13 キュー・バッファ、20 多重化部、30 キュー制御部、31,32,33 カウンタ、34 キュー監視部、35,35a キュー選択部、36,36a 重み付け演算部、37,38,39 カウント値レジスタ、40 回線。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a bandwidth control method for a communication apparatus, and more particularly to a weighted priority control method for performing bandwidth control simultaneously with circuit switching processing when data is output to a circuit.
[0002]
[Prior art]
According to the weighting value set for each output destination that outputs data, for example, a plurality of queues (queues) installed immediately before the line, a constant of the bandwidth of the line for the data of each queue There are a weighted round robin (WRR) method and a weighted fair queuing (WFQ) method as an algorithm for assuring a bandwidth of the above rate.
[0003]
In the WRR method, the order of queues for reading data is determined in advance, and a weighting value is set for each queue when performing round robin (rotation priority control) for sequentially reading data from each queue according to the order. A weight value is decremented every time data is read out. Then, by reading the data of the next queue without reading the data from the queue whose weighting value is “0”, the output frequency of the data output from each queue is controlled, and a certain percentage of bandwidth Is guaranteed. Therefore, especially when handling fixed-length data such as ATM (Asynchronous Transfer Mode) cells, it can be realized with a counter capable of setting decrement and weight values. It can be realized with a simple circuit.
[0004]
For these reasons, a technique is conceived in which various expansions and ingenuities are applied to the implementation and functions of the apparatus using the WRR method. In the first prior art, an algorithm using a priority index is basically used, and a priority sort list is provided for a configuration using a priority index table, so that all flows or a predetermined number is determined for each actual packet transfer sequence (round). The flows are stored in order of descending priority index (descending order), packets are transferred in order from the first flow in the priority sort list, and then packets are transferred from each flow outside the priority sort list. The delay jitter performance which is a problem of the system is improved (for example, see Patent Document 1).
[0005]
Further, in the second prior art, when there is no cell in the cell buffer circuit, a cell presence / absence flag output circuit for sending a significant cell presence / absence flag and a corresponding count value of the count memory are subtracted to “0”. A wait presence / absence flag sending circuit for sending a significant wait presence / absence flag, and a count initialization flag sending circuit for simultaneously sending a significant count initialization flag when either or both of the cell presence / absence flag and the wait presence / absence flag are significant For each cell buffer, when one cell buffer circuit in each cell buffer circuit is selected and a cell is output, if the corresponding count initialization flag is significant, only the corresponding counter value is initialized. In this way, by eliminating the time limit for initializing the counter value, the memory can be used regardless of the number of cell buffer circuits. So that it is possible to construct a counter is used. (For example, refer to Patent Document 2).
[0006]
[Patent Document 1]
JP-A-11-298523
[Patent Document 2]
JP 2000-278272 A
[0007]
[Problems to be solved by the invention]
The first prior art uses an algorithm using a priority index, and the second technique uses a WRR algorithm. That is, both of the above prior arts form the body of one algorithm, and the queue to be read out next is selected only in an environment where the algorithm is unique. For this reason, the above two conventional techniques may cause inconveniences when there are two algorithms for selecting a queue to be read next.
[0008]
For example, in general, data flowing on a network does not flow as required by bandwidth control. Looking at the data flowing on the network in micro time units, if data is concentrated at a certain place and data is read as requested by bandwidth control, the data overflows from the queue, and the overflowed data is discarded. Is done.
[0009]
In such a case, it is general that the discards are not concentrated on one data series by RED (Random Early Detection), but it is not unreasonable to discard the data. Therefore, it is assumed that an algorithm “detects a queue in which data is concentrated before data overflows from the queue and outputs the detected queue data preferentially to the line” is added to the above two conventional techniques. That is, it is assumed that there are an algorithm for maintaining bandwidth control such as the WRR method and an algorithm for selecting a queue to be read next (in this case, selecting a queue in which data is concentrated). When the queues selected by these two algorithms are different and data is read from a queue selected by an algorithm different from the algorithm that maintains the bandwidth control, the above two conventional techniques do not lose the bandwidth control effect itself. This procedure has not been studied.
[0010]
Therefore, the above two conventional techniques have a problem that the accuracy of the bandwidth control cannot be maintained when it is necessary to properly use an algorithm for maintaining the bandwidth control according to the queue status and a different algorithm. It was.
[0011]
The present invention has been made in view of the above, and has an algorithm for maintaining bandwidth control and a different algorithm, and when data is read from a queue selected by an algorithm different from the algorithm for maintaining bandwidth control. However, an object of the present invention is to obtain a weighted priority control method that can maintain the accuracy of the bandwidth of the algorithm that maintains the bandwidth control.
[0012]
[Means for Solving the Problems]
In order to achieve the above object, according to the weighted priority control method of the present invention, the data stored in a plurality of queue buffers is assigned to each queue at a ratio of a weight value assigned to each of the plurality of queue buffers. A weighted priority control method for guaranteeing the bandwidth of the data read from the buffer, wherein the weighting value is an initial value, and the plurality of the plurality of weights are controlled based on the priority calculated each time data is read from each queue buffer. By determining the priority of the queue buffer and selecting the queue buffer from which data is read according to the determined priority, the first algorithm for guaranteeing the bandwidth of the data is different from the first algorithm. A second algorithm for selecting a queue buffer from which data is read, the first and If the queue buffers selected by the algorithm of 2 are different, the queue buffer selected by the second algorithm is prioritized unless a predetermined condition is satisfied, and the queue buffers other than the priority queue buffer are selected. A process for increasing the priority in the first algorithm of all queue buffers is performed.
[0013]
According to this invention, the weighting value assigned to each queue buffer is used as an initial value, and the priority order of a plurality of queue buffers is determined based on the priority calculated each time data is read from each queue buffer. The queue buffer selected by the first algorithm that guarantees the bandwidth of the data by selecting and selecting the queue buffer that reads the data according to the determined priority, and reads the data by a process different from the first algorithm If the queue buffer selected by the second algorithm for selecting the queue buffer is different from the queue buffer selected by the second algorithm, the queue buffer selected by the second algorithm is prioritized unless a predetermined condition is satisfied. Priority for all queue buffers except the preferred queue buffer It is to raise the. However, when priority is given to the queue buffer selected by the second algorithm and the priority of all queue buffers other than the priority queue buffer is increased, there is a limit to increase the priority in terms of implementation. In this case, when the priority of the queue buffer exceeds the limit, the queue buffer selected by the first algorithm is prioritized when the priority exceeds the limit value. In addition to solving the above problem, it is possible to prevent the phenomenon that the bandwidth guarantee cannot be maintained by continuously selecting the queue buffer selected by the second algorithm.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of a weighting priority control method according to the present invention will be explained below in detail with reference to the accompanying drawings.
[0015]
A first embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a configuration of a weighting priority control apparatus that operates based on the weighting priority control method according to the first embodiment of the present invention. The weighted priority control apparatus shown in FIG. 1 includes a plurality of (three in this case) queue buffers 11 to 13 that store a fixed amount of data (packets), and one of two predetermined different algorithms. A
[0016]
The
[0017]
The first algorithm uses a weighting value set for each of the plurality of queue buffers as an initial value, and the priority order of the plurality of queue buffers based on the priority calculated each time data is read from each queue buffer. And a queue buffer for reading out data according to the determined priority order, thereby guaranteeing the data bandwidth. Here, the WRR method is used.
[0018]
The second algorithm is an algorithm that detects a queue buffer in which data is concentrated before a packet overflows from the queue buffer, and outputs the detected queue buffer packet preferentially to the line.
[0019]
The
[0020]
The
[0021]
The
[0022]
In the case of the first algorithm, the
[0023]
In the case of the second algorithm, the
[0024]
The
[0025]
When all the count values of the
[0026]
2 to 5, the multiplexing
[0027]
First, an operation for outputting a packet based on the first algorithm will be described with reference to FIGS. 2 and 3. In FIG. 2A, the
[0028]
Since the total packet length of the packets stored in the queue buffers 11 to 13 does not exceed the threshold value for each queue buffer, the
[0029]
As shown in FIG. 2B, the multiplexing
[0030]
Since the
[0031]
As shown in FIG. 2C, the multiplexing
[0032]
Since the
[0033]
As illustrated in FIG. 2D, the multiplexing
[0034]
Since the
[0035]
As shown in FIG. 2E, the multiplexing
[0036]
Since the
[0037]
As shown in FIG. 3F, the multiplexing
[0038]
Since the
[0039]
As shown in FIG. 3G, the multiplexing
[0040]
Here, the count values of the
[0041]
Upon receiving the notification, the
[0042]
After the
[0043]
Next, referring to FIG. 4 and FIG. 5, the weight priority control apparatus is based on the second algorithm, taking as an example a case where the packet accumulated in the
[0044]
In FIG. 4A, the
[0045]
Since the amount of packets stored in the queue buffers 13 to 33 is 5 and does not exceed the threshold value, the
[0046]
Since the
[0047]
As shown in FIG. 4C, the multiplexing
[0048]
The total packet length of the packets stored in the
[0049]
As shown in FIG. 4D, the multiplexing
[0050]
When the count value of the
[0051]
The total packet length of the packets stored in the
[0052]
As shown in FIG. 4 (f), the multiplexing
[0053]
When the count value of the
[0054]
As shown in FIG. 5H, the multiplexing
[0055]
After that, even if packets are newly accumulated in the queue buffers 11 to 13, if the total packet length of the packets accumulated in the queue buffers 11 to 13 does not exceed the threshold value, the
[0056]
The
[0057]
When the count values of the
[0058]
Here, the packets output in the period from when the weight values are actually set to the
[0059]
As described above, in the first embodiment, in order to guarantee a certain percentage of bandwidth for data stored in a plurality of queue buffers, a plurality of weights are determined based on priorities based on predetermined weight values. A first algorithm for selecting a queue buffer for reading data by determining priority of the queue buffer, and a second algorithm for selecting a queue buffer for reading data by a second algorithm different from the first algorithm If the queue buffers selected by these two algorithms are different, data is output with priority given to the queue buffer selected by the second algorithm. At that time, since the priority of all queue buffers other than the priority queue buffer is raised, even when priority is given to the queue buffer selected by the second algorithm, the bandwidth guarantee of the first algorithm is guaranteed. Accuracy can be maintained.
[0060]
In order to simplify the description, the condition for selecting the
[0061]
In the first embodiment, the limit for continuously selecting the same queue buffer by the second algorithm is set to four times. Therefore, for example, when the packet accumulated in the
[0062]
By giving priority to the second algorithm, the count values of the counters other than the queue buffer selected by the second algorithm are increased. In the present invention, a limit value for increasing the count value is set, and when the count value exceeds the limit value, the queue corresponding to the counter exceeding the limit value regardless of the request of the
[0063]
In the first embodiment, the second algorithm is “detecting a queue buffer in which data is concentrated before packets overflow from the queue buffer, and preferentially connecting the detected queue buffer packet to the line. Output to ". However, the second algorithm is not limited to this and may be different from the bandwidth control algorithm that guarantees the bandwidth. For example, there is a case where a bandwidth control algorithm is added to the input buffer type switch as a priority conflict with the bandwidth control algorithm. In this case, the switch exchange algorithm of the input buffer type switch may compete with the bandwidth control algorithm. When the N (N is a natural number) × N ports are exchanged, the input buffer type switch cannot flow data unless the input and output ports of the exchanged data are always connected to “1: 1”. That is, it is impossible to transfer data from a plurality of input ports to one output port by one exchange, and the exchange algorithm has a great influence on the throughput performance of the switch. Therefore, the system design should determine which of the switching algorithm performance and the bandwidth control should be prioritized.
[0064]
A second embodiment of the present invention will be described with reference to FIGS. In the first embodiment, the bandwidth control system is maintained when a bandwidth control algorithm and a different algorithm are selected according to the normal state of the queue buffer and a fixed-length packet is output to the line. . However, in an actual system, a packet is not always a fixed length. In the second embodiment, a bandwidth control algorithm and a different algorithm are selected according to the state of the queue buffer, and the accuracy of bandwidth control is maintained even when a variable-length packet is output to the line. Is.
[0065]
FIG. 6 is a block diagram showing a configuration of a weighting priority control apparatus that operates based on the weighting priority control method according to the second embodiment of the present invention. The weighting priority control device shown in FIG. 6 includes a
[0066]
The
[0067]
The first algorithm uses a weighting value set for each of the plurality of queue buffers as an initial value, and priorities of the plurality of queue buffers based on a priority calculated each time data is read from each queue buffer. And a queue buffer that reads data according to the determined priority order is selected to guarantee the data bandwidth.
[0068]
The difference between the weighted priority control apparatus according to the second embodiment and the weighted priority control apparatus according to the first embodiment of the present invention is a difference in whether a packet to be handled has a variable length or a fixed length. For this reason, in the second embodiment, an algorithm different in weighting processing from the WRR method in the first embodiment is adopted.
[0069]
First, the weighting process applied to control of variable length packets will be described. Here, the weight value of the
y = (1 / weighting value) × 100 (Expression 1)
It is represented by However, y is an integer rounded to the nearest decimal point. In (Equation 1), 100 is multiplied, but the present invention is not limited to this, and when implemented by hardware, it is appropriate according to the hardware and according to the accuracy required by the system. It is sufficient to determine a correct value.
[0070]
When (Equation 1) is used, the control value y1 of the
y1 = (1/4) × 100 = 25
The control value y2 of the
y2 = (1/6) × 100 = 33
The control value y3 of the
y3 = (1/3) × 100 = 17
It becomes. The weighted priority control apparatus according to the second embodiment performs band control based on these control values y1 to y3.
[0071]
The first algorithm uses the product of the head packet length of the queue buffers 11 to 13 and the control values y1 to y3 corresponding to the queue buffers 11 to 13 as a count value (priority), and compares these count values. Then, the queue buffer having the smallest count value is selected. That is, weight control is always performed with only the first packet of each queue buffer being considered. When the count values are equal, round robin or the like is additionally performed to always select one.
[0072]
Similar to the first embodiment, the second algorithm detects a queue buffer in which packets are concentrated before packets overflow from the queue buffer, and outputs the detected queue data to the line with priority. Is an algorithm for
[0073]
The
[0074]
The
[0075]
In the case of the first algorithm, the
[0076]
When the count value of the count value register corresponding to the queue buffer selected by the
[0077]
When the count value of the count value register corresponding to the queue buffer selected by the
[0078]
The count value registers 37 to 39 hold the product of the packet length of the first packet of the queue buffer corresponding to each counter and the control value calculated based on (Equation 1). The
[0079]
7 and 8, the multiplexing
[0080]
First, an operation for outputting a packet based on the first algorithm will be described with reference to FIG. In FIG. 7A, the
[0081]
In the
[0082]
Here, the threshold value predetermined for the
[0083]
The
[0084]
As shown in FIG. 7B, the multiplexing
[0085]
Here, as shown in FIG. 7A, the count value of the
[0086]
Since the packet B1 of the
[0087]
As described above, in the first algorithm, the
[0088]
Here, as in the case of the WRR method and the WRQ method, when the packets accumulated in the queue buffer are congested, the first algorithm sets a bandwidth equal to or greater than a certain ratio of the output destination bandwidth for each queue buffer. Briefly explain that it can be guaranteed.
[0089]
For packets read to the output destination within a certain time t, the number of packets read from the queue buffer S (here, the queue buffers 11 to 13 and S = 11, 12, and 13) Ns (here, 1, 2,..., Ns for each queue buffer S), the packet length of each packet read from the queue buffer S is sPn, and the weight for each queue buffer is Bs. In order for the queue buffer S bandwidth to be maintained at a weighted value,
[Expression 1]
Need to hold.
[0090]
[Expression 2]
Represents the actual bandwidth output from the queue buffer S, and it is sufficient that each ratio corresponds to Bs. Strictly speaking, the terms in (Equation 2) must be equal (connected by “=”), but they are not equal at a finite time t because the packet length is variable. Expressing (Equation 2) in the form of a ratio,
[Equation 3]
It becomes. Here, since the time t is common, it is deleted. And the terms in Σ of each term, 11 P 1 / B 11 , 11 P 2 / B 11 , 11 P Three / B 11 , ..., 11 P n / B 11 Is exactly “the first packet length of the
[0091]
Next, with reference to FIG. 8, the operation in which the weighting priority control apparatus according to the second embodiment of the present invention outputs a packet based on the second algorithm will be described.
[0092]
In FIG. 8A, the
[0093]
In the
[0094]
Here, the threshold value predetermined for the
[0095]
Here, as shown in FIG. 8B, it is assumed that a packet C4 having a packet length “1” and a packet C5 having a packet length “3” are stored in the
[0096]
Since the excess information is notified from the
[0097]
The multiplexing
[0098]
As shown in FIG. 8B, the count value of the
[0099]
Since the packet C3 of the
[0100]
Here, it is assumed that a packet A4 having a packet length “2” and a packet A5 having a packet length “3” are accumulated in the queue buffer 11 (see FIG. 8C). The total packet length of the packets A2 to A5 stored in the
[0101]
Since the excess information is notified from the
[0102]
The multiplexing
[0103]
As shown in FIG. 8C, the count value of the
[0104]
Since the packet A2 of the
[0105]
As shown in FIG. 8 (d), the packet A2 of the
[0106]
The
[0107]
Thereafter, the
[0108]
As described above, in the second embodiment, in order to guarantee a certain percentage of bandwidth for data stored in a plurality of queue buffers, a plurality of weights are determined based on priorities based on predetermined weight values. A first algorithm for selecting a queue buffer for reading data by determining priority of the queue buffer, and a second algorithm for selecting a queue buffer for reading data by a second algorithm different from the first algorithm If the queue buffers selected by these two algorithms are different, data is output with priority given to the queue buffer selected by the second algorithm. At this time, since the priority of the priority queue buffer is lowered, even when priority is given to the queue buffer selected by the second algorithm, the accuracy of the bandwidth guarantee of the first algorithm can be maintained. it can.
[0109]
Note that the limit on how many negative values are allowed as handling when the value of the count value register becomes a negative number greatly affects the feasibility. This limit is determined by a value (in this case, 100) multiplied to convert the reciprocal of the weight to an integer and a value normalized as the packet length (in this case, from 1 to a maximum of 4). Although it depends on the performance required for the system, it is reasonable to be able to borrow the maximum length of packets, from several to tens of packets. Of course, the depth of the queue buffer implemented as a resource is also a factor that determines this value. In this case, when the count value register of a certain queue buffer reaches a negative limit value, this time, it corresponds to the count value register that has reached the negative limit regardless of the request of the
[0110]
In the first and second embodiments, the bandwidth control is described as the first algorithm and the control based on the data length held in the queue buffer is described as the second algorithm. However, the present invention is not limited to this. The present invention can be applied in an environment where there are a plurality of priority control processes from which data is to be read and these priority control processes may collide.
[0111]
【The invention's effect】
As described above, the priority value of a plurality of queue buffers is set based on the priority calculated each time data is read from each queue buffer, with the weighting value assigned to each
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a weighting priority control apparatus that operates based on a weighting priority control method according to
FIG. 2 is a diagram for explaining the operation of the weighting priority control apparatus shown in FIG. 1;
FIG. 3 is a diagram for explaining the operation of the weighted priority control apparatus shown in FIG. 1;
FIG. 4 is a diagram for explaining the operation of the weighted priority control apparatus shown in FIG. 1;
FIG. 5 is a diagram for explaining the operation of the weighting priority control apparatus shown in FIG. 1;
FIG. 6 is a block diagram showing a configuration of a weighting priority control apparatus that operates based on the weighting priority control method according to the second embodiment of the present invention.
7 is a diagram for explaining the operation of the weighted priority control apparatus shown in FIG. 6;
FIG. 8 is a diagram for explaining the operation of the weighted priority control apparatus shown in FIG. 6;
[Explanation of symbols]
11, 12, 13 Queue buffer, 20 Multiplexing unit, 30 Queue control unit, 31, 32, 33 Counter, 34 Queue monitoring unit, 35, 35a Queue selection unit, 36, 36a Weighting operation unit, 37, 38, 39 Count value register, 40 lines.
Claims (10)
前記重み付けの値を初期値とし、各キュー・バッファからのデータ読み出しの度に算出される優先度に基づき前記複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファを選択することにより、前記データの帯域を保証する第1のアルゴリズムと、この第1のアルゴリズムとは異なる処理によってデータを読み出すキュー・バッファを選択する第2のアルゴリズムとを有し、前記第1および第2のアルゴリズムによって選択されたキュー・バッファが異なる場合には、所定の条件が成立する以外の場合前記第2のアルゴリズムによって選択されたキュー・バッファを優先するとともに、前記優先するキュー・バッファ以外のすべてのキュー・バッファの第1のアルゴリズムにおける優先度を上げる処理を行う事を特徴とする重み付け優先制御方法。A weighted priority control method for guaranteeing the bandwidth of the data by reading data stored in a plurality of queue buffers from each queue buffer at a ratio of a weight value assigned to each of the plurality of queue buffers. And
A queue that reads the data according to the determined priorities, determining the priorities of the plurality of queue buffers based on the priorities calculated each time data is read from each queue buffer, with the weighting value as an initial value. A first algorithm that guarantees a bandwidth of the data by selecting a buffer; and a second algorithm that selects a queue buffer that reads data by processing different from the first algorithm, and When the queue buffers selected by the first algorithm and the second algorithm are different, the queue buffer selected by the second algorithm is prioritized unless the predetermined condition is satisfied, and the priority queue buffer is selected. Priorities in the first algorithm for all queue buffers other than buffers Weighted priority control method comprising performing the process of increasing.
前記複数のキュー・バッファに蓄積されている複数のデータの合計パケット長が所定の値を超えた場合、該合計パケット長が所定の値を超えたキュー・バッファを選択することを特徴とする請求項1〜4の何れか一つに記載の重み付け優先制御方法。The second algorithm is:
When the total packet length of a plurality of data stored in the plurality of queue buffers exceeds a predetermined value, a queue buffer having the total packet length exceeding a predetermined value is selected. Item 5. The weighting priority control method according to any one of Items 1 to 4.
前記各キュー・バッファに蓄積されている先頭データと重み付けの値に基づいて算出した優先度に基づき前記複数のキュー・バッファの優先順位を決定し、決定した優先順位に従ってデータを読み出すキュー・バッファを選択することにより、前記データの帯域を保証する第1のアルゴリズムと、この第1のアルゴリズムとは異なる処理によってデータを読み出すキュー・バッファを選択する第2のアルゴリズムとを有し、前記第1および第2のアルゴリズムによって選択されたキュー・バッファが異なる場合には、所定の条件が成立する以外の場合前記第2のアルゴリズムによって選択されたキュー・バッファを優先するとともに、前記優先するキュー・バッファの第1のアルゴリズムにおける優先度を下げる処理を行う重み付け優先制御方法。A weighted priority control method for guaranteeing the bandwidth of the data by reading data stored in a plurality of queue buffers from each queue buffer at a ratio of a weight value assigned to each of the plurality of queue buffers. And
A queue buffer for determining the priority of the plurality of queue buffers based on the priority calculated based on the head data stored in each of the queue buffers and a weighting value, and reading the data according to the determined priority; A first algorithm that guarantees the bandwidth of the data by selecting, and a second algorithm that selects a queue buffer from which data is read by a process different from the first algorithm, and When the queue buffer selected by the second algorithm is different, the queue buffer selected by the second algorithm is prioritized unless a predetermined condition is satisfied, and the priority queue buffer is selected. Weighting priority control for performing processing for lowering priority in the first algorithm Law.
前記複数のキュー・バッファに蓄積されている複数のデータの合計パケット長が所定の値を超えた場合、該合計パケット長が所定の値を超えたキュー・バッファを選択することを特徴とする請求項7または8に記載の重み付け優先制御方法。The second algorithm is:
When the total packet length of a plurality of data stored in the plurality of queue buffers exceeds a predetermined value, a queue buffer having the total packet length exceeding a predetermined value is selected. Item 9. The weighting priority control method according to Item 7 or 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003194998A JP4118757B2 (en) | 2003-07-10 | 2003-07-10 | Weighted priority control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003194998A JP4118757B2 (en) | 2003-07-10 | 2003-07-10 | Weighted priority control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005033408A JP2005033408A (en) | 2005-02-03 |
JP4118757B2 true JP4118757B2 (en) | 2008-07-16 |
Family
ID=34205972
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003194998A Expired - Fee Related JP4118757B2 (en) | 2003-07-10 | 2003-07-10 | Weighted priority control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4118757B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060239194A1 (en) * | 2005-04-20 | 2006-10-26 | Chapell Christopher L | Monitoring a queue for a communication link |
WO2007072538A1 (en) * | 2005-12-19 | 2007-06-28 | Fujitsu Limited | Queue scheduling device, queue scheduling method and information relay device |
JP4659657B2 (en) * | 2006-03-28 | 2011-03-30 | 富士通株式会社 | Frame multiplexer |
JP5297337B2 (en) * | 2009-10-27 | 2013-09-25 | 本田技研工業株式会社 | Service processing system and service processing method |
JP6036310B2 (en) | 2013-01-09 | 2016-11-30 | 富士通株式会社 | Packet switching apparatus, transmission apparatus, and packet scheduling method |
JP2014187421A (en) | 2013-03-21 | 2014-10-02 | Fujitsu Ltd | Communication device and packet scheduling method |
WO2020182949A1 (en) * | 2019-03-12 | 2020-09-17 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Transmitter and receiver, serializer and deserializer and methods for transmitting and receiving, serializing and deserializing |
-
2003
- 2003-07-10 JP JP2003194998A patent/JP4118757B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005033408A (en) | 2005-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU750787B2 (en) | Arbitration method and apparatus for a non-blocking switch | |
JP4879382B2 (en) | Packet switch, scheduling device, discard control circuit, multicast control circuit, and QoS control device | |
US6654343B1 (en) | Method and system for switch fabric flow control | |
EP1810466B1 (en) | Directional and priority based flow control between nodes | |
US7158528B2 (en) | Scheduler for a packet routing and switching system | |
WO2002062013A2 (en) | Methods and systems providing fair queuing and priority scheduling to enhance quality of service in a network | |
JPH0983547A (en) | Packet scheduling device | |
EP1262085A1 (en) | Packet switching | |
US7164687B2 (en) | Queue control method and relay apparatus using the method | |
WO2014102665A1 (en) | Low pass filter for hierarchical pipelined distributed scheduling traffic manager | |
EP3334101B1 (en) | Load balancing eligible packets in response to a policing drop decision | |
Zhang et al. | Deficit round-robin scheduling for input-queued switches | |
CN111385217A (en) | Switch Fabric Packet Flow Reordering | |
US7342936B2 (en) | Method of performing deficit round-robin scheduling and structure for implementing same | |
US7095753B1 (en) | Digital network processor-based multi-protocol flow control | |
JP4118757B2 (en) | Weighted priority control method | |
JPH1168770A (en) | Scheduling system for atm switch | |
US7769026B2 (en) | Efficient sort scheme for a hierarchical scheduler | |
Schoenen et al. | Weighted arbitration algorithms with priorities for input-queued switches with 100% throughput | |
US7317730B1 (en) | Queueing architecture and load balancing for parallel packet processing in communication networks | |
WO2006091175A1 (en) | Method and apparatus for buffer management in shared memory packet processors | |
JP4447521B2 (en) | Packet scheduler and packet scheduling method | |
US7324536B1 (en) | Queue scheduling with priority and weight sharing | |
US8467401B1 (en) | Scheduling variable length packets | |
CN114945006B (en) | Determine rate-differential weighted fair output queue scheduling for network devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060615 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080417 |
|
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: 20080422 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080423 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110502 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110502 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120502 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120502 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130502 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140502 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |