Skip to content
Snippets Groups Projects
Commit 776d039e authored by root's avatar root
Browse files

2018-04-11: FG; updated to current settings.

parent 27f3cb0d
No related branches found
No related tags found
No related merge requests found
Collezione di script/template per test con FIO. Scripts/Templates collection for FIO tests.
getInfo_v2.pl: used to extract info from FIO ver. 2 logfile.
getInfo.pl: used to extract info from FIO ver. 3 logfile.
export RUNTIME=200 export RUNTIME=240
export thePause=10 export thePause=20
export theSmlPause=5
export subDir=$1 export subDir=$1
if [ ! -d $PWD/$subDir ]; then if [ ! -d $PWD/$subDir ]; then
echo "La directory $subDir non esiste, esco." echo "La directory $subDir non esiste, esco."
...@@ -9,15 +10,15 @@ elif [ -z $subDir ]; then ...@@ -9,15 +10,15 @@ elif [ -z $subDir ]; then
exit 2 exit 2
fi fi
# for iodepth in 1 2 32 8 64 128 4 256 16 512 ; do for iodepth in 1 2 128 64 32 8 4 256 16 512 ; do
for iodepth in 64 256 128 4 16 ; do # for poolname in testFulvioSsd testFulvio.1 testFulvio.3; do
for poolname in test test2 test3; do for poolname in testFulvio.1 ; do
export POOLNAME=${poolname} export POOLNAME=${poolname}
export RBDNAME=testFio export RBDNAME=testFio
export IODEPTH=${iodepth} export IODEPTH=${iodepth}
for numjobs in 1 ; do for numjobs in 1 ; do
export NUMJOBS=${numjobs} export NUMJOBS=${numjobs}
for blocksize in 4k 64k 1M 4M ; do for blocksize in 4k 4M ; do
export BLOCKSIZE=${blocksize} export BLOCKSIZE=${blocksize}
for testtype in randwrite randread randrw ; do for testtype in randwrite randread randrw ; do
export TESTTYPE=${testtype} export TESTTYPE=${testtype}
...@@ -30,11 +31,16 @@ for iodepth in 64 256 128 4 16 ; do ...@@ -30,11 +31,16 @@ for iodepth in 64 256 128 4 16 ; do
echo " TESTTYPE: $TESTTYPE" echo " TESTTYPE: $TESTTYPE"
echo " " echo " "
export fileSuff=${POOLNAME}_${RBDNAME}_${TESTTYPE}_i${IODEPTH}_n${NUMJOBS}_b${BLOCKSIZE} export fileSuff=${POOLNAME}_${RBDNAME}_${TESTTYPE}_i${IODEPTH}_n${NUMJOBS}_b${BLOCKSIZE}
cat rbd_fio_template.txt | sed -e "s/POOLNAME/$POOLNAME/" -e "s/RBDNAME/$RBDNAME/" -e "s/IODEPTH/$IODEPTH/" -e "s/NUMJOBS/$NUMJOBS/" -e "s/BLOCKSIZE/$BLOCKSIZE/" -e "s/RUNTIME/$RUNTIME}/" -e "s/TESTTYPE/$TESTTYPE/" > ${subDir}/rbd_${fileSuff}.txt if [ ! -e ${subDir}/rbd_${fileSuff}.log ]; then
sync ; sleep 2 cat rbd_fio_template.txt | sed -e "s/POOLNAME/$POOLNAME/" -e "s/RBDNAME/$RBDNAME/" -e "s/IODEPTH/$IODEPTH/" -e "s/NUMJOBS/$NUMJOBS/" -e "s/BLOCKSIZE/$BLOCKSIZE/" -e "s/RUNTIME/$RUNTIME/" -e "s/TESTTYPE/$TESTTYPE/" > ${subDir}/rbd_${fileSuff}.txt
echo "Executing: fio --output=rbd_${fileSuff}.log rbd_${fileSuff}.txt" sync ; sleep 2
fio --output=${subDir}/rbd_${fileSuff}.log ${subDir}/rbd_${fileSuff}.txt echo "Executing: fio --output=${subDir}/rbd_${fileSuff}.log ${subDir}/rbd_${fileSuff}.txt"
sync ; echo "done rbd_${fileSuff}.txt" ; sleep $thePause fio --output=${subDir}/rbd_${fileSuff}.log ${subDir}/rbd_${fileSuff}.txt
sync ; echo "done rbd_${fileSuff}.txt"
echo "Sleep $thePause at `date`" ; sleep $thePause
else
echo "SKIPPED, sleep $theSmlPause at `date`" ; sleep $theSmlPause
fi
done done
done done
done done
......
...@@ -22,7 +22,7 @@ while (<FILE>) { ...@@ -22,7 +22,7 @@ while (<FILE>) {
$line = $_; $line = $_;
$i++; $i++;
if ($i == 1) { if ($i == 1) {
if ($line =~ /.*rw=(\S+),\s+bs=(\S+?)-\S+ ioengine=(\S+),\s+iodepth=(\d+)/) { if ($line =~ /.*rw=(\S+),\s+bs=.* (\S+)-\S+.*, ioengine=(\S+),\s+iodepth=(\d+)/) {
( $testName, $blockSize, $testEngine, $ioDepth ) = ( $1, $2, $3, $4); ( $testName, $blockSize, $testEngine, $ioDepth ) = ( $1, $2, $3, $4);
$hashTest{'all'}{'aType'} = $testName; $hashTest{'all'}{'aType'} = $testName;
$hashTest{'all'}{'aBsize'} = $blockSize; $hashTest{'all'}{'aBsize'} = $blockSize;
...@@ -37,13 +37,13 @@ while (<FILE>) { ...@@ -37,13 +37,13 @@ while (<FILE>) {
$hashTest{'all'}{'aCpuU'} = $1; $hashTest{'all'}{'aCpuU'} = $1;
$hashTest{'all'}{'aCpuS'} = $2; $hashTest{'all'}{'aCpuS'} = $2;
} }
if ($line =~ /(\S+)\s*: io=([0-9]*\.?[0-9]+)(\S+), bw=([0-9]*\.?[0-9]+)(\S+), iops=(\d+), runt=(\d+)(\S+)/) { if ($line =~ /(\S+)\s*: IOPS=(\d+), BW=([0-9]*\.?[0-9]+)(\S+)\s+\(\S+\)\(([0-9]*\.?[0-9]+)(\S+)\/(\d+)(\S+)\)/) {
$theTest = $1; $theTest = $1;
$hashTest{$theTest}{'iot'} = $2; $hashTest{$theTest}{'iot'} = $5;
$hashTest{$theTest}{'iotunit'} = $3; $hashTest{$theTest}{'iotunit'} = $6;
$hashTest{$theTest}{'bw'} = $4; $hashTest{$theTest}{'bw'} = $3;
$hashTest{$theTest}{'bwunit'} = $5; $hashTest{$theTest}{'bwunit'} = $4;
$hashTest{$theTest}{'iops'} = $6; $hashTest{$theTest}{'iops'} = $2;
$hashTest{$theTest}{'rt'} = $7; $hashTest{$theTest}{'rt'} = $7;
$hashTest{$theTest}{'rtunit'} = $8; $hashTest{$theTest}{'rtunit'} = $8;
$clatUnit = ""; $clatUnit = "";
......
#!/usr/bin/perl
my $file = $ARGV[0];
open(FILE,"<$file") || die "Cannot open file $file: $!\n";
$testName = "";
$blockSize= "";
$testEngine="";
$ioDepth=0;
$cpuU=0;
$cpuS=0;
$i=0;
$nProc=0;
%hashTest = ();
my @clat = ("50.00th", "90.00th", "95.00th", "99.00th");
while (<FILE>) {
$line = $_;
$i++;
if ($i == 1) {
if ($line =~ /.*rw=(\S+),\s+bs=(\S+?)-\S+ ioengine=(\S+),\s+iodepth=(\d+)/) {
( $testName, $blockSize, $testEngine, $ioDepth ) = ( $1, $2, $3, $4);
$hashTest{'all'}{'aType'} = $testName;
$hashTest{'all'}{'aBsize'} = $blockSize;
$hashTest{'all'}{'aTestEngine'} = $testEngine;
$hashTest{'all'}{'aIOdepth'} = $ioDepth;
}
}
if ($line =~ /^Starting (\d+)/) {
$hashTest{'all'}{'aNproc'} = $1;
}
if ($line =~ /.*cpu.*usr=([0-9]*\.[0-9]+)%,\s+sys=([0-9]*\.[0-9]+)%,/) {
$hashTest{'all'}{'aCpuU'} = $1;
$hashTest{'all'}{'aCpuS'} = $2;
}
if ($line =~ /(\S+)\s*: io=([0-9]*\.?[0-9]+)(\S+), bw=([0-9]*\.?[0-9]+)(\S+), iops=(\d+), runt=(\d+)(\S+)/) {
$theTest = $1;
$hashTest{$theTest}{'iot'} = $2;
$hashTest{$theTest}{'iotunit'} = $3;
$hashTest{$theTest}{'bw'} = $4;
$hashTest{$theTest}{'bwunit'} = $5;
$hashTest{$theTest}{'iops'} = $6;
$hashTest{$theTest}{'rt'} = $7;
$hashTest{$theTest}{'rtunit'} = $8;
$clatUnit = "";
do {
my $l = <FILE>;
if ( $l =~ /clat percentiles \((\w+)\)/ ) {
$clatUnit = $1;
$hashTest{$theTest}{"clatUnit"} = $clatUnit;
$endClat = 0;
do {
my $l2 = <FILE>;
$endClat = 1 if ( $l2 !~ /,\s+$/);
for $aClat ( @clat ) {
if ( $l2 =~ /$aClat=\[\s*(\d+)\]/) {
$hashTest{$theTest}{"clat".$aClat} = $1;
}
}
} while (! $endClat);
}
} while ($clatUnit eq "");
}
}
my $lineT = "";
my $lineV = "";
my $sep = ",";
my $counter = 0;
for $test ( sort keys %hashTest ) {
$counter++;
if ( $counter == 1 ) {
$lineT .= "a".$test;
$lineV .= $test;
} else {
$lineT .= $sep.$test;
$lineV .= $sep.$test;
}
print "DEBUG: $test \t";
for $item ( sort keys %{ $hashTest{$test} } ) {
print " $item=$hashTest{$test}{$item}";
$lineT .= $sep.$item;
$lineV .= $sep.$hashTest{$test}{$item};
}
print "\n";
}
print "DEBUG: $file was a:\t test $testName with bs=$blockSize engine=$testEngine ioDepth=$ioDepth nProc=$nProc\n";
print "$lineT\n$lineV\n";
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
# http://rajaseelan.com/2009/07/29/generate-files-with-random-content-and-size-in-bash/ # http://rajaseelan.com/2009/07/29/generate-files-with-random-content-and-size-in-bash/
# #
######## User settings ############ ######## User settings ############
MAXDIRS=50 MAXDIRS=20
MAXDEPTH=5 MAXDEPTH=5
MAXFILES=5 MAXFILES=5
# Max Size in kB # Max Size in kB
MAXSIZE=4000000 MAXSIZE=2000000
# Maximum fraction of filesystem to fill # Maximum fraction of filesystem to fill
MAXFRACTION=90 MAXFRACTION=90
######## End of user settings ############ ######## End of user settings ############
...@@ -30,7 +30,7 @@ else ...@@ -30,7 +30,7 @@ else
echo "Dir $baseDir does not exist, exiting now" echo "Dir $baseDir does not exist, exiting now"
exit 2 exit 2
fi fi
sleep 5 sleep 3
# How deep in the file system are we now? # How deep in the file system are we now?
TOP=`pwd|tr -cd '/'|wc -c` TOP=`pwd|tr -cd '/'|wc -c`
...@@ -38,6 +38,7 @@ TOP=`pwd|tr -cd '/'|wc -c` ...@@ -38,6 +38,7 @@ TOP=`pwd|tr -cd '/'|wc -c`
populate() { populate() {
cd $1 cd $1
curdir=$PWD curdir=$PWD
echo "Current dir now: $curdir"
files=$(($RANDOM*$MAXFILES/32767)) files=$(($RANDOM*$MAXFILES/32767))
for n in `seq $files` for n in `seq $files`
...@@ -70,6 +71,7 @@ populate() { ...@@ -70,6 +71,7 @@ populate() {
for dir in $dirlist for dir in $dirlist
do do
echo "...loop populate path: $dir"
populate "$dir" populate "$dir"
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment