hacks as of 9 mar
This commit is contained in:
parent
41ceec25dd
commit
c24e396a5d
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# thanks to @sebble for the basis for this script, he did the hard work:
|
||||||
|
# https://gist.github.com/sebble/e5af3d03700bfd31c62054488bfe8d4f
|
||||||
|
|
||||||
|
function list_starred_repos {
|
||||||
|
USER=${1:-sneak}
|
||||||
|
|
||||||
|
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
|
||||||
|
PAGES=$((658/100+1))
|
||||||
|
|
||||||
|
echo You have $STARS starred repositories. > /dev/stderr
|
||||||
|
|
||||||
|
# cloning
|
||||||
|
# https://github.com/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||||
|
# breaks github's auth system
|
||||||
|
REPOS=""
|
||||||
|
for PAGE in `seq $PAGES`; do
|
||||||
|
REPOS+=" $(
|
||||||
|
curl -sH "Accept: application/vnd.github.v3.star+json" "https://api.github.com/users/$USER/starred?per_page=100&page=$PAGE" |
|
||||||
|
jq -r '.[]|[.repo.full_name][0]' |
|
||||||
|
grep -v eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||||
|
)"
|
||||||
|
done
|
||||||
|
|
||||||
|
for REPO in $REPOS ; do
|
||||||
|
echo "$REPO"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetch_starred_repos {
|
||||||
|
for SHORTNAME in $(list_starred_repos); do
|
||||||
|
UN="$(echo $SHORTNAME | cut -d'/' -f1)"
|
||||||
|
if [[ ! -d "$SHORTNAME" ]]; then
|
||||||
|
if [[ ! -d "$UN" ]]; then
|
||||||
|
mkdir -p $UN
|
||||||
|
fi
|
||||||
|
git clone https://github.com/$SHORTNAME $SHORTNAME
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch_starred_repos
|
2
fsn1.disktest/.gitignore
vendored
2
fsn1.disktest/.gitignore
vendored
@ -1 +1 @@
|
|||||||
log.txt
|
*.txt
|
||||||
|
@ -7,10 +7,13 @@ runlog:
|
|||||||
script ./log.$(WHEN).txt bash -c "make run"
|
script ./log.$(WHEN).txt bash -c "make run"
|
||||||
|
|
||||||
run: sync
|
run: sync
|
||||||
ssh root@$(HOST) "bash /root/disktest.sh"
|
ssh root@$(HOST) "bash /root/disktest.sh 2>&1"
|
||||||
|
|
||||||
sync:
|
sync:
|
||||||
rsync -avP ./disktest.sh root@$(HOST):/root/disktest.sh
|
rsync -avP ./disktest.sh root@$(HOST):/root/disktest.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm log.*.txt
|
rm log.*.txt
|
||||||
|
|
||||||
|
results:
|
||||||
|
grep -ie 'cpu\|encryption\|zfs\|ashift\|64kchunk\|read\|write\|samsung' *.txt | grep -v groupid | grep -v '^readwrite' | grep -v echo | grep -v rm | grep -v Laying
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
set -e
|
|
||||||
|
|
||||||
date -u
|
|
||||||
zfs version
|
|
||||||
killall fio || true
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
RAWDISKS=$(
|
RAWDISKS=$(
|
||||||
cd /dev/disk/by-id ;
|
cd /dev/disk/by-id ;
|
||||||
@ -18,54 +12,124 @@ for RAWDISK in $RAWDISKS ; do
|
|||||||
FULLPATHS+=" /dev/disk/by-id/$RAWDISK"
|
FULLPATHS+=" /dev/disk/by-id/$RAWDISK"
|
||||||
done
|
done
|
||||||
|
|
||||||
PN="tank"
|
POOLNAME="tank"
|
||||||
MPT="/srv/z"
|
MPT="/srv/z"
|
||||||
|
JOBFILE="/tmp/jobfile.fio"
|
||||||
|
KEYLOC="/tmp/testkey.raw"
|
||||||
|
|
||||||
if [[ -e $MPT/.zfs ]]; then
|
function main() {
|
||||||
zpool destroy $PN
|
show_system_info
|
||||||
fi
|
prep_system
|
||||||
|
do_direct_tests
|
||||||
|
do_zfs_tests
|
||||||
|
}
|
||||||
|
|
||||||
lsblk -t
|
function do_direct_tests() {
|
||||||
|
trim_disks
|
||||||
|
for DISK in $FULLPATHS; do
|
||||||
|
print_divider
|
||||||
|
echo "testing $DISK"
|
||||||
|
for NJ in 1 16; do
|
||||||
|
for BS in 64k ; do
|
||||||
|
cat > $JOBFILE <<EOF
|
||||||
|
[test-${BS}chunk-${NJ}thread]
|
||||||
|
bs=$BS
|
||||||
|
filename=$DISK
|
||||||
|
iodepth=64
|
||||||
|
ioengine=libaio
|
||||||
|
readwrite=readwrite
|
||||||
|
numjobs=$NJ
|
||||||
|
size=$(expr 10000 / $NJ)M
|
||||||
|
runtime=60
|
||||||
|
time_based=1
|
||||||
|
group_reporting=1
|
||||||
|
EOF
|
||||||
|
cat $JOBFILE
|
||||||
|
fio $FO $JOBFILE 2>&1
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
for ASHIFTVAL in 12 13 14 15 16 ; do
|
function print_divider() {
|
||||||
|
echo '##############################################################'
|
||||||
|
echo '##############################################################'
|
||||||
|
}
|
||||||
|
|
||||||
|
function trim_disks() {
|
||||||
for DISK in $FULLPATHS ; do
|
for DISK in $FULLPATHS ; do
|
||||||
blkdiscard $DISK
|
blkdiscard $DISK
|
||||||
nvme format $DISK
|
nvme format -r $DISK
|
||||||
done
|
done
|
||||||
|
print_divider
|
||||||
|
echo "################## waiting 60s for nvme format to complete..."
|
||||||
|
sleep 60
|
||||||
|
nvme list
|
||||||
|
}
|
||||||
|
|
||||||
zpool create $PN \
|
|
||||||
|
function show_system_info() {
|
||||||
|
print_divider
|
||||||
|
date -u
|
||||||
|
lsb_release -a
|
||||||
|
uname -a
|
||||||
|
lsblk -t
|
||||||
|
nvme list
|
||||||
|
modinfo zfs | grep -iw version
|
||||||
|
modinfo spl | grep -iw version
|
||||||
|
zfs version
|
||||||
|
print_divider
|
||||||
|
}
|
||||||
|
|
||||||
|
function prep_system() {
|
||||||
|
killall fio || true
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
if [[ -e $MPT/.zfs ]]; then
|
||||||
|
zpool destroy $POOLNAME
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function do_zfs_tests() {
|
||||||
|
for ASHIFTVAL in 12 13 14 15 16 ; do
|
||||||
|
|
||||||
|
trim_disks
|
||||||
|
|
||||||
|
print_divider
|
||||||
|
|
||||||
|
zpool create $POOLNAME \
|
||||||
-o ashift=$ASHIFTVAL -O mountpoint=$MPT \
|
-o ashift=$ASHIFTVAL -O mountpoint=$MPT \
|
||||||
raidz1 $FULLPATHS
|
raidz1 $FULLPATHS
|
||||||
|
|
||||||
KEYLOC="/tmp/testkey.raw"
|
|
||||||
dd if=/dev/urandom of=$KEYLOC bs=32 count=1
|
dd if=/dev/urandom of=$KEYLOC bs=32 count=1
|
||||||
|
|
||||||
COMP="-o compression=lz4"
|
COMP="
|
||||||
ENC="-o encryption=aes-256-gcm -o keyformat=raw -o keylocation=file://$KEYLOC"
|
-o compression=lz4
|
||||||
|
"
|
||||||
|
ENC="
|
||||||
|
-o encryption=aes-256-gcm
|
||||||
|
-o keyformat=raw
|
||||||
|
-o keylocation=file://$KEYLOC
|
||||||
|
"
|
||||||
|
|
||||||
# plain
|
# plain
|
||||||
zfs create $PN/none
|
zfs create $POOLNAME/none
|
||||||
# compressed
|
# compressed
|
||||||
zfs create $COMP $PN/comp
|
zfs create $COMP $POOLNAME/comp
|
||||||
# encrypted
|
# encrypted
|
||||||
zfs create $ENC $PN/enc
|
zfs create $ENC $POOLNAME/enc
|
||||||
# compressed and encrypted
|
# compressed and encrypted
|
||||||
zfs create $COMP $ENC $PN/both
|
zfs create $COMP $ENC $POOLNAME/both
|
||||||
|
|
||||||
FO="--eta-newline=10 --eta-interval=10 --eta=always"
|
FO="--eta-newline=10 --eta-interval=10 --eta=always"
|
||||||
|
|
||||||
JF="/tmp/jobfile.fio"
|
for NJ in 1 16 ; do
|
||||||
rm -f $JF
|
for BS in 64k ; do
|
||||||
|
|
||||||
for NJ in 1 8 32 ; do
|
|
||||||
for BS in 64k 1M ; do
|
|
||||||
for DIRNAME in none comp enc both ; do
|
for DIRNAME in none comp enc both ; do
|
||||||
|
|
||||||
# 400000M comes from ~1.5x machine's ram size: 256G
|
cat > $JOBFILE <<EOF
|
||||||
cat >> $JF <<EOF
|
|
||||||
|
|
||||||
[test-$DIRNAME-${BS}chunk-${NJ}thread]
|
[test-$DIRNAME-${BS}chunk-${NJ}thread-ashift${ASHIFTVAL}]
|
||||||
bs=$BS
|
bs=$BS
|
||||||
directory=$MPT/$DIRNAME/
|
directory=$MPT/$DIRNAME/
|
||||||
iodepth=64
|
iodepth=64
|
||||||
@ -73,18 +137,20 @@ ioengine=libaio
|
|||||||
readwrite=readwrite
|
readwrite=readwrite
|
||||||
numjobs=$NJ
|
numjobs=$NJ
|
||||||
nrfiles=$NJ
|
nrfiles=$NJ
|
||||||
size=$(expr 400000 / $NJ)M
|
size=10000M
|
||||||
runtime=300
|
runtime=120
|
||||||
time_based=1
|
time_based=1
|
||||||
group_reporting=1
|
group_reporting=1
|
||||||
EOF
|
EOF
|
||||||
|
cat $JOBFILE
|
||||||
|
fio $FO $JOBFILE 2>&1
|
||||||
|
rm -rf $MPT/$DIRNAME/*
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
cat $JF
|
zpool destroy $POOLNAME
|
||||||
fio $FO $JF
|
|
||||||
zpool destroy $PN
|
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
||||||
|
19
nbg1.disktest/Makefile
Normal file
19
nbg1.disktest/Makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
HOST := nbg1.datavibe.net
|
||||||
|
WHEN := $(shell date -u +%Y-%m-%d.%H.%M.%S)
|
||||||
|
|
||||||
|
default: runlog
|
||||||
|
|
||||||
|
runlog:
|
||||||
|
script ./log.$(WHEN).txt bash -c "make run"
|
||||||
|
|
||||||
|
run: sync
|
||||||
|
ssh root@$(HOST) "bash /root/disktest.sh 2>&1"
|
||||||
|
|
||||||
|
sync:
|
||||||
|
rsync -avP ./disktest.sh root@$(HOST):/root/disktest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm log.*.txt
|
||||||
|
|
||||||
|
results:
|
||||||
|
grep -ie 'cpu\|encryption\|zfs\|ashift\|64kchunk\|read\|write\|samsung' *.txt | grep -v groupid | grep -v '^readwrite' | grep -v echo | grep -v rm | grep -v Laying
|
72
nbg1.disktest/disktest.sh
Normal file
72
nbg1.disktest/disktest.sh
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
POOLNAME="tank"
|
||||||
|
MPT="/srv/z"
|
||||||
|
JOBFILE="/tmp/jobfile.fio"
|
||||||
|
KEYLOC="/tmp/testkey.raw"
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
show_system_info
|
||||||
|
do_zfs_tests
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_divider() {
|
||||||
|
echo '##############################################################'
|
||||||
|
echo '##############################################################'
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_system_info() {
|
||||||
|
print_divider
|
||||||
|
date -u
|
||||||
|
lsb_release -a
|
||||||
|
uname -a
|
||||||
|
lsblk -t
|
||||||
|
nvme list
|
||||||
|
modinfo zfs | grep -iw version
|
||||||
|
modinfo spl | grep -iw version
|
||||||
|
zfs version
|
||||||
|
print_divider
|
||||||
|
}
|
||||||
|
|
||||||
|
function prep_system() {
|
||||||
|
killall fio || true
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function do_zfs_tests() {
|
||||||
|
print_divider
|
||||||
|
|
||||||
|
FO="--eta-newline=10 --eta-interval=10 --eta=always"
|
||||||
|
|
||||||
|
for NJ in 1 16 ; do
|
||||||
|
for BS in 64k ; do
|
||||||
|
for DIRNAME in none comp enc both ; do
|
||||||
|
|
||||||
|
cat > $JOBFILE <<EOF
|
||||||
|
|
||||||
|
[test-$DIRNAME-${BS}chunk-${NJ}thread]
|
||||||
|
bs=$BS
|
||||||
|
directory=$MPT/$DIRNAME/
|
||||||
|
iodepth=64
|
||||||
|
ioengine=libaio
|
||||||
|
readwrite=readwrite
|
||||||
|
numjobs=$NJ
|
||||||
|
nrfiles=$NJ
|
||||||
|
size=10000M
|
||||||
|
runtime=120
|
||||||
|
time_based=1
|
||||||
|
group_reporting=1
|
||||||
|
EOF
|
||||||
|
cat $JOBFILE
|
||||||
|
fio $FO $JOBFILE 2>&1
|
||||||
|
rm -rf $MPT/$DIRNAME/*
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
9
nbg1.disktest/log.2020-02-28.21.46.16.txt
Normal file
9
nbg1.disktest/log.2020-02-28.21.46.16.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Script started on Fri Feb 28 13:46:16 2020
|
||||||
|
command: bash -c make run
|
||||||
|
rsync -avP ./disktest.sh root@nbg1.datavibe.net:/root/disktest.sh
|
||||||
|
bash: rsync: command not found
|
||||||
|
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
|
||||||
|
rsync error: remote command not found (code 127) at io.c(226) [sender=3.1.3]
|
||||||
|
make[1]: *** [sync] Error 127
|
||||||
|
|
||||||
|
Script done on Fri Feb 28 13:46:16 2020
|
692
nbg1.disktest/log.2020-02-28.21.46.25.txt
Normal file
692
nbg1.disktest/log.2020-02-28.21.46.25.txt
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user