Definitions and Objectives |
|
Copyright 2001 by Constantin Loizides, loizides AT informatik DOT uni-frankfurt DOT de
Last changes:
Do Feb 5 09:40:02 CET 2004
|
Journaling-Filesystem Fragmentation Project
Tool: Read
|
Description
To measure the read performance of a file system or given directories I have written a small program called read.
It recursively walks through a directory using the ''readdir'' system call, stating the content
of it. Finding a directory it immediately steps into it, finding a regular file
it sequentially reads it accounting the file size and time needed, finding something else eg. a symbolic link
it does nothing. The path to the files is stored in two structures, one for the directory part of the path
and one for the file part of the path (''#define READTEST'').
This information is used in the second part of the program (''#define READRANDOM'') where read randomly chooses
a file again measuring the sequential time needed for reading. The amount of data tested in this part depends on
the -n and -l option (see below). Recently I have added another test (''#define FIBTEST'') which gets
for each file the logical first block. This list is sorted ascendingly. Then all files with logical starting blocks greater
than zero a read in a row. The idea behind that test is that for unfragmented files the disc access should be optimally fed
whereas for fragmented files the disc must do intermediate seeks. At the end it prints a statistic record for the different reading tests.
Download
You may download read and try it yourself.
After downloading the package create a directory where to untargz it. In the Makefile you probably
want to change some paths. Then type ''make read'' followed by ''read -h'' to get additional help.
Usage of read v0.3 (READTEST defined)
-b blksize blocksize to use for buffered i/o
-d dirname change to directory "dirname"
-h,-? this text
-v be verbose
-p maxd:maxf set # of maxdirs and maxfiles
-n files set # files to random read
-l kbytes set # kbytes to random read
-y seed set random generator seed
-z sync with unmount
The shown options depend on the different ''#defines'' used for read!
The output of it may look as follows (see below for a explanation)
Total: 54724 files (891339211 Bytes in 3.002054e+02) in 4 dirs
with average of 2.899509e+03 KB/sek
0: 4.855110e+00 7.600000e-01 4922002
1: 4.746385e+00 6.000000e-01 13884832
2: 6.967035e+00 1.160000e+00 43289711
3: 1.229480e+01 1.630000e+00 77944684
4: 4.374306e+00 3.700000e-01 29977426
5: 2.884645e+00 2.000000e-01 23291028
6: 8.054268e+00 6.400000e-01 78524537
7: 1.385379e+01 1.010000e+00 146934243
8: 4.277286e+00 3.000000e-01 50414343
9: 4.138677e+00 2.000000e-01 48348754
10: 1.197160e+01 6.100000e-01 108320315
11: 2.269782e+01 1.300000e+00 227565000
12: 3.569340e+00 2.600000e-01 37922336
13: 0.000000e+00 0.000000e+00 0
14: 0.000000e+00 0.000000e+00 0
15: 0.000000e+00 0.000000e+00 0
16: 0.000000e+00 0.000000e+00 0
17: 0.000000e+00 0.000000e+00 0
18: 0.000000e+00 0.000000e+00 0
19: 0.000000e+00 0.000000e+00 0
Random Total: 63455 files (1014033443 Bytes in 1.878498e+03) in 4 dirs
with average of 5.271590e+02 KB/sek
0: 2.838117e+02 3.992000e+01 5731340
1: 2.708796e+02 3.786000e+01 16032670
2: 4.298905e+02 5.891000e+01 49993220
3: 4.546828e+02 5.659000e+01 91299298
4: 9.781208e+01 1.168000e+01 34662293
5: 4.000877e+01 4.160000e+00 27462498
6: 7.242944e+01 7.400000e+00 91378876
7: 8.469546e+01 7.420000e+00 164343770
8: 1.974880e+01 1.470000e+00 58051485
9: 1.388201e+01 9.700000e-01 59320910
10: 2.540394e+01 1.410000e+00 124519682
11: 4.965344e+01 2.140000e+00 264994031
12: 7.768365e+00 1.800000e-01 26243370
13: 0.000000e+00 0.000000e+00 0
14: 0.000000e+00 0.000000e+00 0
15: 0.000000e+00 0.000000e+00 0
16: 0.000000e+00 0.000000e+00 0
17: 0.000000e+00 0.000000e+00 0
There are two lines for the two different parts (starting with ''Total'' and ''Random Total'') giving
the overall results in KB per second and some additional information of how many directories
were found in total and how many files in total with a total number of bytes in a total number of seconds were read.
The other output lines are two histograms one for each part of the test coding the file size before the colon
and then the time in seconds, the cpu time in seconds and the total number of bytes for that file size.
The file size is calculated as follows: If the number in front of the colon is ''i'', then the files accounting to
that row of the histogram were smaller or equal to 1024 Byte times 2 to the power of ''i'' or in other words
smaller than 2 to the power of ''i'' KB.
|