04e33cd0732e75cffc305056784c9fc42448a5b4
[noc.git] / ansible / roles / base / tasks / 06net.yml
1 ---
2 - name: Load the tcp_bbr kernel module
3   modprobe:
4     name: tcp_bbr
5
6 - name: Persist the tcp_bbr module to configuration
7   copy:
8     dest: /etc/modules-load.d/local-network.conf
9     content: tcp_bbr
10
11 - name: Set network-related sysctl options
12   sysctl:
13     sysctl_file: /etc/sysctl.d/local-network.conf
14     sysctl_set: yes
15     name: "{{ item.key }}"
16     value: "{{ item.value }}"
17
18   with_dict:
19     # CoDel (controlled delay) with Fair Queuing as the default queue scheduler
20     #  mitigates bufferbloat and helps share bandwidth equitably across flows.
21     net.core.default_qdisc: fq_codel
22
23     # BBR is currently the best TCP congestion control algorithm.
24     # C.f. https://queue.acm.org/detail.cfm?id=3022184
25     net.ipv4.tcp_congestion_control: bbr
26
27   loop_control:
28     label: "{{ item.key }}"