Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch
This commit is contained in:
commit
29946892d9
|
@ -120,14 +120,14 @@ usage(void)
|
|||
" --cleanup -x\n"
|
||||
" --prerun -P =pre-command\n"
|
||||
" --postrun -R =post-command\n"
|
||||
" --log -G =log directory\n"
|
||||
" --log -G =log directory\n"
|
||||
" --regionnoise -I =shift\n"
|
||||
" --chunknoise -N =bytes\n"
|
||||
" --threaddelay -T =jiffies\n"
|
||||
" --verify -V\n"
|
||||
" --zerocopy -z\n"
|
||||
" --nowait -O\n"
|
||||
" --human-readable -H\n"
|
||||
" --human-readable -H\n"
|
||||
" --verbose -v =increase verbosity\n"
|
||||
" --help -? =this help\n\n");
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
. ../.script-config
|
||||
PROG=zpios-profile-post.sh
|
||||
|
||||
RUN_POST=${0}
|
||||
|
@ -19,44 +18,31 @@ RUN_THREAD_DELAY=${12}
|
|||
RUN_FLAGS=${13}
|
||||
RUN_RESULT=${14}
|
||||
|
||||
PROFILE_ZPIOS_PIDS_BIN=${TOPDIR}/scripts/zpios-profile/zpios-profile-pids.sh
|
||||
PROFILE_ZPIOS_PIDS_LOG=${RUN_LOG_DIR}/${RUN_ID}/pids-summary.csv
|
||||
|
||||
PROFILE_ZPIOS_DISK_BIN=${TOPDIR}/scripts/zpios-/profile/zpios-profile-disk.sh
|
||||
PROFILE_ZPIOS_DISK_LOG=${RUN_LOG_DIR}/${RUN_ID}/disk-summary.csv
|
||||
|
||||
PROFILE_ZPIOS_ARC_LOG=${RUN_LOG_DIR}/${RUN_ID}/arcstats
|
||||
PROFILE_ZPIOS_VDEV_LOG=${RUN_LOG_DIR}/${RUN_ID}/vdev_cache_stats
|
||||
|
||||
KERNEL_BIN="/lib/modules/`uname -r`/kernel/"
|
||||
SPL_BIN="${SPLBUILD}/modules/spl/"
|
||||
ZFS_BIN="${ZFSBUILD}/lib/"
|
||||
|
||||
OPROFILE_SHORT_ARGS="-a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
|
||||
OPROFILE_LONG_ARGS="-d -a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
|
||||
|
||||
OPROFILE_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile.txt
|
||||
OPROFILE_SHORT_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-short.txt
|
||||
OPROFILE_LONG_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-long.txt
|
||||
PROFILE_PID=${RUN_LOG_DIR}/${RUN_ID}/pid
|
||||
|
||||
if [ "${RUN_PHASE}" != "post" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# opcontrol --stop >>${OPROFILE_LOG} 2>&1
|
||||
# opcontrol --dump >>${OPROFILE_LOG} 2>&1
|
||||
. ${RUN_LOG_DIR}/zpios-config.sh
|
||||
. ${RUN_LOG_DIR}/${RUN_ID}/zpios-config-run.sh
|
||||
|
||||
kill -s SIGHUP `cat ${PROFILE_PID}`
|
||||
rm -f ${PROFILE_PID}
|
||||
#kill -s SIGHUP `cat ${PROFILE_PID}`
|
||||
#rm -f ${PROFILE_PID}
|
||||
|
||||
# opreport ${OPROFILE_SHORT_ARGS} >${OPROFILE_SHORT_LOG} 2>&1
|
||||
# opreport ${OPROFILE_LONG_ARGS} >${OPROFILE_LONG_LOG} 2>&1
|
||||
OPROFILE_SHORT_ARGS="-a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
|
||||
OPROFILE_LONG_ARGS="-d -a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
|
||||
|
||||
# opcontrol --deinit >>${OPROFILE_LOG} 2>&1
|
||||
/usr/bin/opcontrol --stop >>${OPROFILE_LOG} 2>&1
|
||||
/usr/bin/opcontrol --dump >>${OPROFILE_LOG} 2>&1
|
||||
/usr/bin/opreport ${OPROFILE_SHORT_ARGS} >${OPROFILE_SHORT_LOG} 2>&1
|
||||
/usr/bin/opreport ${OPROFILE_LONG_ARGS} >${OPROFILE_LONG_LOG} 2>&1
|
||||
|
||||
cat /proc/spl/kstat/zfs/arcstats >${PROFILE_ZPIOS_ARC_LOG}
|
||||
cat /proc/spl/kstat/zfs/vdev_cache_stats >${PROFILE_ZPIOS_VDEV_LOG}
|
||||
if [ -f ${PROFILE_ARC_PROC} ]; then
|
||||
cat ${PROFILE_ARC_PROC} >${PROFILE_ARC_LOG}
|
||||
fi
|
||||
|
||||
if [ -f ${PROFILE_VDEV_CACHE_PROC} ]; then
|
||||
cat ${PROFILE_VDEV_CACHE_PROC} >${PROFILE_VDEV_CACHE_LOG}
|
||||
fi
|
||||
|
||||
# Summarize system time per pid
|
||||
${PROFILE_ZPIOS_PIDS_BIN} ${RUN_LOG_DIR} ${RUN_ID} >${PROFILE_ZPIOS_PIDS_LOG}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
. ../common.sh
|
||||
PROG=zpios-profile-pre.sh
|
||||
|
||||
PROFILE_ZPIOS_READY=0
|
||||
trap "PROFILE_ZPIOS_READY=1" SIGHUP
|
||||
|
||||
RUN_PRE=${0}
|
||||
|
@ -21,51 +21,74 @@ RUN_THREAD_DELAY=${12}
|
|||
RUN_FLAGS=${13}
|
||||
RUN_RESULT=${14}
|
||||
|
||||
PROFILE_ZPIOS_BIN=${IOPDIR}/scripts/zpios-profile/zpios-profile.sh
|
||||
PROFILE_ZPIOS_READY=0
|
||||
zpios_profile_run_cfg() {
|
||||
cat > ${RUN_LOG_DIR}/${RUN_ID}/zpios-config-run.sh << EOF
|
||||
#
|
||||
# Zpios Profiling Configuration for Run ${RUN_ID}
|
||||
#
|
||||
|
||||
PROFILE_PID=${RUN_LOG_DIR}/${RUN_ID}/profile.pid
|
||||
|
||||
PROFILE_ZPIOS_PIDS_LOG=${RUN_LOG_DIR}/${RUN_ID}/pids-summary.csv
|
||||
PROFILE_ZPIOS_DISK_LOG=${RUN_LOG_DIR}/${RUN_ID}/disk-summary.csv
|
||||
|
||||
PROFILE_ARC_LOG=${RUN_LOG_DIR}/${RUN_ID}/arcstats
|
||||
PROFILE_ARC_PROC=/proc/spl/kstat/zfs/arcstats
|
||||
|
||||
PROFILE_VDEV_CACHE_LOG=${RUN_LOG_DIR}/${RUN_ID}/vdev_cache_stats
|
||||
PROFILE_VDEV_CACHE_PROC=/proc/spl/kstat/zfs/vdev_cache_stats
|
||||
|
||||
OPROFILE_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile.txt
|
||||
PROFILE_PID=${RUN_LOG_DIR}/${RUN_ID}/pid
|
||||
RUN_ARGS=${RUN_LOG_DIR}/${RUN_ID}/args
|
||||
OPROFILE_SHORT_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-short.txt
|
||||
OPROFILE_LONG_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-long.txt
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
zpios_profile_run_args() {
|
||||
cat > ${RUN_LOG_DIR}/${RUN_ID}/zpios-args.txt << EOF
|
||||
#
|
||||
# Zpios Arguments for Run ${RUN_ID}
|
||||
#
|
||||
|
||||
LOG_DIR=${RUN_LOG_DIR}
|
||||
ID=${RUN_ID}
|
||||
POOL=${RUN_POOL}
|
||||
CHUNK_SIZE=${RUN_CHUNK_SIZE}
|
||||
REGION_SIZE=${RUN_REGION_SIZE}
|
||||
THREAD_COUNT=${RUN_THREAD_COUNT}
|
||||
REGION_COUNT=${RUN_REGION_COUNT}
|
||||
OFFSET=${RUN_OFFSET}
|
||||
REGION_NOISE=${RUN_REGION_NOISE}
|
||||
CHUNK_NOISE=${RUN_CHUNK_NOISE}
|
||||
THREAD_DELAY=${RUN_THREAD_DELAY}
|
||||
FLAGS=${RUN_FLAGS}
|
||||
RESULT=${RUN_RESULT}
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ "${RUN_PHASE}" != "pre" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -Rf ${RUN_LOG_DIR}/${RUN_ID}/
|
||||
mkdir -p ${RUN_LOG_DIR}/${RUN_ID}/
|
||||
zpios_profile_run_cfg
|
||||
zpios_profile_run_args
|
||||
|
||||
echo "PHASE=${RUN_PHASE}" >>${RUN_ARGS}
|
||||
echo "LOG_DIR=${RUN_LOG_DIR}" >>${RUN_ARGS}
|
||||
echo "ID=${RUN_ID}" >>${RUN_ARGS}
|
||||
echo "POOL=${RUN_POOL}" >>${RUN_ARGS}
|
||||
echo "CHUNK_SIZE=${RUN_CHUNK_SIZE}" >>${RUN_ARGS}
|
||||
echo "REGION_SIZE=${RUN_REGION_SIZE}" >>${RUN_ARGS}
|
||||
echo "THREAD_COUNT=${RUN_THREAD_COUNT}" >>${RUN_ARGS}
|
||||
echo "REGION_COUNT=${RUN_REGION_COUNT}" >>${RUN_ARGS}
|
||||
echo "OFFSET=${RUN_OFFSET}" >>${RUN_ARGS}
|
||||
echo "REGION_NOISE=${RUN_REGION_NOISE}" >>${RUN_ARGS}
|
||||
echo "CHUNK_NOISE=${RUN_CHUNK_NOISE}" >>${RUN_ARGS}
|
||||
echo "THREAD_DELAY=${RUN_THREAD_DELAY}" >>${RUN_ARGS}
|
||||
echo "FLAGS=${RUN_FLAGS}" >>${RUN_ARGS}
|
||||
echo "RESULT=${RUN_RESULT}" >>${RUN_ARGS}
|
||||
|
||||
# XXX: Oprofile support seems to be broken when I try and start
|
||||
# it via a user mode helper script, I suspect the setup is failing.
|
||||
# opcontrol --init >>${OPROFILE_LOG} 2>&1
|
||||
# opcontrol --setup --vmlinux=/boot/vmlinux >>${OPROFILE_LOG} 2>&1
|
||||
. ${RUN_LOG_DIR}/zpios-config.sh
|
||||
. ${RUN_LOG_DIR}/${RUN_ID}/zpios-config-run.sh
|
||||
|
||||
# Start the profile script
|
||||
${PROFILE_ZPIOS_BIN} ${RUN_PHASE} ${RUN_LOG_DIR} ${RUN_ID} &
|
||||
echo "$!" >${PROFILE_PID}
|
||||
#${PROFILE_ZPIOS_BIN} ${RUN_PHASE} ${RUN_LOG_DIR} ${RUN_ID} &
|
||||
#echo "$!" >${PROFILE_PID}
|
||||
|
||||
# Sleep waiting for profile script to be ready, it will
|
||||
# signal us via SIGHUP when it is ready to start profiling.
|
||||
while [ ${PROFILE_ZPIOS_READY} -eq 0 ]; do
|
||||
sleep 0.1
|
||||
done
|
||||
#while [ ${PROFILE_ZPIOS_READY} -eq 0 ]; do
|
||||
# sleep 0.1
|
||||
#done
|
||||
|
||||
# opcontrol --start-daemon >>${OPROFILE_LOG} 2>&1
|
||||
# opcontrol --start >>${OPROFILE_LOG} 2>&1
|
||||
/usr/bin/opcontrol --reset >>${OPROFILE_LOG} 2>&1
|
||||
/usr/bin/opcontrol --start >>${OPROFILE_LOG} 2>&1
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
# Usage: zpios
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --cleanup -x
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --threaddelay -T =jiffies
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --pool | --path -p =pool name
|
||||
# --load -L =dmuio
|
||||
# --help -? =this help
|
||||
# --verbose -v =increase verbosity
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --load -L =dmuio|ssf|fpp
|
||||
# --pool -p =pool name
|
||||
# --cleanup -x
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --threaddelay -T =jiffies
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --nowait -O
|
||||
# --human-readable -H
|
||||
# --verbose -v =increase verbosity
|
||||
# --help -? =this help
|
||||
|
||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||
--load=dmuio \
|
||||
--path=${ZPOOL_NAME} \
|
||||
--pool=${ZPOOL_NAME} \
|
||||
--threadcount=16 \
|
||||
--regioncount=8192 \
|
||||
--regionsize=4M \
|
||||
|
|
|
@ -1,50 +1,52 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
# Usage: zpios
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --cleanup -x
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --threaddelay -T =jiffies
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --pool | --path -p =pool name
|
||||
# --load -L =dmuio
|
||||
# --help -? =this help
|
||||
# --verbose -v =increase verbosity
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --load -L =dmuio|ssf|fpp
|
||||
# --pool -p =pool name
|
||||
# --cleanup -x
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --threaddelay -T =jiffies
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --nowait -O
|
||||
# --human-readable -H
|
||||
# --verbose -v =increase verbosity
|
||||
# --help -? =this help
|
||||
|
||||
|
||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||
--load=dmuio \
|
||||
--path=${ZPOOL_NAME} \
|
||||
--pool=${ZPOOL_NAME} \
|
||||
--threadcount=1 \
|
||||
--regioncount=16 \
|
||||
--regionsize=4M \
|
||||
--chunksize=1M \
|
||||
--offset=4M \
|
||||
--cleanup \
|
||||
--cleanup \
|
||||
--verbose \
|
||||
--human-readable \
|
||||
${ZPIOS_OPTIONS}"
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
# Usage: zpios
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --cleanup -x
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --threaddelay -T =jiffies
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --pool | --path -p =pool name
|
||||
# --load -L =dmuio
|
||||
# --help -? =this help
|
||||
# --verbose -v =increase verbosity
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --load -L =dmuio|ssf|fpp
|
||||
# --pool -p =pool name
|
||||
# --cleanup -x
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --threaddelay -T =jiffies
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --nowait -O
|
||||
# --human-readable -H
|
||||
# --verbose -v =increase verbosity
|
||||
# --help -? =this help
|
||||
|
||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||
--load=dmuio \
|
||||
--path=${ZPOOL_NAME} \
|
||||
--pool=${ZPOOL_NAME} \
|
||||
--threadcount=1,2,4,8,16,32,64,128,256 \
|
||||
--regioncount=65536 \
|
||||
--regionsize=4M \
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
# Usage: zpios
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --cleanup -x
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --threaddelay -T =jiffies
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --pool | --path -p =pool name
|
||||
# --load -L =dmuio
|
||||
# --help -? =this help
|
||||
# --verbose -v =increase verbosity
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --load -L =dmuio|ssf|fpp
|
||||
# --pool -p =pool name
|
||||
# --cleanup -x
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --threaddelay -T =jiffies
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --nowait -O
|
||||
# --human-readable -H
|
||||
# --verbose -v =increase verbosity
|
||||
# --help -? =this help
|
||||
|
||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||
--load=dmuio \
|
||||
--path=${ZPOOL_NAME} \
|
||||
--pool=${ZPOOL_NAME} \
|
||||
--threadcount=256 \
|
||||
--regioncount=65536 \
|
||||
--regionsize=4M \
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
# Usage: zpios
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --cleanup -x
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --threaddelay -T =jiffies
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --pool | --path -p =pool name
|
||||
# --load -L =dmuio
|
||||
# --help -? =this help
|
||||
# --verbose -v =increase verbosity
|
||||
# --threadcount -t =values
|
||||
# --threadcount_low -l =value
|
||||
# --threadcount_high -h =value
|
||||
# --threadcount_incr -e =value
|
||||
# --regioncount -n =values
|
||||
# --regioncount_low -i =value
|
||||
# --regioncount_high -j =value
|
||||
# --regioncount_incr -k =value
|
||||
# --offset -o =values
|
||||
# --offset_low -m =value
|
||||
# --offset_high -q =value
|
||||
# --offset_incr -r =value
|
||||
# --chunksize -c =values
|
||||
# --chunksize_low -a =value
|
||||
# --chunksize_high -b =value
|
||||
# --chunksize_incr -g =value
|
||||
# --regionsize -s =values
|
||||
# --regionsize_low -A =value
|
||||
# --regionsize_high -B =value
|
||||
# --regionsize_incr -C =value
|
||||
# --load -L =dmuio|ssf|fpp
|
||||
# --pool -p =pool name
|
||||
# --cleanup -x
|
||||
# --prerun -P =pre-command
|
||||
# --postrun -R =post-command
|
||||
# --log -G =log directory
|
||||
# --regionnoise -I =shift
|
||||
# --chunknoise -N =bytes
|
||||
# --threaddelay -T =jiffies
|
||||
# --verify -V
|
||||
# --zerocopy -z
|
||||
# --nowait -O
|
||||
# --human-readable -H
|
||||
# --verbose -v =increase verbosity
|
||||
# --help -? =this help
|
||||
|
||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||
--load=dmuio \
|
||||
--path=${ZPOOL_NAME} \
|
||||
--pool=${ZPOOL_NAME} \
|
||||
--threadcount=4 \
|
||||
--regioncount=1024 \
|
||||
--regionsize=4M \
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
|
||||
. ./common.sh
|
||||
PROG=zpios.sh
|
||||
|
||||
PROFILE_ZPIOS_PRE=${TOPDIR}/scripts/zpios-profile/zpios-profile-pre.sh
|
||||
PROFILE_ZPIOS_POST=${TOPDIR}/scripts/zpios-profile/zpios-profile-post.sh
|
||||
PROFILE_ZPIOS_LOG=/tmp/
|
||||
DATE=`date +%Y%m%d-%H%M%S`
|
||||
|
||||
MODULES=( \
|
||||
${MODDIR}/zpios/zpios.ko \
|
||||
|
@ -114,6 +111,43 @@ check_test() {
|
|||
return 0
|
||||
}
|
||||
|
||||
zpios_profile_config() {
|
||||
cat > ${PROFILE_ZPIOS_LOG}/zpios-config.sh << EOF
|
||||
#
|
||||
# Zpios Profiling Configuration
|
||||
#
|
||||
|
||||
KERNEL_BIN="/lib/modules/`uname -r`/kernel/"
|
||||
SPL_BIN="${SPLBUILD}/module/"
|
||||
ZFS_BIN="${TOPDIR}/module/"
|
||||
|
||||
PROFILE_ZPIOS_BIN=${TOPDIR}/scripts/zpios-profile/zpios-profile.sh
|
||||
PROFILE_ZPIOS_PIDS_BIN=${TOPDIR}/scripts/zpios-profile/zpios-profile-pids.sh
|
||||
PROFILE_ZPIOS_DISK_BIN=${TOPDIR}/scripts/zpios-/profile/zpios-profile-disk.sh
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
zpios_profile_start() {
|
||||
PROFILE_ZPIOS_PRE=${TOPDIR}/scripts/zpios-profile/zpios-profile-pre.sh
|
||||
PROFILE_ZPIOS_POST=${TOPDIR}/scripts/zpios-profile/zpios-profile-post.sh
|
||||
PROFILE_ZPIOS_LOG=/tmp/zpios/${ZPOOL_CONFIG}+${ZPIOS_TEST_ARG}+${DATE}
|
||||
ZPIOS_OPTIONS="${ZPIOS_OPTIONS} --log=${PROFILE_ZPIOS_LOG}"
|
||||
ZPIOS_OPTIONS="${ZPIOS_OPTIONS} --prerun=${PROFILE_ZPIOS_PRE}"
|
||||
ZPIOS_OPTIONS="${ZPIOS_OPTIONS} --postrun=${PROFILE_ZPIOS_POST}"
|
||||
|
||||
mkdir -p ${PROFILE_ZPIOS_LOG}
|
||||
zpios_profile_config
|
||||
|
||||
/usr/bin/opcontrol --init || exit 1
|
||||
/usr/bin/opcontrol --setup --vmlinux=/boot/vmlinux || exit 1
|
||||
}
|
||||
|
||||
zpios_profile_stop() {
|
||||
/usr/bin/opcontrol --shutdown
|
||||
/usr/bin/opcontrol --deinit
|
||||
}
|
||||
|
||||
PROFILE=
|
||||
ZPOOL_CONFIG=zpool-config.sh
|
||||
ZPIOS_TEST=zpios-test.sh
|
||||
|
@ -139,6 +173,7 @@ while getopts 'hvpc:t:o:l:s:' OPTION; do
|
|||
ZPOOL_CONFIG=${OPTARG}
|
||||
;;
|
||||
t)
|
||||
ZPIOS_TEST_ARG=${OPTARG}
|
||||
ZPIOS_TEST=${TOPDIR}/scripts/zpios-test/${OPTARG}.sh
|
||||
;;
|
||||
o)
|
||||
|
@ -188,17 +223,19 @@ fi
|
|||
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \
|
||||
-l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1
|
||||
|
||||
if [ $PROFILE ]; then
|
||||
ZPIOS_CMD="${ZPIOS_CMD} --log=${PROFILE_ZPIOS_LOG}"
|
||||
ZPIOS_CMD="${ZPIOS_CMD} --prerun=${PROFILE_ZPIOS_PRE}"
|
||||
ZPIOS_CMD="${ZPIOS_CMD} --postrun=${PROFILE_ZPIOS_POST}"
|
||||
if [ ${PROFILE} ]; then
|
||||
zpios_profile_start
|
||||
fi
|
||||
|
||||
echo
|
||||
date
|
||||
echo "${DATE}"
|
||||
zpios_start
|
||||
zpios_stop
|
||||
|
||||
if [ ${PROFILE} ]; then
|
||||
zpios_profile_stop
|
||||
fi
|
||||
|
||||
if [ ${VERBOSE} ]; then
|
||||
print_stats
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue