This commit is contained in:
Sascha 2026-03-03 21:45:41 +01:00
commit b6dafc7a73
9 changed files with 391 additions and 0 deletions

41
sysctl.yaml Normal file
View file

@ -0,0 +1,41 @@
---
- name: Sysctl Tuning fuer Emby
hosts: all
become: true
tasks:
- name: BBR Kernel Modul laden
ansible.builtin.modprobe:
name: tcp_bbr
state: present
- name: BBR Modul beim Boot laden
ansible.builtin.copy:
content: "tcp_bbr\n"
dest: /etc/modules-load.d/bbr.conf
mode: "0644"
- name: Sysctl Parameter setzen
ansible.posix.sysctl:
name: "{{ item.key }}"
value: "{{ item.value }}"
sysctl_file: /etc/sysctl.d/99-net-tuning.conf
reload: true
state: present
loop:
- { key: net.core.rmem_default, value: "262144" }
- { key: net.core.wmem_default, value: "262144" }
- { key: net.core.rmem_max, value: "67108864" }
- { key: net.core.wmem_max, value: "67108864" }
- { key: net.ipv4.tcp_rmem, value: "4096 87380 67108864" }
- { key: net.ipv4.tcp_wmem, value: "4096 65536 67108864" }
- { key: net.ipv4.tcp_window_scaling, value: "1" }
- { key: net.ipv4.tcp_congestion_control, value: "bbr" }
- { key: net.ipv4.tcp_slow_start_after_idle, value: "0" }
- { key: net.ipv4.tcp_fastopen, value: "3" }
- { key: net.core.netdev_max_backlog, value: "16384" }
# RAM ist reichlich vorhanden, Transcoding auf tmpfs
- { key: vm.swappiness, value: "1" }
- { key: vm.dirty_ratio, value: "15" }
- { key: vm.dirty_background_ratio, value: "5" }