2

I am currently performing various development tasks that are slow on my current system because of IO performance.

Is there a way to record disk operations while performing IO consuming tasks, including performance info (writes/second, reads/second, etc) and then replay them on a new system to see which would the performance be there (without having to re-run the same command over the same set of data)?

Would blktrace, blkparse or fio help me in this case?

For example: Let's say on my system I want to benchmark a

find -name "*.php" | xargs grep -r "test_string"

inside a folder containing 50 000 files (on multiple levels, of course)

I'd like to capture all the disk operations, including statistics, and then replay them on another system that does not have the 50 000 files folder. Basically, just simulating the operations and checking out if they are done any faster.

I've tried capture the disk samples by using

blktrace -d /dev/sda -o myfile.blk

but I do not know how I can try and replay them with fio.

Is this possible?

Thanks

  • Why don't you copy the files over? I wouldn't believe in such simulations. – phunehehe Mar 15 '12 at 15:08
  • I gave this just as an example. I may want to measure for example how eclipse behaves on large projects, or how ant works on disk-intensive tasks for large projects – Mihai Mar 16 '12 at 10:49
2

No. If you want to see how long the same task will take on different hardware, then you need to run the same task on the new hardware.

If you wanted to simulate the task then you would need to come up with a way to simulate whatever work the task does with the data once it is read, in addition to trying to read/write the same disk sectors.

0

To play back a blktrace file with fio you will need to have converted it into a blkparse binary data file first - see fio's read_iolog option for more information (replay_redirect may also be useful).

Note: using fio to rerun a replay that contains writes DESTROYS the data in the file/disk that it is replayed against so be careful!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.