In OpenVZ, you can configure the disk I/O (input/output) priority level of virtual machines and containers. The higher the I/O priority level, the more time the virtual machine or container will get for its disk I/O activities as compared to the other virtual machines and containers on the hardware node. By default, any virtual machine or container on the hardware node has the I/O priority level set to 4. However, you can change the current I/O priority level in the range from 0 to 7 using the --ioprio option of the prlctl set command. For example, you can issue the following command to set the I/O priority of the container MyCT and the virtual machine MyVM to 6:
# prlctl set MyCT --ioprio 6 # prlctl set MyVM --ioprio 6
To check the I/O priority level currently applied to the container MyCT and the virtual machine MyVM, you can execute the following commands:
-
For container
MyCT:# grep IOPRIO /etc/vz/conf/fbb30afa-e770-4081-9d9e-6b9c262eb091.conf IOPRIO="6" -
For the virtual machine
MyVM:# prlctl list MyVM --info | grep ioprio cpu cpus=2 VT-x accl=high mode=32 ioprio=6 iolimit='0'