I'd like to use cgroups
with my linux containers to throttle disk IO
on them. Containers placed on ZFS
volume /tank/lxc
. I have three containers each in their own /tank/lxc/nodeXX
directory.
How can I throttle IO for a container?
Are there minor:major block numbers for ZFS volume/Zpool, how can I find them?
It should work, didn't tested it yet.
lxc containers must be up and running, cgroup must be installed. Regarding to this answer, cfq disk IO scheduler must be configured for cgroups in order to be able to throttle the IO. To configure cfq for ZFS:
To make this parameters persistent, copy the commands to /etc/rc.local