From 6df7ccb10e210e1a7fd8a4fdb30527f767c5e3b3 Mon Sep 17 00:00:00 2001 From: Lei Li Date: Tue, 15 Nov 2011 17:02:46 +0800 Subject: [PATCH] Support block I/O throttle in XML Enable block I/O throttle for per-disk in XML, as the first per-disk IO tuning parameter. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- docs/formatdomain.html.in | 45 ++++++++++++- docs/schemas/domaincommon.rng | 122 ++++++++++++++++++++++++---------- src/conf/domain_conf.c | 106 ++++++++++++++++++++++++++++- src/conf/domain_conf.h | 14 ++++ 4 files changed, 249 insertions(+), 38 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index e4fef9e4b4..204373e2a2 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -536,7 +536,11 @@ single host block device, if they are backed by files within the same host file system, which is why this tuning parameter is at the global domain level rather than associated with each - guest disk device. Each device element has two + guest disk device (contrast this to + the <iotune> + element which can apply to an + individual <disk>). + Each device element has two mandatory sub-elements, path describing the absolute path of the device, and weight giving the relative weight of that device, in the range [100, @@ -945,6 +949,11 @@ <driver name="tap" type="aio" cache="default"/> <source file='/var/lib/xen/images/fv0'/ startupPolicy='optional'> <target dev='hda' bus='ide'/> + <iotune> + <total_bytes_sec>10000000</total_bytes_sec> + <read_iops_sec>400000</read_iops_sec> + <write_iops_sec>100000</write_iops_sec> + </iotune> <boot order='2'/> <encryption type='...'> ... @@ -1062,6 +1071,40 @@ Since 0.0.3; bus attribute since 0.4.3; "usb" attribute value since after 0.4.4; "sata" attribute value since 0.9.7 +
iotune
+
The optional iotune element provides the + ability to provide additional per-device I/O tuning, with + values that can vary for each device (contrast this to + the <blkiotune> + element, which applies globally to the domain). Currently, + the only tuning available is Block I/O throttling for qemu. + This element has optional sub-elements; any sub-element not + specified or given with a value of 0 implies no + limit. Since 0.9.8 +
+
total_bytes_sec
+
The optional total_bytes_sec element is the + total throughput limit in bytes per second. This cannot + appear with read_bytes_sec + or write_bytes_sec.
+
read_bytes_sec
+
The optional read_bytes_sec element is the + read throughput limit in bytes per second.
+
write_bytes_sec
+
The optional write_bytes_sec element is the + write throughput limit in bytes per second.
+
total_iops_sec
+
The optional total_iops_sec element is the + total I/O operations per second. This cannot + appear with read_iops_sec + or write_iops_sec.
+
read_iops_sec
+
The optional read_iops_sec element is the + read I/O operations per second.
+
write_iops_sec
+
The optional write_iops_sec element is the + write I/O operations per second.
+
driver
The optional driver element allows specifying further details diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 97a23a2a59..22bbd4608e 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -618,42 +618,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2615,6 +2620,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +