how to test io performance on linux
tool: fio
link: [http://freshmeat.net/projects/fio/][1]
test physical disk IO:
./fio examples/disk-zone-profile
set parameter: sequential r/w: rw=read or rw=write random r/w: rw=randread or rw=randwrite
IO and filesystem benchmark is a complex topic. No single benchmarking tool is good in all situations. Here is a small overview about different benchmarking tools:
Block Storage:
- IOMeter - Highly customizable and allows to coordinate multiple clients. Needs a Windows PC for the coordination application. Developed by Intel.
File System (syntetic):
- FFSB - Flexible Filesystem Benchmark. Very neat benchmarking for linux. Good custimuation of workload. NFS benchmarking (net-ffsb) a bit unsound.
- Filebench - Extremly powerful, but originally developed for Solaris. Linux support isn't good.
- sysbench - Mainly a DB benchmarking tool, but also basic filesystem benchmarking tool.
- bonnie - Seems to be obsolute
- bonnie++ - C++ port of bonnie. Easy, but seems not to be very customizable.
File System (workload):
- Postmark - Simulates the IO behavior of a mail server. Too small to stress good IO systems.
Stony Brook University and IBM Watson Labs have published an highly recommended journal paper in the "Transaction of Storage" about file system benchmarking, in which they present different benchmarks and their strong and weak points: A nine year study of file system and storage benchmarking. The article clearly points out that the results of most benchmarks at least questionable.
A note: Is the question programming related? May not, but maybe it is. I spend a lot of time benchmarking the IO performance of the systems I developed. At least for me, questions about how to benchmarking these things is highly programming related. Please: Do not close all questions that are not development/programming related from your point of view. The point of view of other developers might be different.
you need to specify what you're testing for, otherwise benchmarks will only mislead. There are different aspects of IO performance that you need to chose to optimize for, and different parameters to play with.
Your system parameters:
- storage device: HDD, SSD (which?), Raid (which?)
- filesystem, block size, journal mode
- file cache, dirty thresholds, amount of memory
- IO scheduler, its tunables
- number of CPUs
- kernel version
Your test parameters:
- read or write performance?
- sequential or random?
- 1 thread or multiple?
- size of requests
- optimize for throughput or request delay?