1bonnie++(8)                 System Manager's Manual                bonnie++(8)
2
3
4

NAME

6       bonnie++ - program to test hard drive performance.
7
8

SYNOPSIS

10       bonnie++  [-d  dir] [-c concurrency] [-s size(MiB)[:chunk-size(b)]] [-n
11       number-to-stat(*1024)[:max-size[:min-size][:num-directo‐
12       ries[:chunk-size]]]]  [-m  machine-name]  [-r ram-size-in-MiB] [-x num‐
13       ber-of-tests]  [-u  uid-to-use:gid-to-use]  [-g  gid-to-use]  [-q]  [-f
14       size-for-char-io]  [-b]  [-D]  [-p processes | -y p|s ] [-z seed-num|-Z
15       random-file]
16
17

DESCRIPTION

19       This manual page documents briefly the bonnie++, program.
20
21       Bonnie++ is a program to test hard drives and file systems for  perfor‐
22       mance or the lack therof. There are a many different types of file sys‐
23       tem operations which different applications use to  different  degrees.
24       Bonnie++  tests  some  of  them and for each test gives a result of the
25       amount of work done per second and the  percentage  of  CPU  time  this
26       took.  For performance results higher numbers are better, for CPU usage
27       and latency lower are better (NB a configuration scoring a  performance
28       result  of  2000  and a CPU result of 90% is better in terms of CPU use
29       than a configuration delivering performance of 1000 and  CPU  usage  of
30       60%).
31
32       There  are  two  sections  to the program's operations. The first is to
33       test the IO throughput in a fashion that is designed to  simulate  some
34       types  of  database applications. The second is to test creation, read‐
35       ing, and deleting many small files in a fashion similar  to  the  usage
36       patterns of programs such as Squid or INN.
37
38       All the details of the tests performed by Bonnie++ are contained in the
39       file /usr/share/doc/bonnie++/readme.html
40
41

OPTIONS

