autotest: Don't override default amount of hugepages on Linux to 8GB

This is relevant mostly for the VMs. Allocating that much memory puts
a lot of pressure on remaining pieces of the system as currently we
allocate total of 12GB memory per VM instance in the CI pool. Default of
4GB hp should be enough to cover majority of the tests hence if there's
any suite that requires more memory, setup.sh should be called there
directly with an optimal value.

This is done to make sure we can accomodate proper resources in the CI
by knowing what are the actual requirements rather than just blindly
allocating "as much as possible".

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8436 (master)

(cherry-picked from 227428c3a4 with
minor changes)

Change-Id: Ie958c518c7ed702b068c7fc9042183fdf41aa816
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8875
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2021-06-18 12:28:21 +02:00 committed by Tomasz Zawadzki
parent d56a2b7214
commit 023a6b0b0d
3 changed files with 11 additions and 7 deletions

View File

@ -151,11 +151,6 @@ timing_enter afterboot
timing_exit afterboot
if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_REDUCE -eq 1 ]]; then
# Make sure that memory is distributed across all NUMA nodes - by default, all goes to
# node0, but if QAT devices are attached to a different node, all of their VFs will end
# up under that node too and memory needs to be available there for the tests.
CLEAR_HUGE=yes HUGE_EVEN_ALLOC=yes ./scripts/setup.sh
./scripts/setup.sh status
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
./scripts/qat_setup.sh igb_uio
else

View File

@ -203,10 +203,16 @@ if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
fi
if [ "$(uname -s)" = "Linux" ]; then
export HUGEMEM=4096 CLEAR_HUGE=yes
if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_REDUCE -eq 1 ]]; then
# Make sure that memory is distributed across all NUMA nodes - by default, all goes to
# node0, but if QAT devices are attached to a different node, all of their VFs will end
# up under that node too and memory needs to be available there for the tests.
export HUGE_EVEN_ALLOC=yes
fi
MAKE="make"
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
# Override the default HUGEMEM in scripts/setup.sh to allocate 8GB in hugepages.
export HUGEMEM=8192
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
export DRIVER_OVERRIDE=igb_uio
# Building kernel modules requires root privileges

View File

@ -43,3 +43,6 @@ function check_match() {
$rootdir/test/app/match/match $testdir/match_files/${MATCH_FILE}.match
rm -f $testdir/match_files/${MATCH_FILE}
}
# Allocate 5GB of hugepages to have some overhead for run_*()s
HUGEMEM=5120 CLEAR_HUGE=yes "$rootdir/scripts/setup.sh"