User Tools

Site Tools


os:linux:kernel-tuning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
os:linux:kernel-tuning [2021-04-24 20:47] – created Manuel Freios:linux:kernel-tuning [2025-02-22 16:56] (current) Manuel Frei
Line 2: Line 2:
  
  
-===== BBR Network Congestion Algorithm =====+===== BBR Congestion Control Algorithm =====
  
 BBR is included since Linux 4.10. It won't show in net.ipv4.tcp_allowed_congestion_control or net.ipv4.tcp_available_congestion_control if the module tcp_bbr isn't loaded. This module is loaded automatically if activate bbr. BBR is included since Linux 4.10. It won't show in net.ipv4.tcp_allowed_congestion_control or net.ipv4.tcp_available_congestion_control if the module tcp_bbr isn't loaded. This module is loaded automatically if activate bbr.
Line 33: Line 33:
  
 **Links** **Links**
-  *  [[https://github.com/google/bbr|Github: BBR]]+  * [[https://github.com/google/bbr|Github: BBR]] 
 +  * [[https://cloud.google.com/blog/products/networking/tcp-bbr-congestion-control-comes-to-gcp-your-internet-just-got-faster|TCP BBR congestion control comes to GCP – your Internet just got faster]] 
 + 
 +===== FQ - Fair Queue traffic policing ===== 
 + 
 +FQ (sometimes referred to as sch_fq because of the name of its kernel module name) is a packet scheduler which was implemented by Eric Dumazet like FQ_Codel and can be configured as queueing discipline (qdisc). FQ can be used as a drop in replacement for pfifo_fast. 
 + 
 +The CoDel wiki says this: 
 +>For servers with tcp-heavy workloads, particularly at 10GigE speeds, for queue management, we recomend sch_fq instead of fq_codel as of linux 3.12. 
 +-- [[https://www.bufferbloat.net/projects/codel/wiki/|CoDel Overview]] 
 + 
 +  * fq_codel - best for routers, hypervisors and best general purpose qdisc 
 +  * fq - best for fat servers with TCP only workload at 10Gbps 
 + 
 +Activate on the current system and replace qdisc on eth0 (not recommended). 
 +<code> 
 +sysctl -w net.core.default_qdisc=fq 
 +tc qdisc replace dev eth0 root fq 
 +</code> 
 + 
 +Persistent configuration. Reboot required to activate (recommended). 
 +<code> 
 +echo "net.core.default_qdisc = fq"  > /etc/sysctl.d/90-fq.conf 
 +</code> 
 + 
 +**Links** 
 +  * man 8 tc-fq 
 +  * [[https://github.com/torvalds/linux/blob/master/net/sched/sch_fq_codel.c|sch_fq_codel.c]] 
 + 
 +===== Ephemeral Ports ===== 
 + 
 +<code> 
 +sysctl -w net.ipv4.ip_local_port_range="1024 65000" 
 +</code> 
 + 
 +Permanently set this configuration. 
 +<code> 
 +echo "net.ipv4.ip_local_port_range = 1024 65000" > /etc/sysctl.d/90-ephemeral_ports.conf 
 +</code> 
 + 
 +**Links** 
 +  * [[https://www.nginx.com/blog/tuning-nginx/|Tuning NGINX for Performance]] 
 +  * [[https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html|IP sysctl]] 
  
os/linux/kernel-tuning.1619290027.txt.gz · Last modified: 2021-04-24 20:47 by Manuel Frei