From 8b2b036b4f045316032643c6170d694b0efd6788 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Sat, 1 Jul 2023 06:23:38 +0000 Subject: T1797: VPP verify minimal installed memory and apply sysctl Do not allow configure VPP if on the systems with low amount installed memory Add sysctl VPP parameters (hugepages, kernel.shmmax) --- data/templates/vpp/sysctl.conf.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/templates/vpp/sysctl.conf.j2 (limited to 'data/templates/vpp/sysctl.conf.j2') diff --git a/data/templates/vpp/sysctl.conf.j2 b/data/templates/vpp/sysctl.conf.j2 new file mode 100644 index 000000000..2207e2e38 --- /dev/null +++ b/data/templates/vpp/sysctl.conf.j2 @@ -0,0 +1,15 @@ +# Number of 2MB hugepages desired +vm.nr_hugepages=1024 + +# Must be greater than or equal to (2 * vm.nr_hugepages). +vm.max_map_count=3096 + +# All groups allowed to access hugepages +vm.hugetlb_shm_group=0 + +# Shared Memory Max must be greater 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 /proc/sys/kernel/shmmax) +# is greater than the calculated TotalHugepageSize then set this parameter +# to current shmmax value. +kernel.shmmax=2147483648 -- cgit v1.2.3