Lock memory to reduce the amount available for the NFS file cache, so
that requests will go the proxy.
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
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
$BENCH_OPS \
$BENCH_INTERVALS
+pkill -TERM lockmem
+
popd >/dev/null
umount -f $MNTDIR