Linux Networking & TCP/IP for Developers · Pelajaran

Penyetelan Kontrol Kemacetan TCP

Pahami dan setel algoritme kontrol kemacetan TCP Linux seperti CUBIC dan BBR untuk meningkatkan throughput serta latensi pada jaringan nyata.

Pelajaran 4 dari 413 langkah

Penyetelan Kontrol Kemacetan TCP adalah pelajaran Linux Networking & TCP/IP for Developers gratis di CoddyKit. Ini adalah pelajaran 4 dari 4. Kamu bisa membaca pelajaran lengkapnya di bawah secara gratis — lalu praktikkan langsung di browser dengan editor kode bawaan dan tutor AI 24/7. Ini adalah bagian dari jalur belajar Linux Networking & TCP/IP for Developers, dan progresmu tersinkronisasi di web dan aplikasi CoddyKit. Kursus Linux Networking & TCP/IP for Developers mencakup 4 pelajaran total.

Bagian dari pelajaran ini belum diterjemahkan dan ditampilkan dalam bahasa Inggris.

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_control

Checking the Current Algorithm

CUBIC is the Linux default. Confirm what is active.

sysctl net.ipv4.tcp_congestion_control

Enabling 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=fq

Making 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=bbr

Tuning 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 16777216

The 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 -tin

Measuring 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 30

Quick 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 fq qdisc and persist it
  • Size tcp_rmem/tcp_wmem buffers correctly
  • Verify with ss -tin and benchmark with iperf3

This extends your kernel parameter and benchmarking lessons.

Gratis untuk memulai

Belajar Linux Networking & TCP/IP for Developers dengan tutor AI — gratis

Tulis dan jalankan kode asli di browser kamu, dapatkan bantuan instan dari tutor AI 24/7, dan lanjutkan di mana kamu tinggalkan di web atau aplikasi.

Kursus
12
Pelajaran
48

Pertanyaan yang Sering Diajukan

Apakah pelajaran “Penyetelan Kontrol Kemacetan TCP” gratis?

Ya — teks lengkap “Penyetelan Kontrol Kemacetan TCP” gratis dibaca di sini di web. Untuk praktiknya secara interaktif (editor kode bawaan dan tutor AI 24/7) dan buka sisa kursus Linux Networking & TCP/IP for Developers, upgrade ke CoddyKit PRO. Kursus Linux Networking & TCP/IP for Developers mencakup 4 pelajaran total.

Apa yang akan aku pelajari di “Penyetelan Kontrol Kemacetan TCP”?

Pahami dan setel algoritme kontrol kemacetan TCP Linux seperti CUBIC dan BBR untuk meningkatkan throughput serta latensi pada jaringan nyata. Kamu berlatih Linux Networking & TCP/IP for Developers dengan kode praktik yang langsung kamu jalankan di browser, dan tutor AI 24/7 menjawab pertanyaanmu saat kamu mengerjakan pelajaran ini.

Apakah aku perlu pengalaman untuk memulai Linux Networking & TCP/IP for Developers?

Tidak diperlukan pengalaman sebelumnya. Linux Networking & TCP/IP for Developers di CoddyKit dirancang untuk pemula hingga pelajar tingkat lanjut, jadi kamu bisa memulai di sini atau dari awal dan belajar sesuai kecepatan kamu sendiri. Ini adalah pelajaran 4 dari 4.

Berapa lama pelajaran “Penyetelan Kontrol Kemacetan TCP” memakan waktu?

Sebagian besar pelajaran CoddyKit memakan waktu sekitar 5–10 menit. Setiap pelajaran ringkas dan interaktif, jadi kamu membuat kemajuan stabil dan melanjutkan dari tempat kamu tinggalkan di web dan aplikasi.

Bisakah aku menulis dan menjalankan kode dalam pelajaran Linux Networking & TCP/IP for Developers ini?

Ya. Setiap pelajaran Linux Networking & TCP/IP for Developers menyertakan editor kode bawaan, jadi kamu menulis dan menjalankan kode nyata langsung di browser dan mendapatkan umpan balik AI instan — tidak diperlukan penyiapan lokal.

Semua pelajaran dalam kursus ini

  1. Parameter Jaringan Kernel
  2. Penyetelan dan Pengoptimalan NIC
  3. Menguji Keluaran Jaringan
  4. Penyetelan Kontrol Kemacetan TCP
← Kembali ke Linux Networking & TCP/IP for Developers