CSIT-429: Add hugepages configuration to ansible-host 45/3245/2
authorpmikus <pmikus@cisco.com>
Tue, 4 Oct 2016 12:31:25 +0000 (13:31 +0100)
committerPeter Mikus <pmikus@cisco.com>
Wed, 5 Oct 2016 04:11:02 +0000 (04:11 +0000)
- Add sysctl configuration to allocate HugePages into ansible SUT host
  section

Change-Id: Iba6e9da1d92b4ddbc04a99817e098306e68c179d
Signed-off-by: pmikus <pmikus@cisco.com>
resources/tools/testbed-setup/playbooks/01-host-setup.yaml
resources/tools/testbed-setup/playbooks/files/90-csit [new file with mode: 0644]

index 4640260..b4907c6 100644 (file)
@@ -79,6 +79,8 @@
   remote_user: testuser
   sudo: yes
   tasks:
+  - name: copy sysctl file
+    template: src=files/90-csit dest=/etc/sysctl.d/90-csit.conf owner=root group=root mode=644
   - name: Install dkms
     apt: name=dkms state=present
   - name: isolcpus and pstate parameter
diff --git a/resources/tools/testbed-setup/playbooks/files/90-csit b/resources/tools/testbed-setup/playbooks/files/90-csit
new file mode 100644 (file)
index 0000000..b9e0b0f
--- /dev/null
@@ -0,0 +1,16 @@
+# Number of 2MB hugepages desired\r
+vm.nr_hugepages=4096\r
+\r
+# Must be greater than or equal to (2 * vm.nr_hugepages).\r
+vm.max_map_count=20000\r
+\r
+# All groups allowed to access hugepages\r
+vm.hugetlb_shm_group=0\r
+\r
+# Shared Memory Max must be greator or equal to the total size of hugepages.\r
+# For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024\r
+# If the existing kernel.shmmax setting  (cat /sys/proc/kernel/shmmax)\r
+# is greater than the calculated TotalHugepageSize then set this parameter\r
+# to current shmmax value.\r
+kernel.shmmax=8589934592\r
+\r

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.