'how to replay block I/O trace file in csv format

I'm trying to replay MS-Cambridge I/O trace, which is converted in csv file, but I don't know how to convert this csv file into blktrace binary file, which can be replayed by fio or else.
Can anyone answer me how to convert csv formatted I/O trace into replay-able binary format?



Solution 1:[1]

https://ysoh.wordpress.com/2011/09/06/706/ talks about converting SNIA Cambridge trace files to Disksim but unfortunately I've yet to see anything about getting the CSV or Disksim files into blktrace format. It may be easier to convert those files into fio's trace v2 format (as that is just ASCII) and then you can use fio to play it back...

Solution 2:[2]

As what Anon said, you could convert csv file to a simple ASCII file (e.g. trace.log), and make a fio test config file (e.g. test.fio). Then use fio test.fio in your command.

Specifically, I give the example of these two files:

trace.log:

fio version 2 iolog
/dev/loop1 add
/dev/loop1 open
/dev/loop1 write 0 4096
/dev/loop1 write 4096 4096
/dev/loop1 close

test.fio:

[write-test]
ioengine=libaio
iodepth=32
direct=1
thread=1
read_iolog=trace.log

Hope it helps you understand.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anon
Solution 2 Aliez