Hi,

I noticed there’re different ways to create throttle group based on doc: 
https://github.com/qemu/qemu/blob/master/docs/throttle.txt
Option 1: through QMP “object-add”
Option 2: through “-object”

Based on the info(the following section I pasted) described in doc, my 
understanding is option1 is stable way to create throttle-group while option2 
is not,  am I correct? Any confirmation would be appreciated!

“
A group can be created using the object-add QMP function:

   { "execute": "object-add",
     "arguments": {
       "qom-type": "throttle-group",
       "id": "group0",
       "limits" : {
         "iops-total": 1000,
         "bps-write": 2097152
       }
     }
   }

throttle-group has a 'limits' property (of type ThrottleLimits as
defined in qapi/block-core.json) which can be set on creation or later
with 'qom-set'.

A throttle-group can also be created with the -object command line
option but at the moment there is no way to pass a 'limits' parameter
that contains a ThrottleLimits structure. The solution is to set the
individual values directly, like in this example:

   -object throttle-group,id=group0,x-iops-total=1000,x-bps-write=2097152

Note however that this is not a stable API (hence the 'x-' prefixes) and
will disappear when -object gains support for structured options and
enables use of 'limits'.
“


--

Wu

Reply via email to