fix(ansible): ICX rules
[csit.git] / fdio.infra.ansible / roles / performance_tuning / tasks / main.yaml
index e9cdd0d..e3e22d0 100644 (file)
@@ -3,7 +3,7 @@
 
 - name: Inst - Update Package Cache (APT)
   apt:
-    update_cache: yes
+    update_cache: true
     cache_valid_time: 3600
   when:
     - ansible_distribution|lower == 'ubuntu'
   import_tasks: turbo_boost.yaml
   when: >
     cpu_microarchitecture == "skylake" or
-    cpu_microarchitecture == "cascadelake"
+    cpu_microarchitecture == "cascadelake" or
+    cpu_microarchitecture == "icelake"
   tags:
     - perf-conf-turbo-boost
 
-- name: Conf - Adjust nr_hugepages
-  # change the minimum size of the hugepage pool.
-  # 2G VPP, 4GB per VNF/CNF, 2G reserve
-  sysctl:
-    name: "vm.nr_hugepages"
-    value: "{{ sysctl.vm.nr_hugepages  }}"
-    state: "present"
-    sysctl_file: "/etc/sysctl.d/90-csit.conf"
-    reload: "yes"
-  tags:
-    - perf-conf-sysctl
-
 - 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
   tags:
     - perf-conf-load-kernel-modules
 
-- meta: flush_handlers
\ No newline at end of file
+- name: Conf - Create a directory for 1G HugeTLBs hugepages
+  file:
+    path: "/dev/hugepages1G"
+    state: "directory"
+    mode: 0755
+  tags:
+    - perf-conf-hugepages-1g
+
+- name: Conf - Mount 1G HugeTLBs hugepages
+  mount:
+    path: "/dev/hugepages1G"
+    src: "hugetlbfs"
+    opts: "pagesize=1G"
+    boot: false
+    state: "mounted"
+    fstype: "hugetlbfs"
+  tags:
+    - perf-conf-hugepages-1g
+
+- name: Create a directory if it does not exist
+  file:
+    path: "/dev/hugepages2M"
+    state: "directory"
+    mode: 0755
+  tags:
+    - perf-conf-hugepages-2m
+
+- name: Conf - Create a directory for 2M HugeTLBs hugepages
+  mount:
+    path: "/dev/hugepages2M"
+    src: "hugetlbfs"
+    opts: "pagesize=2M"
+    boot: false
+    state: "mounted"
+    fstype: "hugetlbfs"
+  tags:
+    - perf-conf-hugepages-2m
+
+- meta: flush_handlers