Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
BufferbloatとLinux
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yutaro Hayakawa
August 08, 2021
Technology
2.4k
6
Share
BufferbloatとLinux
最近勉強したLinuxのBufferbloat対応の動向まとめ
Yutaro Hayakawa
August 08, 2021
More Decks by Yutaro Hayakawa
See All by Yutaro Hayakawa
Ciliumはどうテストされているのか
yutarohayakawa
1
310
How is Cilium Tested?
yutarohayakawa
6
610
eBPFのこれまでとこれから
yutarohayakawa
32
8.1k
NetKit Device
yutarohayakawa
6
2k
eBPFは何が嬉しいのか?
yutarohayakawa
3
2.2k
Prism: Proxies without the Pain
yutarohayakawa
0
330
ipftrace: A Linux Function Tracer for Network People
yutarohayakawa
4
6k
きっと明日から役立つeBPFのしくみ
yutarohayakawa
10
4.7k
eBPFをFreeBSDにポーティングしようとしている話
yutarohayakawa
4
3.3k
Other Decks in Technology
See All in Technology
Datadog 認定試験の概要と対策
uechishingo
0
200
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
16
16k
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
190
Unlocking the Apps
pimterry
0
120
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development
yoshidashingo
1
270
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
170
Claude code Orchestra
ozakiomumkj
2
740
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
350
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
980
はじめてのDatadog
kairim0
0
240
OpenClawとHermesAgentでAI新入社員を作った話
takanoriyanada
0
150
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Six Lessons from altMBA
skipperchong
29
4.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
Making Projects Easy
brettharned
120
6.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
270
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
210
Transcript
BufferbloatとLinux Yutaro Hayakawa 1
Agenda LinuxカーネルのBufferbloat対策を概観する 1. Bufferbloatとは何か 2. Approach 1: Queuing (BQL, TCQ,
AQM, FQ) 3. Approach 2: BBR Congestion Control 2
Bufferbloatとは? ネットワーク装置がパケットをバッファリングしすぎることで起こる望まぬ遅延 * 現代インターネットには大きなバッファを備えた装置がそこかしこにあり過度にバッファリングをしている なぜバッファリングが必要か? 3 10G 1G 帯域の差を埋める 10G
10G 処理遅延を吸収する Forwarding待ちのキュー 処理待ちのキュー *https://www.bufferbloat.net/projects/
パケットネットワークにおけるスループットと遅延の関係 4 Send er Recei ver 10G 1G 100G 出典:
Bufferbloat: Dark Buffers in the Internet
パケットネットワークにおけるスループットと遅延の関係 5 Send er Recei ver 10G 1G 100G Bottleneck
Link 出典: Bufferbloat: Dark Buffers in the Internet
パケットネットワークにおけるスループットと遅延の関係 6 Send er Recei ver 10G 1G 100G In
flight packets => ネットワークの中に あるパケット => 「放たれた」パケット 出典: Bufferbloat: Dark Buffers in the Internet
パケットネットワークにおけるスループットと遅延の関係 7 Send er Recei ver 10G 1G 100G Bottleneck
Bandwidth でスループットは頭打ち 出典: Bufferbloat: Dark Buffers in the Internet
パケットネットワークにおけるスループットと遅延の関係 8 Send er Recei ver 10G 1G 100G キューイングによる遅延
出典: Bufferbloat: Dark Buffers in the Internet
パケットネットワークにおけるスループットと遅延の関係 9 Send er Recei ver 10G 1G 100G Bufferbloatが起きている状態
出典: Bufferbloat: Dark Buffers in the Internet
パケットネットワークにおけるスループットと遅延の関係 10 Send er Recei ver 10G 1G 100G ちょうどいいライン
出典: Bufferbloat: Dark Buffers in the Internet
TCPとbufferbloat 11 出典: Bufferbloat: Dark Buffers in the Internet 現在主流のTCP輻輳制御はロスベース
パケットロスを検出したら送信レートを下げる 現代インターネットのロスの多くはキュー溢れ (tail drop) ロスを検出した時点ではもうすでに激しい Bufferbloatが起きてしまっている 多分この辺でロスする
Active Queue Management (AQM) 12 ネットワーク装置がバッファの残量にかかわらず能動的にパケットを落とす キューを必要以上に長くしないことで遅延を減らす ロスベースの輻輳制御にパケロスを通じてレートを下げるよう促す パケットを落とさずにECNを使う場合もある 有名なもの
- Random Early Detection (RED) (1993) - Controlled Delay (CoDel) (2017) - Common Application Kept Enhanced (CAKE) (2018)
Delay Based Congestion Control 13 パケットロスではなく遅延で輻輳を検出する輻輳制御アルゴリズム データを送信してからACKが返ってくるまでの時間をRTTとして管理する Bufferbloatによる遅延の増大にちゃんと反応できることが期待できる ロスベースの輻輳制御に追い出されやすいという弱点がある 有名なもの
- Vegas (1994) - Bottleneck Bandwidth and Round trip propagation time (BBR) (2016)
LinuxにおけるBufferbloatへの対応 14 LinuxがBufferbloatの対応をすることには大きな意味がある サーバ、クライアント、ホームルータなどのベースになっているシェアの高い OSなため 輻輳制御のような全体で対応が必要なものの利用をユーザに促す効果 おもな対応 内部キューの制御 - BQL,
TSQ - AQM (fq_codel, CAKE) 輻輳制御 (BBR) トラフィックShaping / Pacing (fq, EDT, ETF)
内部キューの制御 15 Byte Queue Limits (BQL) - ドライバーキューの長さを自動調整す る TCP
Small Queues (TSQ) - TCPのソケットごとに使用できるQdisc キューの量を制限する拡張 fq, fq_codel, CAKE - TC Qdiscレイヤでlocally generated なトラフィックにAQMをする 出典: Queueing in the Linux Network Stack
fq / fq_codel 16 FQ (Fair Queuing / Flow Queueing)
CoDel (Controlled Delay AQM) FQでフローごとにキューを分離した上で CoDelでAQMして遅延を制御 ... 5tuple hash CoDel Manage Schedular Schedule Driver Queue
BBR 17 Bufferbloatを念頭において作られた Delayベースの輻輳制御 RTprop (理想的なRTT) の推定 データを送信してから ACKが帰ってくるまでの RTTを一定時間
計測した最小値 BtlBw (理想的な帯域) の推定 データ送信量と送信時刻を記録、 ACKが返ってきた際にレート を計算する これを一定時間計測して最大値を輻輳ウィンドウの計算に使う 計測したRTpropとBtlBwの積、つまり帯域遅延積をとると理想 的なinflightなデータの量がわかる 出典: Bufferbloat: Dark Buffers in the Internet RTprop BtlBw ここを探す
PacingとEarliest Departure Time 18 ウィンドウは「どれくらい」送るかの指標「どれくら いのペースで」送るかは特に標準で規定されてい ない (How much vs
How fast) Pacing 主にTCのレイヤでBpsでパケットの送信間隔を 調節する Earliest Departure Time TCPがパケットごとに出発時間を明示してそれを 元にTCレイヤでスケジューリング
出典 + 歴史のまとめ 19 Bufferbloat: Dark Buffers in the Internet
(2011) bql: Byte Queue Limits (2011) tcp: TCP Small Queues (2012) fq_codel (2012) tcp: TSO packets automatic sizing (2013) fq packet schedular / SO_MAX_PACING_RATE (2013) Bottleneck Bandwidth and Roundtrip propagation time (2016) TCP internal pacing (2017) Earliest Departure Time (2018) Scheduled packet Transmission: ETF (2018) CAKE (2018) Linuxのキューイングに関する素晴らしいまとめ Queueing in the Linux Network Stack Bufferbloatに関する技術や動向をまとめたサイト https://www.bufferbloat.net/projects/ CoDelのRFC https://datatracker.ietf.org/doc/html/rfc8289 fq_codelのRFC https://datatracker.ietf.org/doc/html/rfc8290 主にTCP周りの活動のまとめ https://legacy.netdevconf.info/1.2/papers/bbr-netdev-1.2.new.ne w.pdf
End of Slide 20