Bonnie++是一种用于测量下层文件系统的性能并确定其瓶颈的文件系统测试。Bonnie++主要执行一组串行读写测试以及一些随机读写测试。Bonnie++可以测量每次单字符模式和每次单个块模式下的读写操作。每次单字符模式的测试通过操作系统的getc()和putc函数来测量stdio库函数的开销,而块传输以极小的额外开销通过read()和write()系统调用来测量文件系统吞吐率和延迟。
在/usr/local/sbin目录下执行bonnie++ -u root
[root@localhost sbin]# ./bonnie++ -u root
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
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
localhost.locald 2G 75121 53 66342 4 26189 3 54210 41 69728 5 114.9 1
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ 8594 13
localhost.localdomain,2G,75121,53,66342,4,26189,3,54210,41,69728,5,114.9,1,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,8594,13
[root@localhost sbin]#
参考资料:linux服务器性能优化