3

How can I prioritize LVM volumes I/O performance using cgroups?

I know I can use ionice to make changes at the process level but I wish to be able to do this per LV and not per process.

ApriOri
  • 325
  • 1
  • 10

1 Answers1

3

Lvm volume is a normal block device, so you can configure various process priorities on lvm volume using cgroup, for more information read this doc https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt

example:

  lvdisplay -v /dev/vg00/rootvol | grep "Block device"
  echo "$MAJOR:$MINOR $((1024*250))" > /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
c4f4t0r
  • 5,301
  • 3
  • 31
  • 42