diff options
author | Jakob Unterwurzacher | 2016-07-16 21:18:59 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-07-16 21:20:54 +0200 |
commit | 0a3225b1ebb3a005886866ffd48c1260a57107c8 (patch) | |
tree | 6bc0ac3fca61a2ceabe9f3bc5aec3cf91fe024c9 /tests/stress_tests/loopback-mem.bash | |
parent | 6b50f2debcc78448053b8b015b828833b2796db0 (diff) |
tests: add RSS tracking to extractloop
This obsoletes loopback-mem.bash.
Diffstat (limited to 'tests/stress_tests/loopback-mem.bash')
-rwxr-xr-x | tests/stress_tests/loopback-mem.bash | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/stress_tests/loopback-mem.bash b/tests/stress_tests/loopback-mem.bash deleted file mode 100755 index fa3b0e3..0000000 --- a/tests/stress_tests/loopback-mem.bash +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# -# Mount a loopback filesystem somewhere on /tmp, then run an -# infinite loop inside that does the following: -# 1) Extract linux-3.0.tar.gz -# 2) Delete -# 3) Get memory profile -# -# This test is good at discovering inode-related memory leaks because it creates -# huge numbers of files. - -set -eu - -# Setup dirs -cd /tmp -wget -nv --show-progress -c https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz -DIR1=$(mktemp -d /tmp/loopback-mem.XXX) -DIR2=$DIR1.mnt -mkdir $DIR2 - -# Mount -loopback -l -memprofile /tmp/lmem $DIR2 $DIR1 & -LOOPBACKPID=$(jobs -p) -sleep 1 -cd $DIR2 - -# Cleanup trap -trap "cd /; fusermount -u -z $DIR2; rm -rf $DIR1 $DIR2" EXIT - -echo "Starting loop" - -N=1 -while true; do - t1=$SECONDS - tar xf /tmp/linux-3.0.tar.gz - rm -Rf linux-3.0 - t2=$SECONDS - delta=$((t2-t1)) - rss=$(grep VmRSS /proc/$LOOPBACKPID/status) - echo "Iteration $N done, $delta seconds, $rss" - let N=$N+1 - sleep 1 - kill -USR1 $LOOPBACKPID -done - |