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"
|
" --cleanup -x\n"
|
||||||
" --prerun -P =pre-command\n"
|
" --prerun -P =pre-command\n"
|
||||||
" --postrun -R =post-command\n"
|
" --postrun -R =post-command\n"
|
||||||
" --log -G =log directory\n"
|
" --log -G =log directory\n"
|
||||||
" --regionnoise -I =shift\n"
|
" --regionnoise -I =shift\n"
|
||||||
" --chunknoise -N =bytes\n"
|
" --chunknoise -N =bytes\n"
|
||||||
" --threaddelay -T =jiffies\n"
|
" --threaddelay -T =jiffies\n"
|
||||||
" --verify -V\n"
|
" --verify -V\n"
|
||||||
" --zerocopy -z\n"
|
" --zerocopy -z\n"
|
||||||
" --nowait -O\n"
|
" --nowait -O\n"
|
||||||
" --human-readable -H\n"
|
" --human-readable -H\n"
|
||||||
" --verbose -v =increase verbosity\n"
|
" --verbose -v =increase verbosity\n"
|
||||||
" --help -? =this help\n\n");
|
" --help -? =this help\n\n");
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. ../.script-config
|
|
||||||
PROG=zpios-profile-post.sh
|
PROG=zpios-profile-post.sh
|
||||||
|
|
||||||
RUN_POST=${0}
|
RUN_POST=${0}
|
||||||
|
@ -19,44 +18,31 @@ RUN_THREAD_DELAY=${12}
|
||||||
RUN_FLAGS=${13}
|
RUN_FLAGS=${13}
|
||||||
RUN_RESULT=${14}
|
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
|
if [ "${RUN_PHASE}" != "post" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# opcontrol --stop >>${OPROFILE_LOG} 2>&1
|
. ${RUN_LOG_DIR}/zpios-config.sh
|
||||||
# opcontrol --dump >>${OPROFILE_LOG} 2>&1
|
. ${RUN_LOG_DIR}/${RUN_ID}/zpios-config-run.sh
|
||||||
|
|
||||||
kill -s SIGHUP `cat ${PROFILE_PID}`
|
#kill -s SIGHUP `cat ${PROFILE_PID}`
|
||||||
rm -f ${PROFILE_PID}
|
#rm -f ${PROFILE_PID}
|
||||||
|
|
||||||
# opreport ${OPROFILE_SHORT_ARGS} >${OPROFILE_SHORT_LOG} 2>&1
|
OPROFILE_SHORT_ARGS="-a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
|
||||||
# opreport ${OPROFILE_LONG_ARGS} >${OPROFILE_LONG_LOG} 2>&1
|
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}
|
if [ -f ${PROFILE_ARC_PROC} ]; then
|
||||||
cat /proc/spl/kstat/zfs/vdev_cache_stats >${PROFILE_ZPIOS_VDEV_LOG}
|
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
|
# Summarize system time per pid
|
||||||
${PROFILE_ZPIOS_PIDS_BIN} ${RUN_LOG_DIR} ${RUN_ID} >${PROFILE_ZPIOS_PIDS_LOG}
|
${PROFILE_ZPIOS_PIDS_BIN} ${RUN_LOG_DIR} ${RUN_ID} >${PROFILE_ZPIOS_PIDS_LOG}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. ../common.sh
|
|
||||||
PROG=zpios-profile-pre.sh
|
PROG=zpios-profile-pre.sh
|
||||||
|
|
||||||
|
PROFILE_ZPIOS_READY=0
|
||||||
trap "PROFILE_ZPIOS_READY=1" SIGHUP
|
trap "PROFILE_ZPIOS_READY=1" SIGHUP
|
||||||
|
|
||||||
RUN_PRE=${0}
|
RUN_PRE=${0}
|
||||||
|
@ -21,51 +21,74 @@ RUN_THREAD_DELAY=${12}
|
||||||
RUN_FLAGS=${13}
|
RUN_FLAGS=${13}
|
||||||
RUN_RESULT=${14}
|
RUN_RESULT=${14}
|
||||||
|
|
||||||
PROFILE_ZPIOS_BIN=${IOPDIR}/scripts/zpios-profile/zpios-profile.sh
|
zpios_profile_run_cfg() {
|
||||||
PROFILE_ZPIOS_READY=0
|
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
|
OPROFILE_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile.txt
|
||||||
PROFILE_PID=${RUN_LOG_DIR}/${RUN_ID}/pid
|
OPROFILE_SHORT_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-short.txt
|
||||||
RUN_ARGS=${RUN_LOG_DIR}/${RUN_ID}/args
|
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
|
if [ "${RUN_PHASE}" != "pre" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -Rf ${RUN_LOG_DIR}/${RUN_ID}/
|
|
||||||
mkdir -p ${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}
|
. ${RUN_LOG_DIR}/zpios-config.sh
|
||||||
echo "LOG_DIR=${RUN_LOG_DIR}" >>${RUN_ARGS}
|
. ${RUN_LOG_DIR}/${RUN_ID}/zpios-config-run.sh
|
||||||
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
|
|
||||||
|
|
||||||
# Start the profile script
|
# Start the profile script
|
||||||
${PROFILE_ZPIOS_BIN} ${RUN_PHASE} ${RUN_LOG_DIR} ${RUN_ID} &
|
#${PROFILE_ZPIOS_BIN} ${RUN_PHASE} ${RUN_LOG_DIR} ${RUN_ID} &
|
||||||
echo "$!" >${PROFILE_PID}
|
#echo "$!" >${PROFILE_PID}
|
||||||
|
|
||||||
# Sleep waiting for profile script to be ready, it will
|
# Sleep waiting for profile script to be ready, it will
|
||||||
# signal us via SIGHUP when it is ready to start profiling.
|
# signal us via SIGHUP when it is ready to start profiling.
|
||||||
while [ ${PROFILE_ZPIOS_READY} -eq 0 ]; do
|
#while [ ${PROFILE_ZPIOS_READY} -eq 0 ]; do
|
||||||
sleep 0.1
|
# sleep 0.1
|
||||||
done
|
#done
|
||||||
|
|
||||||
# opcontrol --start-daemon >>${OPROFILE_LOG} 2>&1
|
/usr/bin/opcontrol --reset >>${OPROFILE_LOG} 2>&1
|
||||||
# opcontrol --start >>${OPROFILE_LOG} 2>&1
|
/usr/bin/opcontrol --start >>${OPROFILE_LOG} 2>&1
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,44 +1,45 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Usage: zpios
|
# Usage: zpios
|
||||||
# --chunksize -c =values
|
# --threadcount -t =values
|
||||||
# --chunksize_low -a =value
|
# --threadcount_low -l =value
|
||||||
# --chunksize_high -b =value
|
# --threadcount_high -h =value
|
||||||
# --chunksize_incr -g =value
|
# --threadcount_incr -e =value
|
||||||
# --offset -o =values
|
# --regioncount -n =values
|
||||||
# --offset_low -m =value
|
# --regioncount_low -i =value
|
||||||
# --offset_high -q =value
|
# --regioncount_high -j =value
|
||||||
# --offset_incr -r =value
|
# --regioncount_incr -k =value
|
||||||
# --regioncount -n =values
|
# --offset -o =values
|
||||||
# --regioncount_low -i =value
|
# --offset_low -m =value
|
||||||
# --regioncount_high -j =value
|
# --offset_high -q =value
|
||||||
# --regioncount_incr -k =value
|
# --offset_incr -r =value
|
||||||
# --threadcount -t =values
|
# --chunksize -c =values
|
||||||
# --threadcount_low -l =value
|
# --chunksize_low -a =value
|
||||||
# --threadcount_high -h =value
|
# --chunksize_high -b =value
|
||||||
# --threadcount_incr -e =value
|
# --chunksize_incr -g =value
|
||||||
# --regionsize -s =values
|
# --regionsize -s =values
|
||||||
# --regionsize_low -A =value
|
# --regionsize_low -A =value
|
||||||
# --regionsize_high -B =value
|
# --regionsize_high -B =value
|
||||||
# --regionsize_incr -C =value
|
# --regionsize_incr -C =value
|
||||||
# --cleanup -x
|
# --load -L =dmuio|ssf|fpp
|
||||||
# --verify -V
|
# --pool -p =pool name
|
||||||
# --zerocopy -z
|
# --cleanup -x
|
||||||
# --threaddelay -T =jiffies
|
# --prerun -P =pre-command
|
||||||
# --regionnoise -I =shift
|
# --postrun -R =post-command
|
||||||
# --chunknoise -N =bytes
|
# --log -G =log directory
|
||||||
# --prerun -P =pre-command
|
# --regionnoise -I =shift
|
||||||
# --postrun -R =post-command
|
# --chunknoise -N =bytes
|
||||||
# --log -G =log directory
|
# --threaddelay -T =jiffies
|
||||||
# --pool | --path -p =pool name
|
# --verify -V
|
||||||
# --load -L =dmuio
|
# --zerocopy -z
|
||||||
# --help -? =this help
|
# --nowait -O
|
||||||
# --verbose -v =increase verbosity
|
# --human-readable -H
|
||||||
|
# --verbose -v =increase verbosity
|
||||||
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--path=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--threadcount=16 \
|
--threadcount=16 \
|
||||||
--regioncount=8192 \
|
--regioncount=8192 \
|
||||||
--regionsize=4M \
|
--regionsize=4M \
|
||||||
|
|
|
@ -1,50 +1,52 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Usage: zpios
|
# Usage: zpios
|
||||||
# --chunksize -c =values
|
# --threadcount -t =values
|
||||||
# --chunksize_low -a =value
|
# --threadcount_low -l =value
|
||||||
# --chunksize_high -b =value
|
# --threadcount_high -h =value
|
||||||
# --chunksize_incr -g =value
|
# --threadcount_incr -e =value
|
||||||
# --offset -o =values
|
# --regioncount -n =values
|
||||||
# --offset_low -m =value
|
# --regioncount_low -i =value
|
||||||
# --offset_high -q =value
|
# --regioncount_high -j =value
|
||||||
# --offset_incr -r =value
|
# --regioncount_incr -k =value
|
||||||
# --regioncount -n =values
|
# --offset -o =values
|
||||||
# --regioncount_low -i =value
|
# --offset_low -m =value
|
||||||
# --regioncount_high -j =value
|
# --offset_high -q =value
|
||||||
# --regioncount_incr -k =value
|
# --offset_incr -r =value
|
||||||
# --threadcount -t =values
|
# --chunksize -c =values
|
||||||
# --threadcount_low -l =value
|
# --chunksize_low -a =value
|
||||||
# --threadcount_high -h =value
|
# --chunksize_high -b =value
|
||||||
# --threadcount_incr -e =value
|
# --chunksize_incr -g =value
|
||||||
# --regionsize -s =values
|
# --regionsize -s =values
|
||||||
# --regionsize_low -A =value
|
# --regionsize_low -A =value
|
||||||
# --regionsize_high -B =value
|
# --regionsize_high -B =value
|
||||||
# --regionsize_incr -C =value
|
# --regionsize_incr -C =value
|
||||||
# --cleanup -x
|
# --load -L =dmuio|ssf|fpp
|
||||||
# --verify -V
|
# --pool -p =pool name
|
||||||
# --zerocopy -z
|
# --cleanup -x
|
||||||
# --threaddelay -T =jiffies
|
# --prerun -P =pre-command
|
||||||
# --regionnoise -I =shift
|
# --postrun -R =post-command
|
||||||
# --chunknoise -N =bytes
|
# --log -G =log directory
|
||||||
# --prerun -P =pre-command
|
# --regionnoise -I =shift
|
||||||
# --postrun -R =post-command
|
# --chunknoise -N =bytes
|
||||||
# --log -G =log directory
|
# --threaddelay -T =jiffies
|
||||||
# --pool | --path -p =pool name
|
# --verify -V
|
||||||
# --load -L =dmuio
|
# --zerocopy -z
|
||||||
# --help -? =this help
|
# --nowait -O
|
||||||
# --verbose -v =increase verbosity
|
# --human-readable -H
|
||||||
|
# --verbose -v =increase verbosity
|
||||||
|
# --help -? =this help
|
||||||
|
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--path=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--threadcount=1 \
|
--threadcount=1 \
|
||||||
--regioncount=16 \
|
--regioncount=16 \
|
||||||
--regionsize=4M \
|
--regionsize=4M \
|
||||||
--chunksize=1M \
|
--chunksize=1M \
|
||||||
--offset=4M \
|
--offset=4M \
|
||||||
--cleanup \
|
--cleanup \
|
||||||
--verbose \
|
--verbose \
|
||||||
--human-readable \
|
--human-readable \
|
||||||
${ZPIOS_OPTIONS}"
|
${ZPIOS_OPTIONS}"
|
||||||
|
|
|
@ -1,44 +1,45 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Usage: zpios
|
# Usage: zpios
|
||||||
# --chunksize -c =values
|
# --threadcount -t =values
|
||||||
# --chunksize_low -a =value
|
# --threadcount_low -l =value
|
||||||
# --chunksize_high -b =value
|
# --threadcount_high -h =value
|
||||||
# --chunksize_incr -g =value
|
# --threadcount_incr -e =value
|
||||||
# --offset -o =values
|
# --regioncount -n =values
|
||||||
# --offset_low -m =value
|
# --regioncount_low -i =value
|
||||||
# --offset_high -q =value
|
# --regioncount_high -j =value
|
||||||
# --offset_incr -r =value
|
# --regioncount_incr -k =value
|
||||||
# --regioncount -n =values
|
# --offset -o =values
|
||||||
# --regioncount_low -i =value
|
# --offset_low -m =value
|
||||||
# --regioncount_high -j =value
|
# --offset_high -q =value
|
||||||
# --regioncount_incr -k =value
|
# --offset_incr -r =value
|
||||||
# --threadcount -t =values
|
# --chunksize -c =values
|
||||||
# --threadcount_low -l =value
|
# --chunksize_low -a =value
|
||||||
# --threadcount_high -h =value
|
# --chunksize_high -b =value
|
||||||
# --threadcount_incr -e =value
|
# --chunksize_incr -g =value
|
||||||
# --regionsize -s =values
|
# --regionsize -s =values
|
||||||
# --regionsize_low -A =value
|
# --regionsize_low -A =value
|
||||||
# --regionsize_high -B =value
|
# --regionsize_high -B =value
|
||||||
# --regionsize_incr -C =value
|
# --regionsize_incr -C =value
|
||||||
# --cleanup -x
|
# --load -L =dmuio|ssf|fpp
|
||||||
# --verify -V
|
# --pool -p =pool name
|
||||||
# --zerocopy -z
|
# --cleanup -x
|
||||||
# --threaddelay -T =jiffies
|
# --prerun -P =pre-command
|
||||||
# --regionnoise -I =shift
|
# --postrun -R =post-command
|
||||||
# --chunknoise -N =bytes
|
# --log -G =log directory
|
||||||
# --prerun -P =pre-command
|
# --regionnoise -I =shift
|
||||||
# --postrun -R =post-command
|
# --chunknoise -N =bytes
|
||||||
# --log -G =log directory
|
# --threaddelay -T =jiffies
|
||||||
# --pool | --path -p =pool name
|
# --verify -V
|
||||||
# --load -L =dmuio
|
# --zerocopy -z
|
||||||
# --help -? =this help
|
# --nowait -O
|
||||||
# --verbose -v =increase verbosity
|
# --human-readable -H
|
||||||
|
# --verbose -v =increase verbosity
|
||||||
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--path=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--threadcount=1,2,4,8,16,32,64,128,256 \
|
--threadcount=1,2,4,8,16,32,64,128,256 \
|
||||||
--regioncount=65536 \
|
--regioncount=65536 \
|
||||||
--regionsize=4M \
|
--regionsize=4M \
|
||||||
|
|
|
@ -1,44 +1,45 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Usage: zpios
|
# Usage: zpios
|
||||||
# --chunksize -c =values
|
# --threadcount -t =values
|
||||||
# --chunksize_low -a =value
|
# --threadcount_low -l =value
|
||||||
# --chunksize_high -b =value
|
# --threadcount_high -h =value
|
||||||
# --chunksize_incr -g =value
|
# --threadcount_incr -e =value
|
||||||
# --offset -o =values
|
# --regioncount -n =values
|
||||||
# --offset_low -m =value
|
# --regioncount_low -i =value
|
||||||
# --offset_high -q =value
|
# --regioncount_high -j =value
|
||||||
# --offset_incr -r =value
|
# --regioncount_incr -k =value
|
||||||
# --regioncount -n =values
|
# --offset -o =values
|
||||||
# --regioncount_low -i =value
|
# --offset_low -m =value
|
||||||
# --regioncount_high -j =value
|
# --offset_high -q =value
|
||||||
# --regioncount_incr -k =value
|
# --offset_incr -r =value
|
||||||
# --threadcount -t =values
|
# --chunksize -c =values
|
||||||
# --threadcount_low -l =value
|
# --chunksize_low -a =value
|
||||||
# --threadcount_high -h =value
|
# --chunksize_high -b =value
|
||||||
# --threadcount_incr -e =value
|
# --chunksize_incr -g =value
|
||||||
# --regionsize -s =values
|
# --regionsize -s =values
|
||||||
# --regionsize_low -A =value
|
# --regionsize_low -A =value
|
||||||
# --regionsize_high -B =value
|
# --regionsize_high -B =value
|
||||||
# --regionsize_incr -C =value
|
# --regionsize_incr -C =value
|
||||||
# --cleanup -x
|
# --load -L =dmuio|ssf|fpp
|
||||||
# --verify -V
|
# --pool -p =pool name
|
||||||
# --zerocopy -z
|
# --cleanup -x
|
||||||
# --threaddelay -T =jiffies
|
# --prerun -P =pre-command
|
||||||
# --regionnoise -I =shift
|
# --postrun -R =post-command
|
||||||
# --chunknoise -N =bytes
|
# --log -G =log directory
|
||||||
# --prerun -P =pre-command
|
# --regionnoise -I =shift
|
||||||
# --postrun -R =post-command
|
# --chunknoise -N =bytes
|
||||||
# --log -G =log directory
|
# --threaddelay -T =jiffies
|
||||||
# --pool | --path -p =pool name
|
# --verify -V
|
||||||
# --load -L =dmuio
|
# --zerocopy -z
|
||||||
# --help -? =this help
|
# --nowait -O
|
||||||
# --verbose -v =increase verbosity
|
# --human-readable -H
|
||||||
|
# --verbose -v =increase verbosity
|
||||||
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--path=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--threadcount=256 \
|
--threadcount=256 \
|
||||||
--regioncount=65536 \
|
--regioncount=65536 \
|
||||||
--regionsize=4M \
|
--regionsize=4M \
|
||||||
|
|
|
@ -1,44 +1,45 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# Usage: zpios
|
# Usage: zpios
|
||||||
# --chunksize -c =values
|
# --threadcount -t =values
|
||||||
# --chunksize_low -a =value
|
# --threadcount_low -l =value
|
||||||
# --chunksize_high -b =value
|
# --threadcount_high -h =value
|
||||||
# --chunksize_incr -g =value
|
# --threadcount_incr -e =value
|
||||||
# --offset -o =values
|
# --regioncount -n =values
|
||||||
# --offset_low -m =value
|
# --regioncount_low -i =value
|
||||||
# --offset_high -q =value
|
# --regioncount_high -j =value
|
||||||
# --offset_incr -r =value
|
# --regioncount_incr -k =value
|
||||||
# --regioncount -n =values
|
# --offset -o =values
|
||||||
# --regioncount_low -i =value
|
# --offset_low -m =value
|
||||||
# --regioncount_high -j =value
|
# --offset_high -q =value
|
||||||
# --regioncount_incr -k =value
|
# --offset_incr -r =value
|
||||||
# --threadcount -t =values
|
# --chunksize -c =values
|
||||||
# --threadcount_low -l =value
|
# --chunksize_low -a =value
|
||||||
# --threadcount_high -h =value
|
# --chunksize_high -b =value
|
||||||
# --threadcount_incr -e =value
|
# --chunksize_incr -g =value
|
||||||
# --regionsize -s =values
|
# --regionsize -s =values
|
||||||
# --regionsize_low -A =value
|
# --regionsize_low -A =value
|
||||||
# --regionsize_high -B =value
|
# --regionsize_high -B =value
|
||||||
# --regionsize_incr -C =value
|
# --regionsize_incr -C =value
|
||||||
# --cleanup -x
|
# --load -L =dmuio|ssf|fpp
|
||||||
# --verify -V
|
# --pool -p =pool name
|
||||||
# --zerocopy -z
|
# --cleanup -x
|
||||||
# --threaddelay -T =jiffies
|
# --prerun -P =pre-command
|
||||||
# --regionnoise -I =shift
|
# --postrun -R =post-command
|
||||||
# --chunknoise -N =bytes
|
# --log -G =log directory
|
||||||
# --prerun -P =pre-command
|
# --regionnoise -I =shift
|
||||||
# --postrun -R =post-command
|
# --chunknoise -N =bytes
|
||||||
# --log -G =log directory
|
# --threaddelay -T =jiffies
|
||||||
# --pool | --path -p =pool name
|
# --verify -V
|
||||||
# --load -L =dmuio
|
# --zerocopy -z
|
||||||
# --help -? =this help
|
# --nowait -O
|
||||||
# --verbose -v =increase verbosity
|
# --human-readable -H
|
||||||
|
# --verbose -v =increase verbosity
|
||||||
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--path=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--threadcount=4 \
|
--threadcount=4 \
|
||||||
--regioncount=1024 \
|
--regioncount=1024 \
|
||||||
--regionsize=4M \
|
--regionsize=4M \
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
|
|
||||||
. ./common.sh
|
. ./common.sh
|
||||||
PROG=zpios.sh
|
PROG=zpios.sh
|
||||||
|
DATE=`date +%Y%m%d-%H%M%S`
|
||||||
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/
|
|
||||||
|
|
||||||
MODULES=( \
|
MODULES=( \
|
||||||
${MODDIR}/zpios/zpios.ko \
|
${MODDIR}/zpios/zpios.ko \
|
||||||
|
@ -114,6 +111,43 @@ check_test() {
|
||||||
return 0
|
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=
|
PROFILE=
|
||||||
ZPOOL_CONFIG=zpool-config.sh
|
ZPOOL_CONFIG=zpool-config.sh
|
||||||
ZPIOS_TEST=zpios-test.sh
|
ZPIOS_TEST=zpios-test.sh
|
||||||
|
@ -139,6 +173,7 @@ while getopts 'hvpc:t:o:l:s:' OPTION; do
|
||||||
ZPOOL_CONFIG=${OPTARG}
|
ZPOOL_CONFIG=${OPTARG}
|
||||||
;;
|
;;
|
||||||
t)
|
t)
|
||||||
|
ZPIOS_TEST_ARG=${OPTARG}
|
||||||
ZPIOS_TEST=${TOPDIR}/scripts/zpios-test/${OPTARG}.sh
|
ZPIOS_TEST=${TOPDIR}/scripts/zpios-test/${OPTARG}.sh
|
||||||
;;
|
;;
|
||||||
o)
|
o)
|
||||||
|
@ -188,17 +223,19 @@ fi
|
||||||
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \
|
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \
|
||||||
-l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1
|
-l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1
|
||||||
|
|
||||||
if [ $PROFILE ]; then
|
if [ ${PROFILE} ]; then
|
||||||
ZPIOS_CMD="${ZPIOS_CMD} --log=${PROFILE_ZPIOS_LOG}"
|
zpios_profile_start
|
||||||
ZPIOS_CMD="${ZPIOS_CMD} --prerun=${PROFILE_ZPIOS_PRE}"
|
|
||||||
ZPIOS_CMD="${ZPIOS_CMD} --postrun=${PROFILE_ZPIOS_POST}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
date
|
echo "${DATE}"
|
||||||
zpios_start
|
zpios_start
|
||||||
zpios_stop
|
zpios_stop
|
||||||
|
|
||||||
|
if [ ${PROFILE} ]; then
|
||||||
|
zpios_profile_stop
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${VERBOSE} ]; then
|
if [ ${VERBOSE} ]; then
|
||||||
print_stats
|
print_stats
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue