diff options
author | Benoît Canet <benoit@irqsave.net> | 2013-09-02 14:14:40 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-09-06 15:25:07 +0200 |
commit | 3e9fab690d59ac15956c3733fe0794ce1ae4c4af (patch) | |
tree | 0d7b4d55ff9a3664091148713c5a5bc3e2a02c8d /qmp-commands.hx | |
parent | cc0681c45430a1f1a4c2d06e9499b7775afc9a18 (diff) |
block: Add support for throttling burst max in QMP and the command line.
The max parameter of the leaky bucket throttling algorithm can be used to
allow the guest to do bursts.
The max value is a pool of I/O that the guest can use without being throttled
at all. Throttling is triggered once this pool is empty.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 8a8f342eab..7c9667bcce 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1389,7 +1389,7 @@ EQMP { .name = "block_set_io_throttle", - .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l", + .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?", .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle, }, @@ -1408,6 +1408,12 @@ Arguments: - "iops": total I/O operations per second (json-int) - "iops_rd": read I/O operations per second (json-int) - "iops_wr": write I/O operations per second (json-int) +- "bps_max": total max in bytes (json-int) +- "bps_rd_max": read max in bytes (json-int) +- "bps_wr_max": write max in bytes (json-int) +- "iops_max": total I/O operations max (json-int) +- "iops_rd_max": read I/O operations max (json-int) +- "iops_wr_max": write I/O operations max (json-int) Example: @@ -1417,7 +1423,13 @@ Example: "bps_wr": 0, "iops": 0, "iops_rd": 0, - "iops_wr": 0 } } + "iops_wr": 0, + "bps_max": 8000000, + "bps_rd_max": 0, + "bps_wr_max": 0, + "iops_max": 0, + "iops_rd_max": 0, + "iops_wr_max": 0 } } <- { "return": {} } EQMP @@ -1758,6 +1770,12 @@ Each json-object contain the following: - "iops": limit total I/O operations per second (json-int) - "iops_rd": limit read operations per second (json-int) - "iops_wr": limit write operations per second (json-int) + - "bps_max": total max in bytes (json-int) + - "bps_rd_max": read max in bytes (json-int) + - "bps_wr_max": write max in bytes (json-int) + - "iops_max": total I/O operations max (json-int) + - "iops_rd_max": read I/O operations max (json-int) + - "iops_wr_max": write I/O operations max (json-int) - "image": the detail of the image, it is a json-object containing the following: - "filename": image file name (json-string) @@ -1827,6 +1845,12 @@ Example: "iops":1000000, "iops_rd":0, "iops_wr":0, + "bps_max": 8000000, + "bps_rd_max": 0, + "bps_wr_max": 0, + "iops_max": 0, + "iops_rd_max": 0, + "iops_wr_max": 0, "image":{ "filename":"disks/test.qcow2", "format":"qcow2", |