perf(metal): tune some kernel params for Kubernetes

The default values are too low, you may get an error in some cases
after a while (like viewing logs)
This commit is contained in:
Khue Doan 2024-01-18 17:31:23 +07:00
parent e1c276e403
commit 376f0e1b92
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,7 @@
- name: Create Kubernetes cluster
hosts: metal
roles:
- prerequisites
- k3s
- automatic_upgrade

View File

@ -0,0 +1,8 @@
- name: Adjust kernel parameters
ansible.posix.sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
loop:
- {name: "fs.inotify.max_queued_events", value: 16384}
- {name: "fs.inotify.max_user_instances", value: 8192}
- {name: "fs.inotify.max_user_watches", value: 524288}