From 501943ab19621a71efa1782cb4ac905e2c1db4df Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Wed, 23 Nov 2016 07:17:08 +0000 Subject: [PATCH] ci: Configure hugepages directly from CI script In case of CI it is better to enforce hugepages allocation. Just for case, that hugepages were left enabled by last vsperf execution or by another job. JIRA: VSPERF-391 Change-Id: I0531b2a8a1e5024d73c227377dd9c487d6931c35 Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Bill Michalowski --- ci/build-vsperf.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/ci/build-vsperf.sh b/ci/build-vsperf.sh index 4d6acf70..24fbb8fa 100755 --- a/ci/build-vsperf.sh +++ b/ci/build-vsperf.sh @@ -43,10 +43,10 @@ VSPERFENV_DIR="$HOME/vsperfenv" # CI job specific configuration # VERIFY - run basic set of TCs with default settings TESTCASES_VERIFY="vswitch_add_del_bridge vswitch_add_del_bridges vswitch_add_del_vport vswitch_add_del_vports vswitch_vports_add_del_flow" -TESTPARAM_VERIFY="--integration --test-params HUGEPAGE_RAM_ALLOCATION=2097152" +TESTPARAM_VERIFY="--integration" # MERGE - run selected TCs with default settings TESTCASES_MERGE="vswitch_add_del_bridge vswitch_add_del_bridges vswitch_add_del_vport vswitch_add_del_vports vswitch_vports_add_del_flow" -TESTPARAM_MERGE="--integration --test-params HUGEPAGE_RAM_ALLOCATION=2097152" +TESTPARAM_MERGE="--integration" # DAILY - run selected TCs for defined packet sizes TESTCASES_DAILY='phy2phy_tput back2back phy2phy_tput_mod_vlan phy2phy_scalability pvp_tput pvp_back2back pvvp_tput pvvp_back2back' TESTPARAM_DAILY='--test-params TRAFFICGEN_PKT_SIZES=(64,128,512,1024,1518)' @@ -170,8 +170,10 @@ function execute_vsperf() { LOG_SUBDIR="OvsDpdkVhost" LOG_FILE="${LOG_FILE_PREFIX}_${LOG_SUBDIR}_${DATE_SUFFIX}.log" + hugepages_info > $LOG_FILE echo " $VSPERF_BIN $OPNFVPOD --vswitch OvsDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES > $LOG_FILE" - $VSPERF_BIN $OPNFVPOD --vswitch OvsDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES &> $LOG_FILE + $VSPERF_BIN $OPNFVPOD --vswitch OvsDpdkVhost --vnf QemuDpdkVhostUser $CONF_FILE $TESTPARAM $TESTCASES &>> $LOG_FILE + hugepages_info >> $LOG_FILE ;; esac @@ -331,6 +333,19 @@ function dependencies_check() { fi } +# configure hugepages +function configure_hugepages() { + sudo bash -c "echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages" + sudo bash -c "echo 0 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages" +} + +# dump hugepages configuration +function hugepages_info() { + echo "-------------------------------------------------------------------" + head /sys/devices/system/node/node*/hugepages/hugepages*/* + echo "-------------------------------------------------------------------" +} + # # main # @@ -361,6 +376,9 @@ dependencies_check # initialization initialize_logdir +# configure hugepages +configure_hugepages + # execute job based on passed parameter case $1 in "verify") -- 2.16.6