OpenVZ has had IO limits for years, but I’ve never really had opportunity to implement them, especially with SSD disks becoming cheaper and the standard.
However in some cases implementing IO Limits on your OpenVZ VMs can be a good practice. Especially on Database servers (High usage MySQL/MariaDB) or Mail servers (Exim on cPanel can be an IO hog at times).
Depending on your disks, and how many OpenVZ containers live on your host, you may wish to adjust the following to better suited values.
vzctl set 100 --iolimit 10M --save
10MB/s seems to be the perfect value for my requirements. It doesn’t over limit IO usage, but if a VM is behaving badly, it limits the impact on the other VMs. IO Limiting effects both read and write, and there is also an option to allow bursts of up to 3x.
- Kernel Version: 2.6.32-042stab084.3 or higher
- VZCTL Version: 4.6 or higher
Further information can be found on the OpenVZ Wiki.