Simple Disk Performance Testing with Linux

TuxI recently did some testing on my home Linux fileserver with Bonnie++ at the urging of a friend who wanted to compare his numbers.   I also ran similar tests with dd and hdparm.  Here’s what I ran, the results, and how you can easily do it too.  Let’s get started.


Home Server Details
My low-power home server for VMs and storage:

New Home Server

  • 8-bay e-SATA tower (8 x 2TB SATA 5400rpm Samsung Spinpoint F5)
  • Intel i7-3630QM CPU @ 2.40GHz, 16G RAM (fanless, micro ITX)
  • SiI 3132 Serial ATA Raid II (PCI-E) in JBOD mode
  • Red Hat Enterprise Linux Server 6.7 (2.6.32-573.1.1)
  • Tuned “Hypervisor” profile
  • Linux Software RAID6 MDADM on XFS

Install Bonnie++
Most Linux distributions will have Bonnie++ or download it here

yum install bonnie++

Run Bonnie++ against Mounted Storage:
Adjust the -s 32G for double the amount of your system memory, e.g. this is with 16G memory.

bonnie++ -d /srv/storage -s 32G -n 0 -m bonnie++-test -f -b -u root

Convert it to HTML
This may take a while.  Once finished, take the results and echo them into “bon_csv2html” and host them somewhere or view in your browser.

echo "1.96,1.96,bonnie++-test,1,1440079526,32G,,,,114029,8,56224,5,,,108450,4,81.6,4,,,,,,,,,,,,,,,,,,,326ms,420ms,,513ms,999ms,,,,,," | bon_csv2html > /tmp/test.html

Bonnie++ Results
Once converted to HTML it should look like this.  My performance isn’t wonderful but it’s good enough for a 1GbE connection serving NFS and 4-5 Libvirt VMs (114MB/s read, 108MB/s write)


Additional Tests
I also performed simple tests with dd and hdparm achieving similar results.

# dd if=/dev/zero of=/srv/storage/testfile bs=1G count=1 oflag=direct
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 10.2732 s, 105 MB/s
# hdparm -tT /dev/md1
Timing cached reads:   16434 MB in  2.00 seconds = 8229.32 MB/sec
Timing buffered disk reads: 234 MB in  3.00 seconds =  97.93 MB/sec

Nmon Stats
nmon can give you some additional detail.  Install nmon and run “d” for disk activity, or “c d n t” for a tiered metrics layout.


About Will Foster

hobo devop/sysadmin/SRE
This entry was posted in open source, sysadmin and tagged , , , , . Bookmark the permalink.

3 Responses to Simple Disk Performance Testing with Linux

  1. Ravi Sankar says:

    Convert it to HTML:
    How to add another machine/test in same html?


    • Will Foster says:

      Hi Ravi,

      Try changing bon_csv2html > to bon_csv2html >> for the second machine (or any iterative ones after) so you’re appending the file and see how it looks, you may need to strip out the title in the tables if you want values to align under each other.


    • oneemptymind says:

      you can copy multiple bonnie++ outputs to a file and use that as an input file to ./bon_csv2html

      something like this:
      ./bon_csv2html temp.txt > /tmp/results_nic.html


Have a Squat, Leave a Reply ..

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.