[DTrace-devel] [PATCH] test: Bump up locked memory in lockmem tests further

eugene.loh at oracle.com eugene.loh at oracle.com
Mon Nov 7 20:33:29 UTC 2022


From: Eugene Loh <eugene.loh at oracle.com>

In a previous commit --
672c4532 "test: Bump up locked memory in lockmem tests"
-- the lockmem tests bumped up how much locked memory was needed
for DTrace to load successfully.  That patch helped the tests
pass under wider conditions, but further increases are warranted.

As previously noted, the default aggsize is 4M.  This is the dominant
drain on locked memory for a simple script like "BEGIN { @ = avg(1) }".

Note that the model used in gmap_create_aggs() for computing nelems
    DTRACEOPT_AGGSIZE / (dt_maxtuplesize + dt_maxaggdsize)
is approximate.  It can underestimate memory consumption by, say, 3x.

Further, some test systems have more CPUs, and we're using AGGSIZE
on each CPU.

For an AGGSIZE of 4M, a model underestimate of 3x, and a test system
of 32 CPUs, we want a lockmem limit of over 360M.

Up the lockmem limit to 1 Gbyte for cases expecting successful loads.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 test/unittest/misc/tst.lockmem-cmdline.sh | 2 +-
 test/unittest/misc/tst.lockmem-envvar.sh  | 2 +-
 test/unittest/misc/tst.lockmem-pragma.sh  | 2 +-
 test/unittest/misc/tst.lockmem-x.sh       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/unittest/misc/tst.lockmem-cmdline.sh b/test/unittest/misc/tst.lockmem-cmdline.sh
index 64b5096c..72b5cd22 100755
--- a/test/unittest/misc/tst.lockmem-cmdline.sh
+++ b/test/unittest/misc/tst.lockmem-cmdline.sh
@@ -8,7 +8,7 @@
 
 dtrace=$1
 
-for val in 1 262144 unlimited; do
+for val in 1 1048576 unlimited; do
 	ulimit -l $val
 
 	$dtrace -qn 'BEGIN { @ = avg(1234); exit(0); }'
diff --git a/test/unittest/misc/tst.lockmem-envvar.sh b/test/unittest/misc/tst.lockmem-envvar.sh
index 735516d0..b7b6bc04 100755
--- a/test/unittest/misc/tst.lockmem-envvar.sh
+++ b/test/unittest/misc/tst.lockmem-envvar.sh
@@ -10,7 +10,7 @@ dtrace=$1
 
 ulimit -l 1
 
-for val in 16 1K 262144K 256M unlimited; do
+for val in 16 1K 1048576K 1024M unlimited; do
 	DTRACE_OPT_LOCKMEM=$val $dtrace -qn 'BEGIN { @ = avg(1234); exit(0); }'
 	echo $?
 done
diff --git a/test/unittest/misc/tst.lockmem-pragma.sh b/test/unittest/misc/tst.lockmem-pragma.sh
index 03aacaf5..edd275b2 100755
--- a/test/unittest/misc/tst.lockmem-pragma.sh
+++ b/test/unittest/misc/tst.lockmem-pragma.sh
@@ -10,7 +10,7 @@ dtrace=$1
 
 ulimit -l 1
 
-for val in 16 1K 262144K 256M unlimited; do
+for val in 16 1K 1048576K 1024M unlimited; do
 	$dtrace -qs /dev/stdin << EOF
 		#pragma D option lockmem=$val
 
diff --git a/test/unittest/misc/tst.lockmem-x.sh b/test/unittest/misc/tst.lockmem-x.sh
index b70bd285..62c337b7 100755
--- a/test/unittest/misc/tst.lockmem-x.sh
+++ b/test/unittest/misc/tst.lockmem-x.sh
@@ -10,7 +10,7 @@ dtrace=$1
 
 ulimit -l 1
 
-for val in 16 1K 262144K 256M unlimited; do
+for val in 16 1K 1048576K 1024M unlimited; do
 	$dtrace -xlockmem=$val -qn 'BEGIN { @ = avg(1234); exit(0); }'
 	echo $?
 done
-- 
2.18.4




More information about the DTrace-devel mailing list