Linux LVM: Reduce Filesystem and Logical Volume
March 14, 2012 – 5:07 pm | No Comment

The following example shows how to reduce the size of a filesystem mounted on an LVM logical volume. The instructions below are only for non-root filesystems. No reboot is required, but the filesystem will need to be unmounted. So, if there are any user applications using this filesystem, they will need to be stopped and the users will need to log out.

Read the full story »
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 pm3 Comments
Testing Filesystem Performance with Bonnie++

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.

Popularity: 7% [?]

Related posts:

  1. ReiserFS Filesystem Recovery
  2. Linux performance tuning
  3. Filesystem Monitoring

3 Comments »

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.