BBR (Bottleneck Bandwidth and RTT) เป็น Congestion Control Algorithm ที่ใหม่กว่า เขียนโดย Software Engineers ที่ Google มันเป็นโซลูชันล่าสุดจากความพยายามต่อเนื่องของ Google เพื่อทำให้ Internet เร็วขึ้นผ่าน TCP Protocol - กรรมกรหลักของ Internet
เป้าหมายหลักของ BBR คือเพิ่ม Network Utilization และลด Queues (ที่ทำให้ Network ช้า) ควร Deploy บน Servers แต่ไม่ใช่ใน Network หรือ Client Side ใน Linux BBR ถูก Implement ใน Kernel Version 4.9 หรือสูงกว่า
ในบทความนี้ เราจะอธิบาย TCP BBR ให้เข้าใจคร่าวๆ แล้วจึงแสดงวิธีเพิ่มความเร็ว Internet ของ Linux Server โดยใช้ TCP BBR Congestion Control ใน Linux
ข้อกำหนด
คุณควรมี Linux Kernel Version 4.9 หรือสูงกว่า ติดตั้งแล้ว คอมไพล์กับ Options เหล่านี้ (ไม่ว่าจะเป็น Module หรือ Built-in):
- CONFIG_TCP_CONG_BBR
- CONFIG_NET_SCH_FQ
- CONFIG_NET_SCH_FQ_CODEL
วิธีตรวจสอบ Kernel Modules ใน Linux
เพื่อตรวจสอบว่า Options ข้างต้นถูกคอมไพล์ใน Kernel ของคุณหรือไม่ ให้รันคำสั่งเหล่านี้:
# cat /boot/config-$(uname -r) | grep 'CONFIG_TCP_CONG_BBR' # cat /boot/config-$(uname -r) | grep 'CONFIG_NET_SCH_FQ'
Check Kernel Modules
เพื่ออัปเดต Kernel ของคุณ ดูคู่มือเหล่านี้:
- How to Upgrade Kernel to Latest Version in Ubuntu
- How to Install or Upgrade to Latest Kernel Version in CentOS 7
เปิดใช้งาน TCP BBR Congestion Control ใน Linux
BBR ทำงานได้มีประสิทธิภาพกับ Pacing ดังนั้นจึงต้องใช้ร่วมกับ fq qdisc Classless Packet Scheduler สำหรับ Traffic Pacing หาข้อมูลเพิ่มเติมเกี่ยวกับ fq qdisc พิมพ์:
# man tc-fq
ด้วยความเข้าใจที่พอสมควรเกี่ยวกับ BBR คุณสามารถกำหนดค่าบน Server ของคุณได้ เปิดไฟล์ /etc/sysctl.conf ด้วย Editor ที่คุณชอบ
# vi /etc/sysctl.conf
เพิ่ม Options ด้านล่างที่ท้ายไฟล์:
net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr
Enabling TCP BBR in Linux
บันทึกและปิดไฟล์ จากนั้นนำการเปลี่ยนแปลงไปใช้ในระบบด้วยคำสั่ง sysctl:
# sysctl --system
จาก Screenshot ด้านล่าง คุณเห็น Options ถูกเพิ่มพร้อมค่าที่เหมาะสมแล้ว
Verify Kernel Parameters
ทดสอบการกำหนดค่า TCP BBR Congestion Control
หลังจากกำหนดค่าที่จำเป็นแล้ว คุณสามารถทดสอบได้ว่ามันทำงานจริง มีเครื่องมือหลายอย่างสำหรับวัด Bandwidth Speed เช่น Speedtest-CLI:
- How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool
เครื่องมืออื่นๆ รวมถึง bmon (bandwidth monitor), nload, Wget – Command Based File Downloader และ cURL ซึ่งทั้งหมดแสดง Network Bandwidth คุณสามารถใช้พวกมันสำหรับทดสอบ
BBR Github Repository: https://github.com/google/bbr
คุณอาจชอบอ่านบทความที่เกี่ยวข้องต่อไปนี้
- Setup Your Own “Speedtest Mini Server” to Test Internet Bandwidth Speed
- How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle
- How to Change Kernel Runtime Parameters in a Persistent and Non-Persistent Way
ในบทความนี้ เราแสดงวิธีเพิ่มความเร็ว Internet ของ Linux Server โดยใช้ TCP BBR Congestion Control ใน Linux ทดสอบอย่างครอบภายใต้สถานการณ์ต่างๆ และให้ Feedback สำคัญผ่าน Comment Form ด้านล่าง
Credit: Nixcraft
พัฒนาทักษะ Linux ของคุณไปสู่อีกระดับ
Root Members ได้รับการเข้าถึงเต็มรูปแบบทุก Course, Certification Prep Track และไลบรารี Hands-on Linux Content ที่เพิ่มขึ้นทุกเดือน
What You Get
Ad-free access to all premium articles
Access to all courses: Learn Linux, AI for Linux, Bash Scripting, Ubuntu Handbook, Golang และอื่นๆ
Access to Linux certifications (RHCSA, RHCE, LFCS และ LFCA)
Access new courses on release
Get access to weekly newsletter
Priority help in comments
Private Telegram community
Connect with the Linux community

Aaron Kili เป็น Linux และ F.O.S.S Enthusiast, Linux SysAdmin รุ่นใหม่, Web Developer และปัจจุบันเป็น Content Creator สำหรับ TecMint ที่รักการทำงานกับคอมพิวเตอร์ และเชื่อมั่นอย่างมากในการแบ่งปันความรู้
Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.