1bonnie++(1) General Commands Manual bonnie++(1)
2
3
4
6 bonnie++ - program to test hard drive performance.
7
8
10 bonnie++ [-d dir] [-s size(Mb)[:chunk-size(b)]] [-n num‐
11 ber-to-stat(*1024)[:max-size[:min-size][:num-directories]]] [-m
12 machine-name] [-r ram-size-in-Mb] [-x number-of-tests] [-u
13 uid-to-use:gid-to-use] [-g gid-to-use] [-q] [-f] [-b] [-p processes |
14 -y]
15
16
18 This manual page documents briefly the bonnie++, program.
19
20 Bonnie++ is a program to test hard drives and file systems for perfor‐
21 mance or the lack therof. There are a many different types of file sys‐
22 tem operations which different applications use to different degrees.
23 Bonnie++ tests some of them and for each test gives a result of the
24 amount of work done per second and the percentage of CPU time this
25 took. For performance results higher numbers are better, for CPU usage
26 lower are better (NB a configuration scoring a performance result of
27 2000 and a CPU result of 90% is better in terms of CPU use than a con‐
28 figuration delivering performance of 1000 and CPU usage of 60%).
29
30 There are two sections to the program's operations. The first is to
31 test the IO throughput in a fashion that is designed to simulate some
32 types of database applications. The second is to test creation, read‐
33 ing, and deleting many small files in a fashion similar to the usage
34 patterns of programs such as Squid or INN.
35
36 All the details of the tests performed by Bonnie++ are contained in the
37 file /usr/share/doc/bonnie++/readme.html
38
39
41 For Bonnie++ every option is of the form of a hyphen followed by a let‐
42 ter and then the next parameter contains the value.
43
44 -d the directory to use for the tests.
45
46 -s the size of the file(s) for IO performance measures in
47 megabytes. If the size is greater than 1G then multiple files
48 will be used to store the data, and each file will be up to 1G
49 in size. This parameter may include the chunk size seperated
50 from the size by a colon. The chunk-size is measured in bytes
51 and must be a power of two from 256 to 1048576. NB You can
52 specify the size in giga-bytes or the chunk-size in kilo-bytes
53 if you add 'g' or 'k' to the end of the number respectively.
54
55 If the specified size is 0 then this test will be skipped.
56
57 -n the number of files for the file creation test. This is measured
58 in multiples of 1024 files. This is because no-one will want to
59 test less than 1024 files, and we need the extra space on
60 braille displays.
61
62 If the specified number is 0 then this test will be skipped.
63
64 The default for this test is to test with 0 byte files. To use
65 files of other sizes you can specify number:max:min:num-directo‐
66 ries where max is the maximum size and min is the minimum size
67 (both default to 0 if not specified). If minimum and maximum
68 sizes are specified then every file will have a random size from
69 the range min..max inclusive. If you specify a number of direc‐
70 tories then the files will be evenly distributed amoung that
71 many sub-directories.
72
73 If max is -1 then hard links will be created instead of files.
74 If max is -2 then soft links will be created instead of files.
75
76
77
78 -m name of the machine - for display purposes only.
79
80
81 -r RAM size in megabytes. If you specify this the other parameters
82 will be checked to ensure they make sense for a machine of that
83 much RAM. You should not need to do this in general use as it
84 should be able to discover the RAM size. NB If you specify a
85 size of 0 then all checks will be disabled...
86
87
88 -x number of test runs. This is useful if you want to perform more
89 than one test. It will dump output continuously in CSV format
90 until either the number of tests have been completed, or it is
91 killed.
92
93
94 -u user-id to use. When running as root specify the UID to use for
95 the tests. It is not recommended to use root, so if you really
96 want to run as root then use -u root. Also if you want to spec‐
97 ify the group to run as then use the user:group format. If you
98 specify a user by name but no group then the primary group of
99 that user will be chosen. If you specify a user by number and
100 no group then the group will be nogroup.
101
102
103 -g group-id to use. Same as using :group for the -u parameter,
104 just a different way to specify it for compatibility with other
105 programs.
106
107
108 -q quiet mode. If specified then some of the extra informational
109 messages will be suppressed.
110
111
112 -f fast mode, skips per-char IO tests.
113
114
115 -b no write buffering. fsync() after every write.
116
117
118 -p number of processes to serve semaphores for. This is used to
119 create the semaphores for synchronising multiple Bonnie++ pro‐
120 cesses. All the processes which are told to use the semaphore
121 with -y will start each test at the same time. Use the value -1
122 to delete the semaphore.
123
124
125 -y wait for semaphore before each test.
126
127
129 The primary output is plain-text in 80 columns which is designed to fit
130 well when pasted into email and which will work well with Braille dis‐
131 plays.
132
133 The second type of output is CSV (Comma Seperated Values). This can
134 easily be imported into any spread-sheet or database program. Also I
135 have included the programs bon_csv2html and bon_csv2txt to convert CSV
136 data to HTML and plain-ascii respectively.
137
138 For every test two numbers are reported, the amount of work done
139 (higher numbers are better) and the percentage of CPU time taken to
140 perform the work (lower numbers are better). If a test completes in
141 less than 500ms then the output will be displayed as "++++". This is
142 because such a test result can't be calculated accurately due to round‐
143 ing errors and I would rather display no result than a wrong result.
144
145
147 This program, it's manual page, and the Debian package were written by
148 Russell Coker <russell@coker.com.au>, parts of the program are based on
149 the work of Tim Bray <tbray@textuality.com>.
150
151 The documentation, the Perl scripts, and all the code for testing the
152 creation of thousands of files was written by Russell Coker, but the
153 entire package is under joint copyright with Tim Bray.
154
155
157 Handles SIGINT and does a cleanup (which may take some time), a second
158 SIGINT or a SIGQUIT will cause it to immidiately die.
159
160 SIGXCPU and SIGXFSZ act like SIGINT.
161
162 Ignores SIGHUP.
163
164
165
167 The random file sizes will add up to different values for different
168 test runs. I plan to add some code that checks the sum and ensures
169 that the sum of the values will be the same on seperate runs.
170
171
173 bon_csv2html(1), bon_csv2txt(1)
174
175
176
177 bonnie++(1)