stress2: Some tests use hw.ncpu to scale the load. Tests on a box with

a large number of CPUs show that this number needs to be capped
This commit is contained in:
Peter Holm
2024-08-17 08:37:34 +02:00
parent 10d5b43424
commit c7bc30c24f
12 changed files with 14 additions and 0 deletions
+1
View File
@@ -49,6 +49,7 @@ chmod 0777 $TMPDIR
log=$mntpoint/log
p=$((`sysctl -n hw.ncpu`+ 1))
[ $p -gt 32 ] && p=32 # Arbitrary cap
p=`jot -r 1 1 $p`
echo "make -j $p buildkernel KERNCONF=GENERIC DESTDIR=$mntpoint" \
"TARGET=amd64 TARGET_ARCH=amd64"
+1
View File
@@ -55,6 +55,7 @@ mkdir $TMPDIR
chmod 0777 $TMPDIR
p=$((`sysctl -n hw.ncpu`+ 1))
[ $p -gt 32 ] && p=32 # Arbitrary cap
timeout 20m make -i -j $p buildworld DESTDIR=$mntpoint TARGET=amd64 \
TARGET_ARCH=amd64 > /dev/null
+1
View File
@@ -46,6 +46,7 @@ mkdir $TMPDIR
chmod 0777 $TMPDIR
p=$((`sysctl -n hw.ncpu`+ 1))
[ $p -gt 32 ] && p=32 # Arbitrary cap
make -j $p buildworld DESTDIR=$mntpoint TARGET=amd64 TARGET_ARCH=amd64 \
> /dev/null &
sleep $((20 * 60))
+1
View File
@@ -62,6 +62,7 @@ mkdir $TMPDIR $MAKEOBJDIRPREFIX
chmod 0777 $TMPDIR $MAKEOBJDIRPREFIX
p=$((`sysctl -n hw.ncpu`+ 1))
[ $p -gt 32 ] && p=32 # Arbitrary cap
su $testuser -c \
"make -i -j $p buildworld DESTDIR=$mntpoint TARGET=amd64 \
TARGET_ARCH=amd64 > /dev/null" &
+1
View File
@@ -50,6 +50,7 @@ mkdir $TMPDIR
chmod 0777 $TMPDIR
p=$((`sysctl -n hw.ncpu`+ 1))
[ $p -gt 16 ] && p=16 # Arbitrary cap
[ `sysctl -n vm.swap_total` -gt 0 ] && p=$((p * 4))
p=`jot -r 1 1 $p`
echo "make -i -j $p buildworld DESTDIR=$mntpoint TARGET=amd64 "\
+1
View File
@@ -41,6 +41,7 @@
CONT=/tmp/crossmp3.continue
if [ $# -eq 0 ]; then
N=`sysctl -n hw.ncpu`
[ $N -gt 32 ] && N=32 # Arbitrary cap
usermem=`sysctl -n hw.usermem`
[ `sysctl -n vm.swap_total` -eq 0 ] && usermem=$((usermem / 2))
size=$((usermem / 1024 / 1024 / N))
+1
View File
@@ -40,6 +40,7 @@
. ../default.cfg
N=`sysctl -n hw.ncpu`
[ $N -gt 32 ] && N=32 # Arbitrary cap
usermem=`sysctl -n hw.usermem`
[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80))
size=$((usermem / 1024 / 1024 - 2))
+1
View File
@@ -33,6 +33,7 @@
. ../default.cfg
N=`sysctl -n hw.ncpu`
[ $N -gt 32 ] && N=32 # Arbitrary cap
usermem=`sysctl -n hw.usermem`
[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80))
size=$((usermem / 1024 / 1024 / N))
+1
View File
@@ -41,6 +41,7 @@
CONT=/tmp/crossmp8.continue
N=`sysctl -n hw.ncpu`
[ $N -gt 32 ] && N=32 # Arbitrary cap
usermem=`sysctl -n hw.usermem`
[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80))
size=$((usermem / 1024 / 1024 / N))
+3
View File
@@ -34,6 +34,8 @@
# https://people.freebsd.org/~pho/stress/log/kostik1017.txt
# Fixed by r322175
# Seen with p=513: Threads stuck in "ffsrca"
. ../default.cfg
gigs=9
@@ -62,6 +64,7 @@ cd $mntpoint/src
export MAKEOBJDIRPREFIX=$mntpoint/obj
p=$((`sysctl -n hw.ncpu`+ 1))
[ $p -gt 32 ] && p=32 # Temporary work around
timeout 10m \
make -i -j $p buildworld DESTDIR=$mntpoint TARGET=amd64 \
TARGET_ARCH=amd64 > /dev/null
+1
View File
@@ -40,6 +40,7 @@
. ../default.cfg
N=`sysctl -n hw.ncpu`
[ $N -gt 32 ] && N=32 # Arbitrary cap
usermem=`sysctl -n hw.usermem`
[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80))
size=$((usermem / 1024 / 1024 / 2))
+1
View File
@@ -44,6 +44,7 @@ top=$mntpoint
export MAKEOBJDIRPREFIX=$top/obj
export log=$top/buildworld.`date +%Y%m%dT%H%M`
n=$((`sysctl -n hw.ncpu` + 1))
[ $n -gt 32 ] && n=32 # Arbitrary cap
cd $src
make -j$n buildworld > $log 2>&1 && s=0 ||s=1
grep '\*\*\*' $log && s=2