diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks')
5 files changed, 75 insertions, 96 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/aarch64.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/aarch64.yaml deleted file mode 100644 index b5ff02a9ca..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/aarch64.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# file: roles/performance_tuning/tasks/aarch64.yaml - -- name: Configure {{ ansible_machine }} kernel parameters - lineinfile: - path: '/etc/default/grub' - state: 'present' - regexp: '^GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="isolcpus={{ grub.isolcpus }} nohz_full={{ grub.nohz_full }} rcu_nocbs={{ grub.rcu_nocbs }} intel_iommu=on nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1"' - notify: - - 'Update GRUB' - tags: set-grub diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml index 348bccbb33..77b2683124 100644 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml @@ -1,57 +1,69 @@ --- # file: roles/performance_tuning/tasks/main.yaml -- name: Install distribution - release - machine prerequisites - include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' - tags: install-csit-dependencies +- name: Performance Tuning - Install Distribution - Release - Machine Prerequisites + package: + name: "{{ packages | flatten(levels=1) }}" + state: latest + update_cache: true + tags: + - install-dependencies -- name: Machine specifics - include_tasks: '{{ ansible_machine }}.yaml' - tags: set-grub +- 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: Turbo boost +- name: Performance Tuning - Turbo boost import_tasks: turbo_boost.yaml when: > cpu_microarchitecture == "skylake" or cpu_microarchitecture == "cascadelake" - tags: turbo-boost + tags: + - turbo-boost -- name: Copy CSIT sysctl file +- 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: Copy IRQ load balancing file - copy: - src: 'files/irqbalance' - dest: '/etc/default/irqbalance' - owner: 'root' - group: 'root' - mode: '0644' - tags: copy-irq - -- name: Copy cpufrequtils file + 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: Set ondemand service to disable + 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: "ondemand" + enabled: "no" + tags: + - set-ondemand -- name: Load vfio-pci by default +- name: Performance Tuning - Load kernel modules by default lineinfile: - path: '/etc/modules' - state: 'present' - line: 'vfio-pci' - tags: load-vfio-pci + path: "/etc/modules" + state: "present" + line: "{{ item }}" + with_items: + - "vfio-pci" + tags: + - load-kernel-modules + +- meta: flush_handlers diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml index a4872091a5..f6633f5e82 100644 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml +++ b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml @@ -2,32 +2,35 @@ # file: roles/performance_tuning/tasks/turbo_boost.yaml - name: Turbo boost - Install msr-tools - apt: + package: name: - - 'msr-tools' - state: 'present' - cache_valid_time: 3600 - install_recommends: False - tags: turbo-boost + - "msr-tools" + state: latest + update_cache: true + tags: + - turbo-boost - name: Turbo boost - Load msr by default lineinfile: - path: '/etc/modules' - state: 'present' - line: 'msr' - tags: turbo-boost + path: "/etc/modules" + state: "present" + line: "msr" + tags: + - turbo-boost - name: Turbo boost - Custom startup service hook copy: - src: 'files/disable-turbo-boost.service' - dest: '/etc/systemd/system/disable-turbo-boost.service' - owner: 'root' - group: 'root' - mode: '0644' - tags: turbo-boost + src: "files/disable-turbo-boost.service" + dest: "/etc/systemd/system/disable-turbo-boost.service" + owner: "root" + group: "root" + mode: "0644" + tags: + - turbo-boost - name: Turbo boost - Custom startup service hook enable service: - name: 'disable-turbo-boost' + name: "disable-turbo-boost" enabled: yes - tags: turbo-boost + tags: + - turbo-boost diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml deleted file mode 100644 index 62b64be469..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# file: roles/performance_tuning/tasks/ubuntu_bionic.yaml - -- name: Install CSIT dependencies - apt: - name: - - 'cpufrequtils' - state: 'present' - cache_valid_time: 3600 - install_recommends: False - tags: install-csit-dependencies diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/x86_64.yaml deleted file mode 100644 index 7b66300bc4..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/x86_64.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# file: roles/performance_tuning/tasks/x86_64.yaml - -- name: Configure {{ ansible_machine }} kernel parameters - lineinfile: - path: '/etc/default/grub' - state: 'present' - regexp: '^GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="isolcpus={{ grub.isolcpus }} nohz_full={{ grub.nohz_full }} rcu_nocbs={{ grub.rcu_nocbs }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"' - notify: - - 'Update GRUB' - - 'Reboot server' - tags: set-grub |