Add system optimization on physical testbed I 35/4135/1
authorpmikus <pmikus@cisco.com>
Wed, 7 Dec 2016 07:23:21 +0000 (08:23 +0100)
committerpmikus <pmikus@cisco.com>
Wed, 7 Dec 2016 07:23:21 +0000 (08:23 +0100)
This patch is adding kernel and vm optimizations for physical testbeds.

Change-Id: I7b54bf528f7d2cee788d8047d259877b7e362872
Signed-off-by: pmikus <pmikus@cisco.com>
resources/tools/testbed-setup/playbooks/files/90-csit

index b9e0b0f..b53106e 100644 (file)
@@ -1,16 +1,79 @@
-# Number of 2MB hugepages desired\r
+# change the minimum size of the hugepage pool.\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
+# this file contains the maximum number of memory map areas a process\r
+# may have. memory map areas are used as a side-effect of calling\r
+# malloc, directly by mmap and mprotect, and also when loading shared\r
+# libraries.\r
+#\r
+# while most applications need less than a thousand maps, certain\r
+# programs, particularly malloc debuggers, may consume lots of them,\r
+# e.g., up to one or two maps per allocation.\r
+# must be greater than or equal to (2 * vm.nr_hugepages).\r
+vm.max_map_count=200000\r
 \r
-# All groups allowed to access hugepages\r
+# hugetlb_shm_group contains group id that is allowed to create sysv\r
+# shared memory segment using hugetlb page.\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
+# this control is used to define how aggressive the kernel will swap\r
+# memory pages.  higher values will increase agressiveness, lower values\r
+# decrease the amount of swap.  a value of 0 instructs the kernel not to\r
+# initiate swap until the amount of free and file-backed pages is less\r
+# than the high water mark in a zone.\r
+vm.swappiness=0\r
+\r
+# this parameter can be used to control the nmi watchdog\r
+# (i.e. the hard lockup detector) on x86 systems.\r
+#\r
+#    0 - disable the hard lockup detector\r
+#    1 - enable the hard lockup detector\r
+#\r
+# the hard lockup detector monitors each cpu for its ability to respond to\r
+# timer interrupts. the mechanism utilizes cpu performance counter registers\r
+# that are programmed to generate non-maskable interrupts (nmis) periodically\r
+# while a cpu is busy. hence, the alternative name 'nmi watchdog'.\r
+#\r
+# the nmi watchdog is disabled by default if the kernel is running as a guest\r
+# in a kvm virtual machine. this default can be overridden by adding\r
+#kernel. nmi_watchdog=1\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
+# this option can be used to select the type of process address\r
+# space randomization that is used in the system, for architectures\r
+# that support this feature.\r
+# 0 - turn the process address space randomization off.  this is the\r
+#     default for architectures that do not support this feature anyways,\r
+#     and kernels that are booted with the "norandmaps" parameter.\r
+kernel.randomize_va_space=0\r
+\r
+# this parameter can be used to control the soft lockup detector.\r
+#\r
+#    0 - disable the soft lockup detector\r
+#    1 - enable the soft lockup detector\r
+#\r
+# the soft lockup detector monitors cpus for threads that are hogging the cpus\r
+# without rescheduling voluntarily, and thus prevent the 'watchdog/n' threads\r
+# from running. the mechanism depends on the cpus ability to respond to timer\r
+# interrupts which are needed for the 'watchdog/n' threads to be woken up by\r
+# the watchdog timer function, otherwise the nmi watchdog - if enabled - can\r
+# detect a hard lockup condition.\r
+#kernel.soft_watchdog=0\r
+\r
+# this value can be used to control on which cpus the watchdog may run.\r
+# the default cpumask is all possible cores, but if no_hz_full is\r
+# enabled in the kernel config, and cores are specified with the\r
+# nohz_full= boot argument, those cores are excluded by default.\r
+# offline cores can be included in this mask, and if the core is later\r
+# brought online, the watchdog will be started based on the mask value.\r
+#\r
+# typically this value would only be touched in the nohz_full case\r
+# to re-enable cores that by default were not running the watchdog,\r
+# if a kernel lockup was suspected on those cores.\r
+kernel.watchdog_cpumask=0,18\r