diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks')
3 files changed, 37 insertions, 60 deletions
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 3c22892483..feef2ca3a6 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 @@ -17,33 +17,28 @@ tags: - perf-inst-prerequisites -- name: Distribution - release - machine optimizations - include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' - tags: - - machine-optimizations - -- name: Configure {{ ansible_machine }} Kernel Parameters +- name: Conf - Kernel Parameters lineinfile: path: "/etc/default/grub" state: "present" regexp: "^GRUB_CMDLINE_LINUX=" - line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\"" + line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value is sameas true %}{{key}} {% else %}{{key}}={{value}} {% endif %}{% endfor %}\"" notify: - "Update GRUB" tags: - - set-grub + - perf-conf-grub - meta: flush_handlers -- name: Turbo Boost +- name: Conf - Turbo Boost import_tasks: turbo_boost.yaml when: > cpu_microarchitecture == "skylake" or cpu_microarchitecture == "cascadelake" tags: - - turbo-boost + - perf-conf-turbo-boost -- name: Adjust nr_hugepages +- name: Conf - Adjust nr_hugepages # change the minimum size of the hugepage pool. # 2G VPP, 4GB per VNF/CNF, 2G reserve sysctl: @@ -53,9 +48,9 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Adjust max_map_count +- name: Conf - Adjust max_map_count # this file contains the maximum number of memory map areas a process # may have. memory map areas are used as a side-effect of calling # malloc, directly by mmap and mprotect, and also when loading shared @@ -72,9 +67,9 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Adjust hugetlb_shm_group +- name: Conf - Adjust hugetlb_shm_group # hugetlb_shm_group contains group id that is allowed to create sysv # shared memory segment using hugetlb page. sysctl: @@ -84,9 +79,9 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Adjust swappiness +- name: Conf - Adjust swappiness # this control is used to define how aggressive the kernel will swap # memory pages. higher values will increase agressiveness, lower values # decrease the amount of swap. a value of 0 instructs the kernel not to @@ -99,9 +94,9 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Adjust shmmax +- name: Conf - Adjust shmmax # shared memory max must be greator or equal to the total size of hugepages. # for 2mb pages, totalhugepagesize = vm.nr_hugepages * 2 * 1024 * 1024 # if the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax) @@ -114,9 +109,9 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Adjust watchdog_cpumask +- name: Conf - Adjust watchdog_cpumask # this value can be used to control on which cpus the watchdog may run. # the default cpumask is all possible cores, but if no_hz_full is # enabled in the kernel config, and cores are specified with the @@ -134,9 +129,9 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Adjust randomize_va_space +- name: Conf - Adjust randomize_va_space # this option can be used to select the type of process address # space randomization that is used in the system, for architectures # that support this feature. @@ -150,38 +145,38 @@ sysctl_file: "/etc/sysctl.d/90-csit.conf" reload: "yes" tags: - - set-sysctl + - perf-conf-sysctl -- name: Copy Cpufrequtils File +- name: Conf - Cpufrequtils copy: src: "files/cpufrequtils" dest: "/etc/default/cpufrequtils" owner: "root" group: "root" - mode: "0644" + mode: 0644 tags: - - copy-cpufrequtils + - perf-conf-cpufrequtils -- name: Copy Irqbalance File +- name: Conf - Irqbalance template: src: "files/irqbalance" dest: "/etc/default/irqbalance" owner: "root" group: "root" - mode: "0644" + mode: 0644 notify: - "Update GRUB" tags: - - copy-irqbalance + - perf-conf-irqbalance -- name: Set Ondemand Service To Disable +- name: Conf - Set Ondemand Service To Disable service: name: "ondemand" enabled: "no" tags: - - set-ondemand + - perf-conf-ondemand -- name: Load Kernel Modules By Default +- name: Conf - Load Kernel Modules By Default lineinfile: path: "/etc/modules" state: "present" @@ -189,6 +184,6 @@ with_items: - "vfio-pci" tags: - - load-kernel-modules + - perf-conf-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 11f0e326d9..7f69365a2d 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 @@ -10,7 +10,7 @@ tags: - turbo-inst-prerequisites -- name: Install msr-tools +- name: Inst - msr-tools package: name: - "msr-tools" @@ -18,27 +18,27 @@ tags: - turbo-inst-prerequisites -- name: Load msr By Default +- name: Conf - Load msr By Default lineinfile: path: "/etc/modules" state: "present" line: "msr" tags: - - turbo-boost + - turbo-conf-msr -- name: Custom Startup Service Hook +- name: Conf - 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" + mode: 0644 tags: - - turbo-boost + - turbo-conf-msr -- name: Custom Startup Service Hook Enable +- name: Conf - Custom Startup Service Hook Enable service: name: "disable-turbo-boost" enabled: yes tags: - - turbo-boost + - turbo-conf-msr 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 273ad53f25..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# file: roles/performance_tuning/tasks/ubuntu_bionic.yaml - -- name: Ubuntu Bionic - Mount /tmp as tmpfs I - copy: - src: "/usr/share/systemd/tmp.mount" - dest: "/etc/systemd/system/tmp.mount" - remote_src: yes - tags: - - machine-optimizations - -- name: Ubuntu Bionic - Mount /tmp as tmpfs II - systemd: - name: "tmp.mount" - daemon_reload: yes - enabled: yes - tags: - - machine-optimizations |