Skip to content
Snippets Groups Projects
Commit e2f8760c authored by Fulvio Galeazzi's avatar Fulvio Galeazzi
Browse files

2017-04-03: FG; Initial commit.

2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
2017-04-03:  FG;  Initial commit.
parents
No related branches found
No related tags found
No related merge requests found
Collezione di script/template per test con FIO.
# export PARTITION=/srv/node/test/fio/
export IOENGINE=rbd
export theTime=15
export thePause=10
for partition in /mnt/rbdTestSsd /mnt/rbdTestBackup /mnt/rbdTestCinder /mnt/rbdTestCinderFast /mnt/rbdTestVolFG /mnt/rbdTestGlance ; do
export PARTITION=${partition}
echo " "
echo " Partition is: $PARTITION"
echo " "
baseDirName=`basename $PARTITION`
for iodepth in 1 ; do
# for iodepth in 1 2 4 8 ; do
export IODEPTH=${iodepth}
echo " "
echo " IODEPTH now $IODEPTH"
echo " "
for numjobs in 1 2 16 4 ; do
# for numjobs in 1 16 4 32 ; do
export NUMJOBS=${numjobs}
echo " "
echo " NUMJOBS now $NUMJOBS"
echo " "
for blocksize in 4k 4M 64k 1M ; do
# for blocksize in 4k 4M 128k ; do
export BLOCKSIZE=${blocksize}
export SIZE=4G
echo " "
echo " BLOCKSIZE now $BLOCKSIZE"
echo " "
for i in 3 4 5 ; do
echo "FIO test ${i}: Io=${IODEPTH} Num=${NUMJOBS} bs=${BLOCKSIZE} size=${SIZE}"
sync ; sleep 2
echo "Executing: fio --time_based --runtime=${theTime} --output=${baseDirName}_i-${IODEPTH}_n-${NUMJOBS}_b-${BLOCKSIZE}_s-${SIZE}_j-${i}.log mix_fio_group_job${i}.txt"
fio --time_based --runtime=${theTime} --output=${baseDirName}_i-${IODEPTH}_n-${NUMJOBS}_b-${BLOCKSIZE}_s-${SIZE}_j-${i}.log mix_fio_group_job${i}.txt
sync ; echo "done ${baseDirName}_i-${IODEPTH}_n-${NUMJOBS}_b-${BLOCKSIZE}_s-${SIZE}_j-${i}.log" ; sleep $thePause
done
done
done
done
done
export RUNTIME=200
export thePause=10
# for poolname in oscinder-ba oscinder-ba-fast osbackup-ba ssd-ba ; do
for poolname in oscinder-ba ssd-ba ; do
export POOLNAME=${poolname}
export RBDNAME=testFio
for iodepth in 1 2 32 8 64; do
export IODEPTH=${iodepth}
for numjobs in 1 4 ; do
export NUMJOBS=${numjobs}
for blocksize in 4k 4M 64k 1M ; do
export BLOCKSIZE=${blocksize}
for testtype in randwrite randread randrw ; do
export TESTTYPE=${testtype}
echo " "
echo " Pool Name is: $POOLNAME"
echo " Volume is: $RBDNAME"
echo " IODEPTH: $IODEPTH"
echo " NUMJOBS: $NUMJOBS"
echo " BLOCKSIZE: $BLOCKSIZE"
echo " TESTTYPE: $TESTTYPE"
echo " "
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/" > rbd_${fileSuff}.txt
sync ; sleep 2
echo "Executing: fio/fio --output=rbd_${fileSuff}.log rbd_${fileSuff}.txt"
./fio/fio --output=rbd_${fileSuff}.log rbd_${fileSuff}.txt
sync ; echo "done rbd_${fileSuff}.txt" ; sleep $thePause
done
done
done
done
done
#!/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";
[global]
ioengine=${IOENGINE}
thread=1
direct=1
# gtod_reduce=1
iodepth=${IODEPTH}
numjobs=${NUMJOBS}
ramp_time=20
group_reporting
size=${SIZE}
bs=${BLOCKSIZE}
directory=${PARTITION}/fio
# write_iops_log=mix_job1_iops
# write_lat_log=mix_job1_lat
# write_bw_log=mix_job1_bw
[trivial-seqread]
new_group
name=seqread
description=seqread
rw=read
[global]
ioengine=${IOENGINE}
thread=1
direct=1
# gtod_reduce=1
iodepth=${IODEPTH}
numjobs=${NUMJOBS}
ramp_time=20
group_reporting
size=${SIZE}
bs=${BLOCKSIZE}
directory=${PARTITION}/fio
# write_iops_log=mix_job2_iops
# write_lat_log=mix_job2_lat
# write_bw_log=mix_job2_bw
[trivial-seqwrite]
new_group
name=seqwrite
description=seqwrite
rw=write
[global]
ioengine=${IOENGINE}
thread=1
direct=1
# gtod_reduce=1
iodepth=${IODEPTH}
numjobs=${NUMJOBS}
ramp_time=20
group_reporting
size=${SIZE}
bs=${BLOCKSIZE}
directory=${PARTITION}/fio
# write_iops_log=mix_job3_iops
# write_lat_log=mix_job3_lat
# write_bw_log=mix_job3_bw
[trivial-randread]
new_group
name=randread
description=randread
rw=randread
[global]
ioengine=${IOENGINE}
thread=1
direct=1
# gtod_reduce=1
iodepth=${IODEPTH}
numjobs=${NUMJOBS}
ramp_time=20
group_reporting
size=${SIZE}
bs=${BLOCKSIZE}
directory=${PARTITION}/fio
# write_iops_log=mix_job4_iops
# write_lat_log=mix_job4_lat
# write_bw_log=mix_job4_bw
[trivial-randwrite]
new_group
name=randwrite
description=randwrite
rw=randwrite
[global]
ioengine=${IOENGINE}
thread=1
direct=1
# gtod_reduce=1
iodepth=${IODEPTH}
numjobs=${NUMJOBS}
ramp_time=20
group_reporting
size=${SIZE}
bs=${BLOCKSIZE}
directory=${PARTITION}/fio
# write_iops_log=mix_job5_iops
# write_lat_log=mix_job5_lat
# write_bw_log=mix_job5_bw
[trivial-randrw]
new_group
name=randrw
description=randrw
rw=randrw
rwmixread=70
rwmixwrite=30
[global]
ioengine=rbd
randrepeat=0
ramp_time=10
group_reporting
clientname=admin
pool=POOLNAME
rbdname=RBDNAME
invalidate=0 # mandatory
bs=BLOCKSIZE
direct=1
time_based=1
runtime=RUNTIME
numjobs=NUMJOBS
rw=TESTTYPE
rwmixread=70
rwmixwrite=30
[rbd_iodepthIODEPTH]
iodepth=IODEPTH
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