bonnie++(8) | System Manager's Manual | bonnie++(8) |
bonnie++ - program to test hard drive performance.
bonnie++ [-d dir] [-c concurrency] [-s size(MiB)[:chunk-size(b)[:seeks[:seekers]]]] [-n number-to-stat(*1024)[:max-size[:min-size][:num-directories[:chunk-size]]]] [-m machine-name] [-r ram-size-in-MiB] [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use] [-q] [-f size-for-char-io] [-b] [-D] [-p processes | -y p|s ] [-z seed-num|-Z random-file]
This manual page documents briefly the bonnie++, program.
Bonnie++ is a program to test hard drives and file systems for performance or the lack therof. There are a many different types of file system operations which different applications use to different degrees. Bonnie++ tests some of them and for each test gives a result of the amount of work done per second and the percentage of CPU time this took. For performance results higher numbers are better, for CPU usage and latency lower are better (NB a configuration scoring a performance result of 2000 and a CPU result of 90% is better in terms of CPU use than a configuration delivering performance of 1000 and CPU usage of 60%).
There are two sections to the program's operations. The first is to test the IO throughput in a fashion that is designed to simulate some types of database applications. The second is to test creation, reading, and deleting many small files in a fashion similar to the usage patterns of programs such as Squid or INN.
All the details of the tests performed by Bonnie++ are contained in the file /usr/share/doc/bonnie++/readme.html
For Bonnie++ every option is of the form of a hyphen followed by a letter and then the next parameter contains the value.
If the specified size is 0 then this test will be skipped.
If the specified number is 0 then this test will be skipped.
The default for this test is to test with 0 byte files. To use files of other sizes you can specify number:max:min:num-directories:chunk-size where max is the maximum size and min is the minimum size (both default to 0 if not specified). If minimum and maximum sizes are specified then every file will have a random size from the range min..max inclusive. If you specify a number of directories then the files will be evenly distributed amoung that many sub-directories.
If max is -1 then hard links will be created instead of files. If max is -2 then soft links will be created instead of files.
Run the following commands to run three copies of Bonnie++ simultaneously:
bonnie++ -p3
bonnie++ -y > out1 &
bonnie++ -y > out2 &
bonnie++ -y > out3 &
The primary output is plain-text in 80 columns which is designed to fit well when pasted into email and which will work well with Braille displays.
The second type of output is CSV (Comma Seperated Values). This can easily be imported into any spread-sheet or database program. Also I have included the programs bon_csv2html and bon_csv2txt to convert CSV data to HTML and plain-ascii respectively.
The "Name:Size etc" field has the name, filesize, IO chunk size, concurrency, number of seeks, and number of seek processes separated by : characters.
For every test two numbers are reported, the amount of work done (higher numbers are better) and the percentage of CPU time taken to perform the work (lower numbers are better). If a test completes in less than 500ms then the output will be displayed as "++++". This is because such a test result can't be calculated accurately due to rounding errors and I would rather display no result than a wrong result.
Data volumes for the 80 column text display use "K" for KiB (1024 bytes), "M" for MiB (1048576 bytes), and "G" for GiB (1073741824 bytes). So K/sec means a multiple of 1024 bytes per second.
This program, its manual page, and the Debian package were written by Russell Coker <russell@coker.com.au>, parts of the program are based on the work of Tim Bray <tbray@textuality.com>.
The documentation, the Perl scripts, and all the code for testing the creation of thousands of files was written by Russell Coker, but the entire package is under joint copyright with Tim Bray.
Handles SIGINT and does a cleanup (which may take some time), a second SIGINT or a SIGQUIT will cause it to immediately die.
SIGXCPU and SIGXFSZ act like SIGINT.
Ignores SIGHUP.
The random file sizes will add up to different values for different test runs. I plan to add some code that checks the sum and ensures that the sum of the values will be the same on seperate runs.
The source is available from http://www.coker.com.au/bonnie++ .
See http://etbe.coker.com.au/category/benchmark for further information.