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
11       size(MiB)[:chunk-size(b)[:seeks[:seekers]]]]          [-n          num‐
12       ber-to-stat(*1024)[:max-size[:min-size][:num-directo‐
13       ries[:chunk-size]]]] [-m machine-name] [-r  ram-size-in-MiB]  [-x  num‐
14       ber-of-tests]  [-u  uid-to-use:gid-to-use]  [-g  gid-to-use]  [-q]  [-f
15       size-for-char-io] [-b] [-D] [-p processes | -y p|s  ]  [-z  seed-num|-Z
16       random-file]
17
18

DESCRIPTION

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

OPTIONS

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

MULTIPLE PROCESSES

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

OUTPUT

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

AUTHOR

195       This program, its manual page, and the Debian package were  written  by
196       Russell Coker <russell@coker.com.au>, parts of the program are based on
197       the work of Tim Bray <tbray@textuality.com>.
198
199       The documentation, the Perl scripts, and all the code for  testing  the
200       creation  of  thousands  of files was written by Russell Coker, but the
201       entire package is under joint copyright with Tim Bray.
202
203

SIGNALS

205       Handles SIGINT and does a cleanup (which may take some time), a  second
206       SIGINT or a SIGQUIT will cause it to immediately die.
207
208       SIGXCPU and SIGXFSZ act like SIGINT.
209
210       Ignores SIGHUP.
211
212
213

BUGS

215       The  random  file  sizes  will add up to different values for different
216       test runs.  I plan to add some code that checks  the  sum  and  ensures
217       that the sum of the values will be the same on seperate runs.
218
219

AVAILABILITY

221       The source is available from http://www.coker.com.au/bonnie++ .
222
223       See  http://etbe.coker.com.au/category/benchmark  for  further informa‐
224       tion.
225
226

SEE ALSO

228       zcav(8), getc_putc(8), bon_csv2html(1), bon_csv2txt(1)
229
230
231
232                                                                   bonnie++(8)
Impressum