Last active
September 3, 2024 18:23
-
-
Save mizhka/ba21fcba43974de61930275803e438eb to your computer and use it in GitHub Desktop.
Ansible playbook for MaxPerformance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: tune operating system | |
hosts: all | |
become: true | |
vars: | |
sysctl_settings: | |
- { key: 'vm.swappiness', value: '3'} | |
- { key: 'kernel.sched_autogroup_enabled', value: '0'} | |
- { key: 'kernel.sched_migration_cost_n', value: '50000000'} | |
pkgs: | |
- cpufrequtils | |
- linux-cpupower | |
tasks: | |
- name: set sysctl parameters | |
ansible.posix.sysctl: | |
name: "{{ item.key }}" | |
value: "{{ item.value }}" | |
state: present | |
loop: "{{ sysctl_settings }}" | |
- name: install packages | |
ansible.builtin.package: | |
name: "{{ pkgs }}" | |
state: latest | |
- name: set governor to performance | |
ansible.builtin.copy: | |
content: 'GOVERNOR="performance"' | |
dest: /etc/default/cpufrequtils | |
- name: patch grub | |
hosts: all | |
become: true | |
roles: | |
- role: robertdebock.grub | |
grub_options: | |
- option: intel_pstate | |
value: enable | |
- option: processor.max_cstate | |
value: 1 | |
- option: intel_idle.max_cstate | |
value: 1 | |
- option: cgroup.memory | |
value: nokmem | |
- option: hugepagesz | |
value: 1G | |
- option: default_hugepagesz | |
value: 1G | |
- option: transparent_hugepages | |
value: never |
опечтка в 38-й строке
- option: intel_idle.max_cstateы
Спасибо, поправил!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
опечтка в 38-й строке
- option: intel_idle.max_cstateы