1bonnie++(8) System Manager's Manual bonnie++(8)
2
3
4
6 bonnie++ - program to test hard drive performance.
7
8
10 bonnie++ [-d dir] [-s size(MiB)[:chunk-size(b)]] [-n num‐
11 ber-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
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 lower are better (NB a configuration scoring a performance result of
28 2000 and a CPU result of 90% is better in terms of CPU use than a con‐
29 figuration delivering performance of 1000 and CPU usage of 60%).
30
31 There are two sections to the program's operations. The first is to
32 test the IO throughput in a fashion that is designed to simulate some
33 types of database applications. The second is to test creation, read‐
34 ing, and deleting many small files in a fashion similar to the usage
35 patterns of programs such as Squid or INN.
36
37 All the details of the tests performed by Bonnie++ are contained in the
38 file /usr/share/doc/bonnie++/readme.html
39
40
42 For Bonnie++ every option is of the form of a hyphen followed by a let‐
43 ter and then the next parameter contains the value.
44
45 -d the directory to use for the tests.
46
47 -s the size of the file(s) for IO performance measures in
48 megabytes. If the size is greater than 1G then multiple files
49 will be used to store the data, and each file will be up to 1G
50 in size. This parameter may include the chunk size seperated
51 from the size by a colon. The chunk-size is measured in bytes
52 and must be a power of two from 256 to 1048576, the default is
53 8192. NB You can specify the size in giga-bytes or the
54 chunk-size in kilo-bytes if you add g or k to the end of the
55 number respectively.
56
57 If the specified size is 0 then this test will be skipped.
58
59 -n the number of files for the file creation test. This is measured
60 in multiples of 1024 files. This is because no-one will want to
61 test less than 1024 files, and we need the extra space on
62 braille displays.
63
64 If the specified number is 0 then this test will be skipped.
65
66 The default for this test is to test with 0 byte files. To use
67 files of other sizes you can specify number:max:min:num-directo‐
68 ries:chunk-size where max is the maximum size and min is the
69 minimum size (both default to 0 if not specified). If minimum
70 and maximum sizes are specified then every file will have a ran‐
71 dom size from the range min..max inclusive. If you specify a
72 number of directories then the files will be evenly distributed
73 amoung that many sub-directories.
74
75 If max is -1 then hard links will be created instead of files.
76 If max is -2 then soft links will be created instead of files.
77
78
79
80 -m name of the machine - for display purposes only.
81
82
83 -r RAM size in megabytes. If you specify this the other parameters
84 will be checked to ensure they make sense for a machine of that
85 much RAM. You should not need to do this in general use as it
86 should be able to discover the RAM size. NB If you specify a
87 size of 0 then all checks will be disabled...
88
89
90 -x number of test runs. This is useful if you want to perform more
91 than one test. It will dump output continuously in CSV format
92 until either the number of tests have been completed, or it is
93 killed.
94
95
96 -u user-id to use. When running as root specify the UID to use for
97 the tests. It is not recommended to use root (since the occa‐
98 sion when a Bonnie++ bug wiped out someone's system), so if you
99 really want to run as root then use -u root. Also if you want
100 to specify the group to run as then use the user:group format.
101 If you specify a user by name but no group then the primary
102 group of that user will be chosen. If you specify a user by
103 number and no group then the group will be nogroup.
104
105
106 -g group-id to use. Same as using :group for the -u parameter,
107 just a different way to specify it for compatibility with other
108 programs.
109
110
111 -q quiet mode. If specified then some of the extra informational
112 messages will be suppressed. Also the csv data will be the only
113 output on standard out and the plain text data will be on stan‐
114 dard error. This means you can run bonnie++ -q >> file.csv to
115 record your csv data.
116
117
118 -f size-for-char-io
119 fast mode control, skips per-char IO tests if no parameter, oth‐
120 erwise specifies the size of the tests for per-char IO tests
121 (default 20M).
122
123
124 -b no write buffering. fsync() after every write.
125
126
127 -p number of processes to serve semaphores for. This is used to
128 create the semaphores for synchronising multiple Bonnie++ pro‐
129 cesses. All the processes which are told to use the semaphore
130 with -ys will start each test with synchronization. Use "-p -1"
131 to delete the semaphore.
132
133
134 -y s|p perform synchronization before each test. Option s for sema‐
135 phores and option p for prompting.
136
137
138 -D use direct IO (O_DIRECT) for the bulk IO tests
139
140
141 -z seed
142 random number seed to repeat the same test.
143
144
145 -Z random-file
146 file containing random data in network byte order.
147
149 Run the following commands to run three copies of Bonnie++ simultane‐
150 ously:
151
152 bonnie++ -p3
153
154 bonnie++ -y > out1 &
155
156 bonnie++ -y > out2 &
157
158 bonnie++ -y > out3 &
159
160
162 The primary output is plain-text in 80 columns which is designed to fit
163 well when pasted into email and which will work well with Braille dis‐
164 plays.
165
166 The second type of output is CSV (Comma Seperated Values). This can
167 easily be imported into any spread-sheet or database program. Also I
168 have included the programs bon_csv2html and bon_csv2txt to convert CSV
169 data to HTML and plain-ascii respectively.
170
171 For every test two numbers are reported, the amount of work done
172 (higher numbers are better) and the percentage of CPU time taken to
173 perform the work (lower numbers are better). If a test completes in
174 less than 500ms then the output will be displayed as "++++". This is
175 because such a test result can't be calculated accurately due to round‐
176 ing errors and I would rather display no result than a wrong result.
177
178
180 This program, its manual page, and the Debian package were written by
181 Russell Coker <russell@coker.com.au>, parts of the program are based on
182 the work of Tim Bray <tbray@textuality.com>.
183
184 The documentation, the Perl scripts, and all the code for testing the
185 creation of thousands of files was written by Russell Coker, but the
186 entire package is under joint copyright with Tim Bray.
187
188
190 Handles SIGINT and does a cleanup (which may take some time), a second
191 SIGINT or a SIGQUIT will cause it to immediately die.
192
193 SIGXCPU and SIGXFSZ act like SIGINT.
194
195 Ignores SIGHUP.
196
197
198
200 The random file sizes will add up to different values for different
201 test runs. I plan to add some code that checks the sum and ensures
202 that the sum of the values will be the same on seperate runs.
203
204
206 The source is available from http://www.coker.com.au/bonnie++ .
207
208 See http://etbe.coker.com.au/category/benchmark for further informa‐
209 tion.
210
211
213 zcav(8), getc_putc(8), bon_csv2html(1), bon_csv2txt(1)
214
215
216
217 bonnie++(8)