Re: [linus:master] [iov_iter] c9eec08bac: vm-scalability.throughput -16.9% regression

David Howells
2023-11-15T15:20:26Z

Okay, I've got this to work - kind of. Your test box has a lot more RAM than
mine (192G according to the email), so I had to reduce the sizes and make it
delete the files between tests. I ended up using the attached script to run
things. I don't see the statistical analysis stuff.

Anyway, with upstream Linus, I see something like:

Count: 27
Total: 10649173
Range: 391374...398472
Mean : 394413
Stdev: 10218

With that patch reverted, I see something like:

Count: 27
Total: 10665161
Range: 391427...399601
Mean : 395005
Stdev: 13720

But the outcome is a bit variable and the result spaces overlap considerably.
I certainly don't see a 17% performance reduction. Now, this may be due to
hardware differences. The CPU I'm using is an Intel i3-4170 - which is a few
years old at this point.

David
---
for cpu_dir in /sys/devices/system/cpu/cpu[0-9]*
do
online_file="$cpu_dir"/online
[ -f "$online_file" ] && [ "$(cat "$online_file")" -eq 0 ] && continue

file="$cpu_dir"/cpufreq/scaling_governor
[ -f "$file" ] && echo "performance" > "$file"
done

#DATADIR=/mnt2/vm-scalability-tmp
#WORKDIR=$DATADIR/vm-scalability
#WORKDIR=/mnt2/vm-scalability
WORKDIR=/tmp/vm-scalability

cd /root/lkp-tests/pkg/vm-scalability/vm-scalability-lkp/lkp/benchmarks/vm-scalability
#mount -t tmpfs -o size=100% vm-scalability-tmp $DATADIR
#mkdir -p $DATADIR || exit $?
#truncate -s 10G $WORKDIR.img || exit $?
#mkfs.xfs -f -q $WORKDIR.img || exit $?
mkdir -p $WORKDIR || exit $?
#mount -o loop $WORKDIR.img $WORKDIR || exit $?
#./case-msync

truncate $WORKDIR/sparse-msync-1 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-1 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-1

truncate $WORKDIR/sparse-msync-2 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-2 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-2

truncate $WORKDIR/sparse-msync-3 -s 10G
truncate $WORKDIR/sparse-msync-4 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-3 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-4 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-[34]

truncate $WORKDIR/sparse-msync-5 -s 10G
truncate $WORKDIR/sparse-msync-6 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-5 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-6 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-[56]

truncate $WORKDIR/sparse-msync-7 -s 10G
truncate $WORKDIR/sparse-msync-8 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-7 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-8 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-[78]

truncate $WORKDIR/sparse-msync-9 -s 10G
truncate $WORKDIR/sparse-msync-10 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-9 -F --prealloc --open-rw 449340754
truncate $WORKDIR/sparse-msync-11 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-10 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{9,10}

truncate $WORKDIR/sparse-msync-12 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-11 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-12 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{11,12}

truncate $WORKDIR/sparse-msync-13 -s 10G
truncate $WORKDIR/sparse-msync-14 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-13 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-14 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{13,14}

truncate $WORKDIR/sparse-msync-15 -s 10G
truncate $WORKDIR/sparse-msync-16 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-15 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-16 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{15,16}

truncate $WORKDIR/sparse-msync-17 -s 10G
truncate $WORKDIR/sparse-msync-18 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-17 -F --prealloc --open-rw 449340754
truncate $WORKDIR/sparse-msync-19 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-18 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-19 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{17,18,19}

truncate $WORKDIR/sparse-msync-20 -s 10G
truncate $WORKDIR/sparse-msync-21 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-20 -F --prealloc --open-rw 449340754
truncate $WORKDIR/sparse-msync-22 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-21 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-22 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{20,21,22}

truncate $WORKDIR/sparse-msync-23 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-23 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-23
truncate $WORKDIR/sparse-msync-24 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-24 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-24
truncate $WORKDIR/sparse-msync-25 -s 10G
truncate $WORKDIR/sparse-msync-26 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-25 -F --prealloc --open-rw 449340754
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-26 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{25,26}

truncate $WORKDIR/sparse-msync-27 -s 10G
truncate $WORKDIR/sparse-msync-28 -s 10G
./usemem --runtime 300 -S -f $WORKDIR/sparse-msync-27 -F --prealloc --open-rw 449340754
rm $WORKDIR/sparse-msync-{27,28}