filebench - File system and storage benchmark - 模拟生成各种各样的应用的负载 - A Model Based File System Workload Generator
兼容posix 接口的文件系统中我们不仅要测试 posix 接口是否兼容。随机读,随机写,顺序读,顺序写等读写模式下的性能。我们还要测试在不同工作负载条件下的文件系统的性能的情况;filebench 是一款文件系统性能的自动化测试工具,它通过快速模拟真实应用服务器的负载来测试文件系统的性能。它不仅可以仿真文件系统微操作(如 copyfiles, createfiles, randomread, randomwrite ),而且可以仿真复杂的应用程序(如 varmail, fileserver, oltp, dss, webserver, webproxy )。 filebench 比较适合用来测试文件服务器性能,但同时也是一款负载自动生成工具,也可用于文件系统的性能。所以filebench 是非常好用文件系统负载生成工具;
官方网站:
官网介绍:
filebench is a file system and storage benchmark that can generate a large variety of workloads. unlike typical benchmarks it is extremely flexible and allows to specify application's i/o behavior using its extensive workload model language (wml). users can either describe desired workloads from scratch or use (with or without modifications) workload personalities shipped with filebench (e.g., mail-, web-, file-, and database-server workloads). filebench is equally good for micro- and macro-benchmarking, quick to setup, and relatively easy to use.
安装:
make sure bison
and lex
are available in your system. then, run traditional configure
, make
, and sudo make install
commands.
fedora 上 使用 yum 工具,即可以安装稳定版;
安装最新版需要下载 flex 和 bison 等依赖;
yum install flex bison
$cd /usr/local/filebench-1.5-alpha3 (源文件所在的路径) $./configure $make $sudo make install (注意:一定要安装 filebench 需要在/usr/local/share/filebench 下生成一些文件)
使用:
filebench 需要根据 wml 负载模型语言来进行描述负载,然后来进行执行。所以我们可以使用已经预定好的负载,也可以自己定义自己的负载模型,然后运行。具体如何进行定义负载大家可以参考如下链接:https://github.com/filebench/filebench/wiki/workload-model-language ,也可以参考wiki 进行整理了解 filebench工具的使用;
命令:filebench -f /usr/local/share/filebench/workloads/fileserver.f
测试结果:
当然,我们不建议直接使用 原有的文件进行测试。我们可以在原有的wml文件基础上根据我们自己的使用场景来定义负载。
we do *not* recommend to directly use workload files from workloads/ or /usr/local/share/filebench/workloads/ directories. the main reason is that these workloads *are not properly sized* (e.g., in terms of the dataset sizes) to a particular system. for instance, the initial dataset size of the webserver workload is only slightly larger than 16mib, which is typically not the size you want to test the system containing multiple gigabytes of ram with.
其他参考文档:
https://www.usenix.org/legacy/event/lsf08/tech/fs_shepler.pdf
https://www.usenix.org/legacy/event/lsf08/tech/fs_shepler.pdf
https://blog.csdn.net/microsoft2014/article/details/60145433
https://www.jianshu.com/p/4fcd6b8a4236
保持更新,更多关于文件系统相关的知识,请关注 cnblogs.com/xuyaowen