Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fiotest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSD
public
fiotest
Commits
27f3cb0d
Commit
27f3cb0d
authored
8 years ago
by
Fulvio @Gmail
Browse files
Options
Downloads
Patches
Plain Diff
2017-04-26: FG; Utilizzato su ba1:r1srv05.
parent
e2f8760c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doFioLoopRbd.sh
+19
-10
19 additions, 10 deletions
doFioLoopRbd.sh
populate.sh
+77
-0
77 additions, 0 deletions
populate.sh
with
96 additions
and
10 deletions
doFioLoopRbd.sh
+
19
−
10
View file @
27f3cb0d
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
subDir
=
$1
if
[
!
-d
$PWD
/
$subDir
]
;
then
echo
"La directory
$subDir
non esiste, esco."
exit
1
elif
[
-z
$subDir
]
;
then
echo
"Manca la directory di destinazione, esco."
exit
2
fi
# for iodepth in 1 2 32 8 64 128 4 256 16 512 ; do
for
iodepth
in
64 256 128 4 16
;
do
for
poolname
in
test
test2 test3
;
do
export
POOLNAME
=
${
poolname
}
export
RBDNAME
=
testFio
export
IODEPTH
=
${
iodepth
}
for
numjobs
in
1
4
;
do
for
numjobs
in
1
;
do
export
NUMJOBS
=
${
numjobs
}
for
blocksize
in
4k
4M
64k 1M
;
do
for
blocksize
in
4k 64k 1M
4M
;
do
export
BLOCKSIZE
=
${
blocksize
}
for
testtype
in
randwrite randread randrw
;
do
export
TESTTYPE
=
${
testtype
}
...
...
@@ -21,10 +30,10 @@ for poolname in oscinder-ba ssd-ba ; do
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
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
sync
;
sleep
2
echo
"Executing: fio
/fio
--output=rbd_
${
fileSuff
}
.log rbd_
${
fileSuff
}
.txt"
./fio/
fio
--output
=
rbd_
${
fileSuff
}
.log rbd_
${
fileSuff
}
.txt
echo
"Executing: fio --output=rbd_
${
fileSuff
}
.log rbd_
${
fileSuff
}
.txt"
fio
--output
=
${
subDir
}
/
rbd_
${
fileSuff
}
.log
${
subDir
}
/
rbd_
${
fileSuff
}
.txt
sync
;
echo
"done rbd_
${
fileSuff
}
.txt"
;
sleep
$thePause
done
done
...
...
This diff is collapsed.
Click to expand it.
populate.sh
0 → 100755
+
77
−
0
View file @
27f3cb0d
#!/bin/bash
# Created by Ben Okopnik on Wed Jul 16 18:04:33 EDT 2008
#
# Original script at:
# http://linuxgazette.net/153/pfeiffer.html
# Modified for 'dd' according to:
# http://rajaseelan.com/2009/07/29/generate-files-with-random-content-and-size-in-bash/
#
######## User settings ############
MAXDIRS
=
50
MAXDEPTH
=
5
MAXFILES
=
5
# Max Size in kB
MAXSIZE
=
4000000
# Maximum fraction of filesystem to fill
MAXFRACTION
=
90
######## End of user settings ############
export
baseDir
=
$1
echo
"Arg
$1
baseDir
$baseDir
"
if
[
-z
"
$baseDir
"
]
;
then
echo
"Need to use as:
$0
<initialDir>"
echo
" Exiting now"
exit
1
fi
if
[
-d
"
$baseDir
"
]
;
then
echo
"About to populate path:
$baseDir
"
cd
$baseDir
else
echo
"Dir
$baseDir
does not exist, exiting now"
exit
2
fi
sleep
5
# How deep in the file system are we now?
TOP
=
`
pwd
|tr
-cd
'/'
|wc
-c
`
populate
()
{
cd
$1
curdir
=
$PWD
files
=
$((
$RANDOM
*
$MAXFILES
/
32767
))
for
n
in
`
seq
$files
`
do
f
=
`
mktemp
XXXXXX
`
size
=
$((
$RANDOM
*
$MAXSIZE
/
32767
))
# head -c $size /dev/urandom > $f
fracUsed
=
`
df
-P
-k
$baseDir
|
tail
-1
|
awk
'{print $(NF-1)}'
|
sed
-e
's/%$//'
`
if
[[
$fracUsed
-ge
$MAXFRACTION
]]
;
then
echo
"Reached requested occupation (
${
fracUsed
}
%) so exiting now"
return
fi
echo
"Command (fracUsed=
${
fracUsed
}
): dd bs=1K count=
$size
skip=
$RANDOM
if=/dev/urandom of=
$f
"
dd
bs
=
1K
count
=
$size
skip
=
$RANDOM
if
=
/dev/urandom
of
=
${
curdir
}
/
$f
done
depth
=
`
pwd
|tr
-cd
'/'
|wc
-c
`
if
[
$((
$depth
-
$TOP
))
-ge
$MAXDEPTH
]
then
return
fi
unset
dirlist
dirs
=
$((
$RANDOM
*
$MAXDIRS
/
32767
))
for
n
in
`
seq
$dirs
`
do
d
=
`
mktemp
-d
XXXXXX
`
dirlist
=
"
$dirlist
${
dirlist
:+
}
$PWD
/
$d
"
done
for
dir
in
$dirlist
do
populate
"
$dir
"
done
}
populate
$baseDir
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment