NAME
bonnie++ - program to test hard drive performance.
SYNOPSIS
bonnie++ [-d dir] [-s size(Mb)] [-n number-to-stat(*1024)[:max-size[:min-size]]] [-m machine-name] [-r ram-size-in-Mb] [-x number-of-tests] [-q]
DESCRIPTION
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 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
OPTIONS
For Bonnie++ every option is of the form of a hyphen followed by a letter and then the next parameter contains the value. I have no plans to use one of the libraries for parsing command lines for portability reasons, and don't wish to do anything fancier myself.
- -d
-
the directory to use for the tests.
- -s
-
the size of the file(s) for IO performance measures in megabytes. If the size is greater than 1G then multiple files will be used to store the data, and each file will be up to 1G in size.
If the specified size is 0 then this test will be skipped.
- -n
-
the number of files for the file creation test. This is measured in multiples of 1024 files. This is because no-one will want to test less than 1024 files, and we need the extra space on braille displays.
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 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 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.
- -m
-
name of the machine - for display purposes only.
- -r
-
RAM size in megabytes. If you specify this the other parameters will be checked to ensure they make sense for a machine of that much RAM. If you read the documentation carefully you can work this out for yourself so it's not really necessary. If unsure then use it.
- -x
-
number of test runs. This is useful if you want to perform more than one test. It will dump output continuously in CSV format until either the number of tests have been completed, or it is killed.
- -q
-
quiet mode. If specified then some of the extra informational messages will be suppressed.
OUTPUT
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.
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 1 second 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.
AUTHOR
This program, it's manual page, and the Debian package were written by Russell Coker <[email protected]>, parts of the program are based on the work of Tim Bray <[email protected]>.
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.
BUGS
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.