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)

bonnie_results_home

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
/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.

nmon-raid

About Will Foster

hobo devop/sysadmin, all-around nice guy.
This entry was posted in open source, sysadmin and tagged , , , , . Bookmark the permalink.

Have a Squat, Leave a Reply ..

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s