From: Michael Vrable Date: Mon, 14 Feb 2011 03:42:38 +0000 (-0800) Subject: Reduce effective memory size on benchmark client. X-Git-Url: http://git.vrable.net/?p=bluesky.git;a=commitdiff_plain;h=324ad3b1fe42c987686eefe71012000d6b36e291 Reduce effective memory size on benchmark client. Lock memory to reduce the amount available for the NFS file cache, so that requests will go the proxy. --- diff --git a/microbench/setup/run-benchmark b/microbench/setup/run-benchmark index bf061a4..422ae05 100755 --- a/microbench/setup/run-benchmark +++ b/microbench/setup/run-benchmark @@ -14,6 +14,18 @@ BENCH_THREADS=8 BENCH_DURATION=120 BENCH_OPS=100 BENCH_INTERVALS=4 +BENCH_LOCKEDMEM=$((4096 - 256)) + +lock_memory() { + MEM=$1 + while [ $MEM -gt 512 ]; do + /scratch/bluesky.git/microbench/lockmem 512 & + MEM=$(($MEM - 512)) + done + if [ $MEM -gt 0 ]; then + /scratch/bluesky.git/microbench/lockmem $MEM & + fi +} # Export any environment variables specified on the command line for e in "$@"; do @@ -25,6 +37,8 @@ for e in "$@"; do done # Prepare to run the benchmark +lock_memory $BENCH_LOCKEDMEM + mount -t nfs -o vers=3,tcp,rw,soft,intr $SERVER:/export $MNTDIR pushd $MNTDIR >/dev/null @@ -38,6 +52,8 @@ pushd $MNTDIR >/dev/null $BENCH_OPS \ $BENCH_INTERVALS +pkill -TERM lockmem + popd >/dev/null umount -f $MNTDIR