TCP-Staukontrolle feinabstimmen
Verstehen und optimieren Sie Linux-TCP-Staukontrollalgorithmen wie CUBIC und BBR, um Durchsatz und Latenz in realen Netzwerken zu verbessern.
TCP-Staukontrolle feinabstimmen ist eine kostenlose Linux Networking & TCP/IP for Developers-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Linux Networking & TCP/IP for Developers-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Linux Networking & TCP/IP for Developers-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
What Congestion Control Does
TCP congestion control decides how fast a sender may transmit without overwhelming the network.
It governs the trade-off between throughput and latency, and the right algorithm can dramatically change performance.
The Congestion Window
The congestion window (cwnd) limits how many unacknowledged bytes are in flight. Algorithms grow and shrink cwnd in response to ACKs and loss signals.
Too small wastes bandwidth; too large causes loss and bufferbloat.
Loss-Based vs Latency-Based
Two families exist:
- Loss-based (CUBIC, Reno) grow until packets drop
- Latency/model-based (BBR) estimate bandwidth and RTT to avoid filling buffers
BBR often wins on long-distance, lossy links.
Listing Available Algorithms
See which algorithms the kernel has loaded.
sysctl net.ipv4.tcp_available_congestion_controlChecking the Current Algorithm
CUBIC is the Linux default. Confirm what is active.
sysctl net.ipv4.tcp_congestion_controlEnabling BBR
Load the BBR module, then set it as the default. BBR pairs best with the fq queue discipline.
sudo modprobe tcp_bbr
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr
sudo sysctl -w net.core.default_qdisc=fqMaking Changes Persistent
Runtime sysctl changes are lost on reboot. Persist them in /etc/sysctl.d/.
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbrTuning Buffer Sizes
Congestion control can only fill a window the buffers allow. For high bandwidth-delay-product paths, raise the autotuning maximums.
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216The Bandwidth-Delay Product
Optimal window size = bandwidth x round-trip time. A 1 Gbps link with 100 ms RTT needs about 12.5 MB of buffer to stay full.
Undersized buffers cap throughput regardless of the algorithm.
Observing Connections
Inspect live socket state, cwnd, and RTT with ss to confirm tuning is taking effect.
ss -tinMeasuring the Impact
Benchmark before and after with a tool like iperf3 across a real path. Always measure both throughput and latency, since aggressive tuning can trade one for the other.
iperf3 -c remote-host -t 30Quick Check
Test your congestion control knowledge.
Recap
You can now tune TCP congestion control:
- Understand cwnd and the bandwidth-delay product
- Compare loss-based (CUBIC) vs model-based (BBR)
- Enable BBR with the
fqqdisc and persist it - Size
tcp_rmem/tcp_wmembuffers correctly - Verify with
ss -tinand benchmark withiperf3
This extends your kernel parameter and benchmarking lessons.
Lerne Linux Networking & TCP/IP for Developers mit einem KI-Tutor — kostenlos
Schreibe und führe echten Code in deinem Browser aus, bekomme sofortige Hilfe von einem 24/7 KI-Tutor und setze dein Lernen im Web oder in der App fort.
- Kurse
- 12
- Lektionen
- 48
Häufig gestellte Fragen
Ist die Lektion „TCP-Staukontrolle feinabstimmen“ kostenlos?
Ja — der vollständige Text von „TCP-Staukontrolle feinabstimmen“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Linux Networking & TCP/IP for Developers-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Linux Networking & TCP/IP for Developers-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „TCP-Staukontrolle feinabstimmen“?
Verstehen und optimieren Sie Linux-TCP-Staukontrollalgorithmen wie CUBIC und BBR, um Durchsatz und Latenz in realen Netzwerken zu verbessern. Du übst Linux Networking & TCP/IP for Developers mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Linux Networking & TCP/IP for Developers zu starten?
Keine Vorkenntnisse erforderlich. Linux Networking & TCP/IP for Developers auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.
Wie lange dauert die Lektion „TCP-Staukontrolle feinabstimmen“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Linux Networking & TCP/IP for Developers-Lektion Code schreiben und ausführen?
Ja. Jede Linux Networking & TCP/IP for Developers-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Netzwerkparameter des Kernels
- NIC-Tuning und -Optimierung
- Netzwerkdurchsatz benchmarken
- TCP-Staukontrolle feinabstimmen