XenServer Administrator's Guide 4.1.0
Storage
30
Note also that in the shared SR case i.e. where multiple hosts are accessing the same LUN, the QoS is
applied to VBDs accessing the LUN from the same host, i.e. QoS is not applied across hosts in the pool.
Note that QoS settings will not have any effect on VHD-based storage types.
Before configuring any QoS parameters for a VBD, ensure that the disk scheduler for the SR has been set
appropriately. See Section 3.4.7, “Adjusting the disk IO scheduler for an LVM-based SR ” for details on how
to adjust the scheduler. The scheduler parameter must be set to 'cfq' on the SR for which the QoS is desired.
Note
Don't forget to set the scheduler to 'cfq' on the SR, and make sure that the PBD has been re-plugged
in order for the scheduler change to take effect.
The first parameter is qos_algorithm_type. This parameter needs to be set to the value ionice, which
is the only type of QoS algorithm supported for virtual disks in this release.
The QoS parameters themselves are set with key/value pairs assigned to the qos_algorithm_type pa-
rameter. For virtual disks, qos_algorithm_type takes a sched key, and depending on the value, also
requires a class key.
Possible values of qos_algorithm_type:sched are
• sched=rt or sched=real-time sets the QoS scheduling parameter to real time priority, which requires
a class parameter to set a value
• sched=idle sets the QoS scheduling parameter to idle priority, which requires no class parameter to
set any value
• sched=<anything> sets the QoS scheduling parameter to best effort priority, which requires a class
parameter to set a value
The possible values for class are
• One of the following keywords: highest, high, normal, low, lowest
• an integer between 0 and 7, where 0 is the highest priority and 7 is the lowest
To enable the disk QoS settings, you also need to set the other-config:scheduler to cfq and replug
PBDs for the storage in question.
For example, the following CLI commands set the virtual disk's VBD to use real time priority=5:
xe vbd-param-set uuid=<vbd UUID> qos_algorithm_type=ionice
xe vbd-param-set uuid=<vbd UUID> qos_algorithm_params:sched=rt
xe vbd-param-set uuid=<vbd UUID> qos_algorithm_params:class=5
xe pbd-param-set uuid=<pbd UUID> other-config:scheduler-cfg
xe pbd-plug uuid=<pbd UUID>










