Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Disks and Volumes, Filesystems, Performance

Testing Filesystem Performance with Bonnie++

Submitted by on July 10, 2009 – 4:33 pm 18 Comments

Bonnie++ is a benchmark utility designed to test performance of hard drives and filesystems by simulating various types of disk I/O. Bonnie++ may be used to test local disks as well as network-mounted filesystems. It is recommended that you reboot your server in single-user mode (with network support, if necessary) to avoid resource contention that may skew the benchmark results. For more reliable test results, it is further advised that the amount of data Bonnie++ writes to the filesystem be at least equal to twice the amount of installed RAM.

Download the latest version of Bonnie++ from the developer’s site and compile it directly on the server. As with most benchmarking tools, it is important to compile Bonnie++ directly on the system where it will be running to ensure accurate test results.

cd /tmp
wget http://www.coker.com.au/bonnie++/bonnie++-1.03e.tgz
gzip -d bonnie++-1.03e.tgz
tar xvf bonnie++-1.03e.tar
cd bonnie++-1.03e
./configure
make
make install

Here is the example command for running Bonnie++ as root. In this case the command will automatically determine the amount of RAM your server has and will set the file size to twice as much. The filesystem being tested is /tmp.

bonnie++ -n 0 -u 0 -r `free -m | grep 'Mem:' | awk '{print $2}'` -s $(echo "scale=0;`free -m | grep 'Mem:' | awk '{print $2}'`*2" | bc -l) -f -b -d /tmp

Depending on the amount of RAM your system has, this test may take a long time to complete. Here is the sample output:

Version 1.03e       ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
node48       31736M           172687  46 84284  25           208202  45 540.9   1
node48,31736M,,,172687,46,84284,25,,,208202,45,540.9,1,,,,,,,,,,,,,

In this example, a total of 31Gb of data was written to the disk. The sequential write performance was 169Mb/s, sequential re-write was 82Mb/sec, and sequential read was 203 Mb/s. The last line shows the results in a comma-separated format useful for importing the data into a spreadsheet application or a database.

Print Friendly, PDF & Email

18 Comments »

  • Mark says:

    Thanks for an excellent example of using Bonnie++ :)

  • Shaun says:

    Best and clear instructions to use Bonnie++. Thank you.

  • Sriram R says:

    I’m doing my unknown project for Microbiology and cannot find the test results for a lot of the bacteria.

  • josh12rox says:

    My friend is confused, took test said yes to being pregnant. Week later started her period or miscarriage and took second test and it said Not Pregnant. So will the blood in the urine affect the test results on the Home pregnancy test?

  • Noe R says:

    I asked my employer what my drug test results were and they said “Clear” and now they are waiting on my background check. What does that mean?

  • Keaton says:

    I took the urine test on Thursday for pre-employment at a doctors office, I was only a few weeks clean and had taken a detox drink. I have been working at the job since Sunday but I am not sure if my test results have come back yet. When I took the urine test I asked the doctor how long results take and she told me they should be back by Monday but havent been anything about it since.

  • Hayden says:

    I just started using hummus as a mayonnaise replacement for sandwiches and my brother said that it has sesame seeds which will give positive drug test results. I looked on the ingredients and sesame seeds are involved. Is this true? I’m asking because the job I have does random drug testing.

  • Chester says:

    Im due to get blood test results tomorrow and I’m quite anxious about it so what the worst possible result could I get?

    Thanx :-)

  • homerliveshere says:

    How long does it usually take to get test results from the Doctor’s office after coming out from a minor surgical procedure?

  • JDOGG1122 says:

    I had sex the 8th & i started the Pill about 4 days before that. Will the pill affect the test results?

  • Sriram R says:

    I want to take my CCNA. How long will it take to receive my test results? Will I receive a score report or pass/fail status upon completing the test? Thanks.

  • Sriram R says:

    I got a blood test a couple of months ago just for a check up and everything came back excellent according to the Doctor.
    Recently I’ve noticed that whenever I stand up after sitting down I get really dizzy feeling like I’m gonna pass out for a few seconds then I’m fine again. Is this anything to worry about ?

    I’m a hypochondriac and I’m terrified that I have an unknown heart condition and that I’m going to drop dead at any minute from a heart attack.

    So do good blood test results mean A healthy heart ?

    Thanks !

  • Harriet W says:

    In Australia it is normal for a patient to receive their results via the Dr who ordered the tests, thus getting an interpretation of the results based on examination and medical history and a chance to ask questions etc.

    It always amazes me that people post test results here asking for explanations without any context.

    What is the normal practice where you live?

  • Scorch Delta-62 says:

    I havent gotten my star test results yet and school starts very soon! so do any of u guys know when?

  • Mark says:

    I just took my kitten to the vet yesterday for shots and they tested her for feline leukemia (she was a stray). After I left, I realized they didn’t tell me the test results. Is it almost instant and they just did not tell me or does the test take time and if so, how much time? Thanks!

  • Wooooody says:

    I’m assuming it’s not super problematic if you have a high level of Neutrophils on your blood test results? I ask cause the doctor didn’t even mention it when we discussed my results. Any thoughts on why this level increased big time (10pts) since my last blood test, and also why it’s in the “high” range? Thanks

  • Xedo says:

    In Canada, does the family doctor have an obligation to inform the patients of their HIV test results if the patients’ test results are positive?

  • Jenna says:

    I have a 4runner that I got the motor replaced on, it’s a 3.0 SR5 V6 and the compression test resulted in 170 psi amongst all cylinders. Can I use this information to get a genral estimation of the mileage? Can I compare with other compression test results? If so where can I find some?

2 Pingbacks »

Leave a Reply

%d bloggers like this: