aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-09-21 13:38:59 +0000
committerPeter Mikus <pmikus@cisco.com>2021-09-24 04:11:59 +0000
commitd5a815e56dc6a5aeb48b9bc9e063d4ecc167112d (patch)
treef19bc52ff2ae4b08ff99a2c3a7f647ecbedb2c23 /fdio.infra.ansible/roles
parent970a849d4a0ad352679485820f39573449aa5b65 (diff)
feat(Ansible): 2M and 1G hugepages
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I55720cee8236c37e21881d1d8115d357d2a1f05f
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r--fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml50
1 files changed, 38 insertions, 12 deletions
diff --git a/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml b/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml
index b123be0a3c..79fa03fcef 100644
--- a/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml
@@ -25,18 +25,6 @@
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
@@ -186,4 +174,42 @@
tags:
- perf-conf-load-kernel-modules
+- 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