Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # latency: /dev/nbd1 10809
- # throughput: /dev/nbd2 10810
- set -e
- USER=$(whoami)
- sudo echo got a password
- fallocate -l 64g latency.img
- fallocate -l 64g throughput.img
- # in case of old files... clear up
- wipefs -a ./latency.img
- wipefs -a ./throughput.img
- rm -v latency.txt throughput.txt || echo cannot delete stats
- nbdkit --filter=exitlast --filter=stats file latency.img statsfile=latency.txt
- nbdkit -p 10810 --filter=exitlast --filter=stats file throughput.img statsfile=throughput.txt
- sudo nbd-client localhost /dev/nbd1
- sudo nbd-client localhost 10810 /dev/nbd2
- sudo zpool create latency /dev/nbd1
- sudo zpool create throughput /dev/nbd2
- sudo zfs set logbias=throughput throughput
- sudo chown ${USER}:${USER} /latency
- sudo chown ${USER}:${USER} /throughput
- OLD=$(pwd)
- cd /throughput
- fio --rw=randrw --fsync=1 --sync_file_range=write --name=throughput --size=256m --output=${OLD}/throughput.fio
- cd /latency
- fio --rw=randrw --fsync=1 --sync_file_range=write --name=latency --size=256m --output=${OLD}/latency.fio
- cd ${OLD}
- sudo zpool export latency
- sudo zpool export throughput
- sudo nbd-client -d /dev/nbd1
- sudo nbd-client -d /dev/nbd2
Advertisement
Add Comment
Please, Sign In to add comment