blob: 77b26831248b84ef3c6be25215c1faaeb9035f98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
---
# file: roles/performance_tuning/tasks/main.yaml
- name: Performance Tuning - Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
update_cache: true
tags:
- install-dependencies
- name: Performance Tuning - Configure {{ ansible_machine }} kernel parameters
lineinfile:
path: "/etc/default/grub"
state: "present"
regexp: "^GRUB_CMDLINE_LINUX="
line: {{ grub_cmdline_linux[ansible_machine] }}
notify:
- "Update GRUB"
- "Reboot server"
tags:
- set-grub
- name: Performance Tuning - Turbo boost
import_tasks: turbo_boost.yaml
when: >
cpu_microarchitecture == "skylake" or
cpu_microarchitecture == "cascadelake"
tags:
- turbo-boost
- name: Performance Tuning - Copy CSIT sysctl file
template:
src: "files/90-csit"
dest: "/etc/sysctl.d/90-csit.conf"
owner: "root"
group: "root"
mode: "0644"
tags:
- copy-90-csit
- name: Performance Tuning - Copy cpufrequtils file
copy:
src: "files/cpufrequtils"
dest: "/etc/default/cpufrequtils"
owner: "root"
group: "root"
mode: "0644"
tags:
- copy-cpufrequtils
- name: Performance Tuning - Set ondemand service to disable
service:
name: "ondemand"
enabled: "no"
tags:
- set-ondemand
- name: Performance Tuning - Load kernel modules by default
lineinfile:
path: "/etc/modules"
state: "present"
line: "{{ item }}"
with_items:
- "vfio-pci"
tags:
- load-kernel-modules
- meta: flush_handlers
|