offset broken for randwrite?

From: Ryan Thomas <>
Date: Tue, 12 Feb 2008 06:52:08 -0500

It seems that the offset parameter cannot be used with randwrite testing.

I was trying to test alignment issues with a libaio randwrite test described by the following command file:



When I got suspiciously high throughput I looked at the I/O log to find that the same blocks at the end of file were being written over and over again.

fio version 2 iolog
/dev/sdf add
/dev/sdf open
/dev/sdf write 68719411200 65536
/dev/sdf write 68719411200 65536
/dev/sdf write 68719411200 65536
/dev/sdf write 68719411200 65536
/dev/sdf write 68719411200 65536
/dev/sdf write 68719411200 65536
/dev/sdf write 68719411200 65536

Since I am testing a block device, a workaround is to use a partition to align the I/O but I'd prefer to do it with just fio.

Also note that having a working offset parameter is key to testing block devices without wiping out the partition table. For example, the standard randwrite test with no offset writes a block at the end of file and at the start of file and then goes through the test as is shown in this example:

fio version 2 iolog
/dev/sdf add
/dev/sdf open
/dev/sdf write 68718428160 655360
/dev/sdf write 0 655360
/dev/sdf write 655360 655360
/dev/sdf write 1310720 655360

This will wipe out the partition table. So it's absolutely necessary to be able to specify an offset parameter to protect the partition table. For gpt partition tables that have a mirror at the end of device, it's similarly necessary to be able protect the final partition table with a filesize option. Protecting the end of a block device seems to work today, protecting the start does not.

I am using the fio version 1.18.

Thanks again for a nice tool.
Received on Tue Feb 12 2008 - 12:52:08 CET

This archive was generated by hypermail 2.2.0 : Tue Feb 12 2008 - 13:00:02 CET