Use larger writes and smaller files, so that the racer file_create.sh
workload does not get bogged down with many threads stuck on sub-page
writes to the same file (causing excruciating 1kB-per-RPC sync writes
to disk on the OST).
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I173c155dfe4044f89deb8f2d8a7c3be4a28ce763
Reviewed-on: http://review.whamcloud.com/7951
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
+MAX_MB=${RACER_MAX_MB:-8}
OSTCOUNT=${OSTCOUNT:-$(lfs df $DIR 2> /dev/null | grep -c OST)}
while /bin/true ; do
file=$((RANDOM % MAX))
OSTCOUNT=${OSTCOUNT:-$(lfs df $DIR 2> /dev/null | grep -c OST)}
while /bin/true ; do
file=$((RANDOM % MAX))
- SIZE=$((RANDOM * MAX_MB / 32))
- echo "file_create: FILE=$DIR/$file SIZE=$SIZE"
+ # $RANDOM is between 0 and 32767, and we want $blockcount in 64kB units
+ blockcount=$((RANDOM * MAX_MB / 32 / 64))
+ stripecount=$((RANDOM % (OSTCOUNT + 1)))
- lfs setstripe -c $((RANDOM % OSTCOUNT)) $DIR/$file 2> /dev/null
- dd if=/dev/zero of=$DIR/$file bs=1k count=$SIZE 2> /dev/null
+ lfs setstripe -c $stripecount $DIR/$file 2> /dev/null
+ dd if=/dev/zero of=$DIR/$file bs=64k count=$blockcount 2> /dev/null
{
echo "racer cleanup"
for P in $RACER_PROGS; do
{
echo "racer cleanup"
for P in $RACER_PROGS; do
done
if [[ $rc -eq 0 ]]; then
echo there should be NO racer processes:
done
if [[ $rc -eq 0 ]]; then
echo there should be NO racer processes:
- ps aux | grep -E "${RACER_PROGS// /|}"
+ ps uww -C "${RACER_PROGS// /,}"
return 0
fi
echo -n "Waited $(( TOT_WAIT + SHORT_WAIT)), rc=$rc "
(( SHORT_WAIT+=SHORT_WAIT ))
(( TOT_WAIT+=SHORT_WAIT ))
done
return 0
fi
echo -n "Waited $(( TOT_WAIT + SHORT_WAIT)), rc=$rc "
(( SHORT_WAIT+=SHORT_WAIT ))
(( TOT_WAIT+=SHORT_WAIT ))
done
- ps aux | grep -E "${RACER_PROGS// /|}"
+ ps uww -C "${RACER_PROGS// /,}"
# Check our to see whether our test DIR is still available.
df $DIR
(( RC+=$? ))
# Check our to see whether our test DIR is still available.
df $DIR
(( RC+=$? ))
-if [ $RC -eq 0 ]; then
- echo "We survived $0 for $DURATION seconds."
-fi
+[ $RC -eq 0 ] && echo "We survived $0 for $DURATION seconds."