2016年3月2日 星期三

磁碟效能測試工具: Bonnie++

1. Bonnie++簡介

Bonnie++ is a benchmark suite that is aimed at performing a number of simple tests of hard drive and file system performance.

Test Details:
1. Sequential Output
1-1. Per-Character. The file is written using the putc() stdio macro. The loop that does the writing should be small enough to fit into any reasonable I-cache. The CPU overhead here is that required to do the stdio code plus the OS file space allocation.
1-2. Block. The file is created using write(2). The CPU overhead should be just the OS file space allocation.
1-3. Rewrite. Each BUFSIZ of the file is read with read(2), dirtied, and rewritten with write(2), requiring an lseek(2). Since no space allocation is done, and the I/O is well-localized, this should test the effectiveness of the filesystem cache and the speed of data transfer.
2. Sequential Input
2-1. Per-Character. The file is read using the getc() stdio macro. Once again, the inner loop is small. This should exercise only stdio and sequential input.
2-2. Block. The file is read using read(2). This should be a very pure test of sequential input performance.
3. Random Seeks
This test runs SeekProcCount processes (default 3) in parallel, doing a total of 8000 lseek()s to locations in the file specified by random() in bsd systems, drand48() on sysV systems. In each case, the block is read with read(2). In 10% of cases, it is dirtied and written back with write(2).

2. Bonnie++安裝
$ sudo apt-get install bonnie++
3. Bonnie++命令使用
-s    specifies the dataset size to use for the IO test in MB.
4. 效能測試
File size should be double RAM for good results.
$ bonnie++
5. 參考來源
http://www.coker.com.au/bonnie++/

沒有留言:

張貼留言