Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Some quick iostat -k -x 1 show that, for physical device, the tunable works:

# max_sectors_kb=512 (default)
dd if=/dev/zero of=/dev/sdd1 bs=2M count=16 oflag=direct
iostat -x -k 1 /dev/sdd: avgrq-sz=1024 (1024 sectors = 512KB =
max_sectors_kb)

# max_sectors_kb=2048
dd if=/dev/zero of=/dev/sdd1 bs=2M count=16 oflag=direct
iostat -x -k 1 /dev/sdd: avgrq-sz=2048 (2048 sectors = 1024 KB)

dd if=/dev/zero of=/dev/sdd1 bs=4M count=16 oflag=direct
iostat -x -k 1 /dev/sdd: avgrq-sz=2730.67 (2730 sectors = ~1350 KB)

As you can see, I can't always reach 100% efficienty but I came
reasonably close.


The problem is that, when using LVM2 (on software raid10), I can not
really increase I/O transfer size. Setting both sd*, md* and dm-* to
max_sectors_kb=2048 leads to _no_ increase in I/O blocks, while
decreasing the max_sectors_kb works properly:

# max_sectors_kb=2048
dd if=/dev/zero of=/dev/vg_kvm/TEST bs=2M count=64 oflag=direct
iostat -x -k 1 /dev/vg_kvm/TEST: avgrq-sz=1024.00 (it remains as 512KB)

# max_sectors_kb=256
dd if=/dev/zero of=/dev/vg_kvm/TEST bs=2M count=64 oflag=direct
iostat -x -k 1 /dev/vg_kvm/TEST: avgrq-sz=512.00 (512 sectors = 256KB =
max_sectors_kb)

Now, two questions:
1) why I see this hard limit?
2) can I change this behavior?

Thank you very much.
--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: ***@assyoma.it - ***@assyoma.it
GPG public key ID: FF5F32A8
Loading...