As of 042stab084.3 and the newly released vzctl 4.1-6, (currently, this kernel is in the testing tier) OpenVZ systems administrators will be able to to set container-level I/O (--iolimit) & IOPS (--iopslimit) values, effectively replacing the former "I/O Priority" (--ioprio). In a nutshell, the node admin simply sets the I/O limit of the container from the CLI in Mbps through vzctl and ... bingo, I/O limits are set -- far less obtrusive and more accurate than it's predecessor.
Unsure when the supported kernel will move to stable. Even then it should be tested appropriately.
Yay to I/O limits!
October 29, 2013
Today we are releasing a somewhat small but very important OpenVZ feature: per-container disk I/O bandwidth and IOPS limiting.
OpenVZ have I/O priority feature for a while, which lets one set a per-container I/O priority -- a number from 0 to 7. This is working in a way that if two similar containers with similar I/O patterns, but different I/O priorities are run on the same system, a container with a prio of 0 (lowest) will have I/O speed of about 2-3 times less than that of a container with a prio of 7 (highest). This works for some scenarios, but not all.
So, I/O bandwidth limiting was introduced in Parallels Cloud Server, and as of today is available in OpenVZ as well. Using the feature is very easy: you set a limit for a container (in megabytes per second), and watch it obeying the limit. For example, here I try doing I/O without any limit set first:
root@host# vzctl set 777 --iolimit 3M --save UB limits were set successfully Setting iolimit: 3145728 bytes/sec CT configuration saved to /etc/vz/conf/777.conf root@host# vzctl enter 777 root@CT:/# cat /dev/urandom | pv -c - >/bigfile3 39.1MB 0:00:10 [ 3MB/s] [ <=> ] ^C
If you run it yourself, you'll notice a spike of speed at the beginning, and then it goes down to the limit. This is so-called burstable limit working, it allows a container to over-use its limit (up to 3x) for a short time.
In the above example we tested writes. Reads work the same way, except when read data are in fact coming from the page cache (such as when you are reading the file which you just wrote). In this case, no actual I/O is performed, therefore no limiting.
Second feature is I/O operations per second, or just IOPS limit. For more info on what is IOPS, go read the linked Wikipedia article -- all I can say here is for traditional rotating disks the hardware capabilities are pretty limited (75 to 150 IOPS is a good guess, or 200 if you have high-end server class HDDs), while for SSDs this is much less of a problem. IOPS limit is set in the same way as iolimit (vzctl set $CTID --iopslimit NN --save), although measuring its impact is more tricky.</o>
Last edited by Technolojesus; 11-02-2013 at 04:47 AM.
| John Edel • Jetfire Networks L.L.C. • Trusted Hosting Solutions
| Consistent, Reliable, Stable OpenVZ & KVM Virtual Private Servers
| SpamWall AV & Full SMTP Filtering • Now an SSLStore Titanium Partner!