From 324ad3b1fe42c987686eefe71012000d6b36e291 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Sun, 13 Feb 2011 19:42:38 -0800 Subject: [PATCH] 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. --- microbench/setup/run-benchmark | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- 2.20.1