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

Both sides previous revisionPrevious revision
os:linux:kernel-tuning [2021-04-25 00:10] – [BBR Network Congestion Algorithm] Manuel Freios:linux:kernel-tuning [2021-04-26 00:28] (current) Manuel Frei
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]]   * [[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
 +
 +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.txt · Last modified: 2021-04-26 00:28 by Manuel Frei