summaryrefslogtreecommitdiffstats
path: root/build/build_perf_image.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-09-02 14:44:47 -0400
committerTim Rozet <trozet@redhat.com>2016-09-08 04:39:18 +0000
commit6256b4f00397a2a08ffd60e6314ffaa320648942 (patch)
tree8dfc433bb19b3c4804dd984fc063836b2e509e69 /build/build_perf_image.sh
parent83e3a718e26ca42465a03c7d70eb241e82e45e1e (diff)
Fixes FDIO kernel settings
VPP was overriding kernel settings with its defaults for all deployments by installing the VPP RPM. This removes that file, and sets the settings appropriately for the FDIO scenarios only, based on number of huge pages per profile. JIRA: APEX-255 Change-Id: If39b220a7c34cbfd673afe1881c1a9bdb3fdc2e0 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'build/build_perf_image.sh')
-rw-r--r--build/build_perf_image.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/build_perf_image.sh b/build/build_perf_image.sh
index a6ca066b..68a1804f 100644
--- a/build/build_perf_image.sh
+++ b/build/build_perf_image.sh
@@ -32,5 +32,12 @@ fi
if [ "$CATEGORY" == "kernel" ]; then
echo "${KEY}=${VALUE}" >> $ROLE-kernel_params.txt
+ if [[ "$dataplane" == 'fdio' && "$KEY" == 'hugepages' ]]; then
+ # set kernel hugepages params for fdio
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "echo vm.hugetlb_shm_group=0 >> /usr/lib/sysctl.d/00-system.conf" \
+ --run-command "echo vm.max_map_count=$(printf "%.0f" $(echo 2.2*$VALUE | bc)) >> /usr/lib/sysctl.d/00-system.conf" \
+ --run-command "echo kernel.shmmax==$((VALUE * 2 * 1024 * 1024)) >> /usr/lib/sysctl.d/00-system.conf" \
+ -a ${IMAGE}
+ fi
fi