43       For Bonnie++ every option is of the form of a hyphen followed by a let‐
44       ter and then the next parameter contains the value.
45
46       -d     the directory to use for the tests.
47
48       -c     the  level  of  concurrency (default 1). The number of copies of
49              the test to be performed at the same time.
50
51       -s     the  size  of  the  file(s)  for  IO  performance  measures   in
52              megabytes.  If  the  size is greater than 1G then multiple files
53              will be used to store the data, and each file will be up  to  1G
54              in  size.   This  parameter may include the chunk size seperated
55              from the size by a colon.  The chunk-size is measured  in  bytes
56              and  must  be a power of two from 256 to 1048576, the default is
57              8192.  NB  You  can  specify  the  size  in  giga-bytes  or  the
58              chunk-size  in  kilo-bytes  if  you add g or k to the end of the
59              number respectively.
60
61              If the specified size is 0 then this test will be skipped.
62
63       -n     the number of files for the file creation test. This is measured
64              in  multiples of 1024 files. This is because no-one will want to
65              test less than 1024 files,  and  we  need  the  extra  space  on
66              braille displays.
67
68              If the specified number is 0 then this test will be skipped.
69
70              The  default  for this test is to test with 0 byte files. To use
71              files of other sizes you can specify number:max:min:num-directo‐
72              ries:chunk-size  where  max  is  the maximum size and min is the
73              minimum size (both default to 0 if not  specified).  If  minimum
74              and maximum sizes are specified then every file will have a ran‐
75              dom size from the range min..max inclusive.  If  you  specify  a
76              number  of directories then the files will be evenly distributed
77              amoung that many sub-directories.
78
79              If max is -1 then hard links will be created instead  of  files.
80              If max is -2 then soft links will be created instead of files.
81
82
83
84       -m     name of the machine - for display purposes only.
85
86
87       -r     RAM  size in megabytes. If you specify this the other parameters
88              will be checked to ensure they make sense for a machine of  that
89              much  RAM.  You  should not need to do this in general use as it
90              should be able to discover the RAM size. NB  If  you  specify  a
91              size of 0 then all checks will be disabled...
92
93
94       -x     number  of test runs. This is useful if you want to perform more
95              than one test.  It will dump output continuously in  CSV  format
96              until  either  the number of tests have been completed, or it is
97              killed.
98
99
100       -u     user-id to use.  When running as root specify the UID to use for
101              the  tests.   It is not recommended to use root (since the occa‐
102              sion when a Bonnie++ bug wiped out someone's system), so if  you
103              really  want  to run as root then use -u root.  Also if you want
104              to specify the group to run as then use the  user:group  format.
105              If  you  specify  a  user  by name but no group then the primary
106              group of that user will be chosen.  If you  specify  a  user  by
107              number and no group then the group will be nogroup.
108
109
110       -g     group-id  to  use.   Same  as using :group for the -u parameter,
111              just a different way to specify it for compatibility with  other
112              programs.
113
114
115       -q     quiet  mode.  If  specified then some of the extra informational
116              messages will be suppressed. Also the csv data will be the  only
117              output  on standard out and the plain text data will be on stan‐
118              dard error. This means you can run bonnie++ -q  >>  file.csv  to
119              record your csv data.
120
121
122       -f size-for-char-io
123              fast mode control, skips per-char IO tests if no parameter, oth‐
124              erwise specifies the size of the tests  for  per-char  IO  tests
125              (default 20M).
126
127
128       -b     no write buffering.  fsync() after every write.
129
130
131       -p     number  of  processes  to serve semaphores for.  This is used to
132              create the semaphores for synchronising multiple  Bonnie++  pro‐
133              cesses.   All  the processes which are told to use the semaphore
134              with -ys will start each test with synchronization.  Use "-p -1"
135              to delete the semaphore.
136
137
138       -y s|p perform  synchronization  before  each test.  Option s for sema‐
139              phores and option p for prompting.
140
141
142       -D     use direct IO (O_DIRECT) for the bulk IO tests
143
144
145       -z seed
146              random number seed to repeat the same test.
147
148
149       -Z random-file
150              file containing random data in network byte order.
151

MULTIPLE PROCESSES

153       Run the following commands to run three copies of  Bonnie++  simultane‐
154       ously:
155
156       bonnie++ -p3
157
158       bonnie++ -y > out1 &
159
160       bonnie++ -y > out2 &
161
162       bonnie++ -y > out3 &
163
164

OUTPUT

166       The primary output is plain-text in 80 columns which is designed to fit
167       well when pasted into email and which will work well with Braille  dis‐
168       plays.
169
170       The  second  type  of  output is CSV (Comma Seperated Values). This can
171       easily be imported into any spread-sheet or database  program.  Also  I
172       have  included the programs bon_csv2html and bon_csv2txt to convert CSV
173       data to HTML and plain-ascii respectively.
174
175       For every test two numbers  are  reported,  the  amount  of  work  done
176       (higher  numbers  are  better)  and the percentage of CPU time taken to
177       perform the work (lower numbers are better). If  a  test  completes  in
178       less  than  500ms  then the output will be displayed as "++++". This is
179       because such a test result can't be calculated accurately due to round‐
180       ing errors and I would rather display no result than a wrong result.
181
182       Data  volumes  for  the  80  column  text display use "K" for KiB (1024
183       bytes), "M" for MiB  (1048576  bytes),  and  "G"  for  GiB  (1073741824
184       bytes).  So K/sec means a multiple of 1024 bytes per second.
185
186

AUTHOR

188       This  program,  its manual page, and the Debian package were written by
189       Russell Coker <russell@coker.com.au>, parts of the program are based on
190       the work of Tim Bray <tbray@textuality.com>.
191
192       The  documentation,  the Perl scripts, and all the code for testing the
193       creation of thousands of files was written by Russell  Coker,  but  the
194       entire package is under joint copyright with Tim Bray.
195
196

SIGNALS

198       Handles  SIGINT and does a cleanup (which may take some time), a second
199       SIGINT or a SIGQUIT will cause it to immediately die.
200
201       SIGXCPU and SIGXFSZ act like SIGINT.
202
203       Ignores SIGHUP.
204
205
206

BUGS

208       The random file sizes will add up to  different  values  for  different
209       test  runs.   I  plan  to add some code that checks the sum and ensures
210       that the sum of the values will be the same on seperate runs.
211
212

AVAILABILITY

214       The source is available from http://www.coker.com.au/bonnie++ .
215
216       See http://etbe.coker.com.au/category/benchmark  for  further  informa‐
217       tion.
218
219

SEE ALSO

221       zcav(8), getc_putc(8), bon_csv2html(1), bon_csv2txt(1)
222
223
224
225                                                                   bonnie++(8)
Impressum