Monday, July 22, 2013

Checking FileSystem - Perfomance


...


If you want to check and prove what is the file system perfomance when you switching with different schedulers (cfq|noop|deadline) There is a open project called bonnie++(zcav) that can help a lot. 

Reference : http://www.coker.com.au/bonnie++ 

This is example of how-to :


Fisrt, Install bonnie++ on your systems :
 

# yum -y install bonnie++

Review the documentation installed by the bonnie++ package , if you wish :
 

# rpm -qd bonnie++
# man zcav
# rpm -q --scripts bonnie++


To avoid interfering with the test, we will store the output on an alternate disk. The simplest way to do this is to use the tmpfs filesystem:

# mkdir /disk-data
# mount -t tmpfs none /disk-data


3. As the disktest user, change directory to /disk-data and run the zcav utility. To get accurate results, you should specify multiple counts for reading the disk but for the sake of time, we will content yourself with a single pass. To record the output, you will want to run the utility using the script command. If possible, try to avoid doing any other activity on the system so that you will obtain cleaner measurements.

# su - disktest
# cd /disk-data
# script zcav.out
# zcav -c 1 /dev/hda

 
Note: substitute /dev/sda in place of /dev/hda according to your actual hardware.

4. Once zcav exits, terminate the script session by exiting.
exit
 

5. Examine the data produced by the run of zcav. The three columns are the block location on disk, the throughput and the time it took to perform the read. At this point dont worry about the extraneous terminal control characters that were captured by script. Look at the time required to read blocks located at the end of the drive. On typical IDE disk drive, the difference may be nearly as much as
two seconds which is a huge time differential. Graphing the data should reveal patterns where the zones are located.

6. Before graphing, the extraneous information left by the script utility should be removed :


# sed 's/[^A-Za-z0-9#./,: ]//g' zcav.out | awk '/^[0-9]/{print $0}' | sed '/diskdata/d' > zcav.dat

7. You may want to copy the zcav.out and zcav.dat files back to your hard drive.
# cp zcav.{dat,out} /tmp

8. We are now ready to plot the numbers obtained from the zcav run.
 

# gnuplot

gnuplot
gnuplot> set xlabel "block #"
gnuplot> set ylabel "Transfer Rate MB/s"
gnuplot> plot "zcav.dat" using 1:2 with steps


.

No comments:

Post a Comment