Skip to contentSkip to conversation

tools/python/xend: VBD QoS policy bits

PATCH In review William Pitcock 2 participants 3 messages Aug 14, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/python/xend: VBD QoS policy bits

Add the ability to define VBD QoS policy in the xend layer.

Consider the following vbd entry:

vbd = [
'phy:/dev/server/virtualmachine1-disk,xvda1,w,credit=5000/s@50ms',
]

This means that a VM may perform 5000 I/O operations per second, with credit being replenished every 50 milliseconds.

The 'credit' xenstore value is by the blkback driver to ratelimit I/O operations for the specific device.

---

 README.sxpcfg            |    1 +
 xen/xend/server/blkif.py |   43 ++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 41 insertions(+), 3 deletions(-)
tools/python/README.sxpcfg +1 -0
@@ -82,6 +82,7 @@
   - uname
   - dev (ioemu:, .. etc)
   - mode (r, w. w!)
+  - credit
 
 vif
   - type
tools/python/xen/xend/server/blkif.py +40 -3

70 lines not on this page · raw message

#1 lore raw
Quoted 10 lines · On Friday 14 August 2009 11:48:47 William Pitcock wrote:

Add the ability to define VBD QoS policy in the xend layer.

Consider the following vbd entry:

vbd = [
'phy:/dev/server/virtualmachine1-disk,xvda1,w,credit=5000/s@50ms',
]

This means that a VM may perform 5000 I/O operations per second, with credit being replenished every 50 milliseconds.

Does this enforce the VBD to do 5000 IO operations or none at all or is this considered as an upper limit ?

Quoted 4 lines

The 'credit' xenstore value is by the blkback driver to ratelimit I/O operations for the specific device.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
#2 lore raw

Hi,

Quoted 3 lines · ----- "Christoph Egger

Does this enforce the VBD to do 5000 IO operations or none at all or is
this considered as an upper limit ?

That is dependent on the dom0 kernel, obviously... but my kernel-side patch basically keeps the specified IOPS target as the upper limit, while also allowing some level of initial burstability.

The goal here is to stop domUs which have gone swap-happy from degrading system performance (especially with say, SANs) while the domU's owner is not around to fix the problem... basically instead of the entire storage volume's resources being consumed, the requests going to the physical volume become ratelimited.

I submitted some patches earlier (around March, then May) which worked a little bit differently, and feel that this way is more self-explanatory and generally robust.

William