Skip to content

Leaky bucket throttling and features

Benoît Canet qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 14 repliesIn review
  2. v25 patches 4 repliesSuperseded
  3. v14 patches 0 repliesSuperseded

Changes in v3 from the cover letter

Enable timer only during I/O activity [Stefan]
Mark function as coroutine_fn [Stefan]
Guard these function checking they are in a coroutine [Stefan] Use defines to access buckets [Stefan]
Fix typo [Stefan]
reset throttling metric on iddle [Benoît]
rename invalid to check_io_limit [Stefan]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5block: Repair the throttling code.block.c include/block/coroutine.h qemu-coroutine-lock.c+29 -82 replies
2/5block: Modify the throttling code to implement the leaky bucket algorithm.block.c blockdev.c include/block/block_int.h+339 -2012 replies
3/5block: Add support for throttling burst threshold in QMP and the command line.block/qapi.c blockdev.c hmp.c +3 more+205 -225 replies
4/5block: Add iops_sector_count to do the iops accounting for a given io size.block.c block/qapi.c blockdev.c +5 more+54 -90 replies
5/5block: Add throttling percentage metrics.block.c block/qapi.c hmp.c +2 more+39 -42 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchEric Blake
1/5R-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH V3 for-1.6 0/5] Leaky bucket throttling and features

The first patch fixes the throttling which was broken by a previous commit.

The next patch replace the existing throttling algorithm by the well described leaky bucket algorithm.

Third patch implement bursting by adding *_threshold parameters to qmp_block_set_io_throttle.

The last one allow to define the max size of an io when throttling by iops via iops_sector_count to avoid vm users cheating on the iops limit.

The last patch adds a metric reflecting how much the I/O are throttled.

since v1:
Add throttling percentage metric [Benoît]

since v2:
Enable timer only during I/O activity [Stefan]
Mark function as coroutine_fn [Stefan]
Guard these function checking they are in a coroutine [Stefan] Use defines to access buckets [Stefan]
Fix typo [Stefan]
reset throttling metric on iddle [Benoît]
rename invalid to check_io_limit [Stefan]

Benoît Canet (5):
block: Repair the throttling code.
block: Modify the throttling code to implement the leaky bucket
algorithm.
block: Add support for throttling burst threshold in QMP and the
command line.
block: Add iops_sector_count to do the iops accounting for a given io
size.
block: Add throttling percentage metrics.

 block.c                   |  493 ++++++++++++++++++++++++++++-----------------
 block/qapi.c              |   32 +++
 blockdev.c                |  174 ++++++++++++++--
 hmp.c                     |   38 +++-
 include/block/block_int.h |   18 +-
 include/block/coroutine.h |    9 +-
 qapi-schema.json          |   42 +++-
 qemu-coroutine-lock.c     |   20 +-
 qemu-options.hx           |    2 +-
 qmp-commands.hx           |   34 +++-
 10 files changed, 642 insertions(+), 220 deletions(-)
Signature · 1 line
1.7.10.4