Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iotune: Report disk IOPS instead of kernel IOPS
The iotune tool measures disk throughput and IOPS by doing four sequential measurements: 1. sequentially writes into a big file 2. sequentially reads from the same file 3. randomly writes into this file again 4. randomly reads from, you know, the File It's improtant that the measurement #1 comes first. On start the test file is created and truncated to its size and this first measurement fills it with data which is then read by steps 2 and 4. Respectively, after the 1st measurement the size of the file should be updated to reflect the real amount of data written into it. The latter is done by taking the number of bytes written into file. But in reality the first test may wrap around the initial file size and re-write some data into it. After this the file size can be seen bigger than it actually is, even times bigger. Subsequently, the next tests will go and read from/write to random holes in this area. For reading tests this becomes quite problematic as the kernel will not submit real IO requess for reads from missing (due to holes) blocks. As a result, the shown bandwidth and IOPS will be some average value of disk IOPS and kernel "reads-from-holes-per-second". Fix this by getting the maximum position at which the first test writes and limiting the next tests with this value, instead of the amount of (over-)writter bytes. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com> Message-Id: <20200623185120.17694-1-xemul@scylladb.com>
- Loading branch information