web-dev-qa-db-ja.com

どうすれば初期のTCP再送タイムアウトを調整できますか?

初期のTCP RTO値3sは、ほとんどのLANベースのアプリケーションには長すぎます。どのように低く調整できますか?sysctlはありますか?

14
claymation

いいえ、できません。カーネルにハードコードされています。カーネルを変更して再コンパイルしてください。

#define TCP_TIMEOUT_INIT ((unsigned)(3*HZ))     /* RFC 1122 initial RTO value   */

これは、include/net/tcp.hで取得する必要があります。

しかし、私は誰かを見ることができます パッチが提供されました 、自分で試したことがなくても

12
Marco Bizzarri

RTOはネットワークの状態に自動調整するため、初期設定は全体的なパフォーマンスに大きな影響を与えません。 RTOを変更する場合は、1秒に設定できます(ただし、それ以下にはできません)。

RFC 1122 でこれについての議論があります:

        The following values SHOULD be used to initialize the
        estimation parameters for a new connection:
        (a)  RTT = 0 seconds.

        (b)  RTO = 3 seconds.  (The smoothed variance is to be
             initialized to the value that will result in this RTO).

        The recommended upper and lower bounds on the RTO are known
        to be inadequate on large internets.  The lower bound SHOULD
        be measured in fractions of a second (to accommodate high
        speed LANs) and the upper bound should be 2*MSL, i.e., 240
        seconds.

        DISCUSSION:
             Experience has shown that these initialization values
             are reasonable, and that in any case the Karn and
             Jacobson algorithms make TCP behavior reasonably
             insensitive to the initial parameter choices.

RFC 6298 は提案された更新(2011年6月発行)であり、[〜#〜] rto [〜#〜]より低い値(ただし1秒以上)に初期化でき、適切な初期値として1秒を正当化するデータを含む付録が含まれています。

4
Jay Elston