Search code examples
linuxaioiostat

linux IOSTAT double counting AIO write operations?


As part of debugging an IO generator, I've run across an odd set of results under RH 6.4 running on x64 hardware (validated on multiple systems):

-- The application uses linux async IO (i.e., non-posix) to access raw disk partitions (/dev/sdb1, O_DIRECT), and is run as root

-- The application reports 100 io/s, and 60% writes.

-- strace of the application reports 100 calls per second to io_submit() and io_getevents(), reflecting 100 AIO operations per second

-- 'dstat --aio' shows 100 ops per second

-- iostat reports 40 reads/sec, as expected, but 120 writes/second, twice as many as expected

-- An earlier implementation, using synchronous IO, does not show "doubled" writes

Is this behavior a known bug?


Solution

  • After some further testing, it appears that this behavior is limited to the (default) CFQ scheduler. Moving to the NOP scheduler brought IOSTAT in line with the other measurement tools.