Last active
June 17, 2018 15:32
-
-
Save genkiFurukawa/81770866e40c6bd693283c1061fd7e84 to your computer and use it in GitHub Desktop.
delayed-ACKとNagle's algorithmの問題メモ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://billysumida.cocolog-nifty.com/blog/2007/02/post-3449.html | |
== | |
Nagleアルゴリズムは以下の条件がどれか1つでも成立するまで送信を遅延させる。 | |
・未送信データが最大セグメントサイズ以上になる | |
・過去の送信パケットで ACK が未受信の物がなくなる(TCP遅延ACKに注意) | |
・タイムアウトになる | |
擬似コードでは以下の通り: | |
if 新しいデータを送信するとき | |
if ウィンドウサイズ >= 最大セグメントサイズ(MSS) and 送信データ >= 最大セグメントサイズ | |
最大セグメントサイズ分を即座に全て送信 | |
else | |
if ACK を受け取っていないデータが残っている場合 | |
ACK を受け取る or タイムアウトになるまでバッファに貯める | |
else | |
即座に送信 | |
end if | |
end if | |
end if | |
== | |
仮定 | |
1. 送信するデータが1028 byte | |
2. デフォルトのバッファが512 byte | |
机上シミュレーション | |
1. | |
送信データが512byteを超えているため、512byteを送信。 | |
残り524byte。 | |
2. | |
送信データが512byteを超えているため、512byteを送信。 | |
残り12byte。 | |
3. | |
time-outになるまでバッファに貯める。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment