mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: openapi: Add rate_limiter_config to the `DiskConfig
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -607,6 +607,48 @@ components:
|
|||||||
args:
|
args:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
TokenBucket:
|
||||||
|
required:
|
||||||
|
- size
|
||||||
|
- refill_time
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
minimum: 0
|
||||||
|
description: The total number of tokens this bucket can hold.
|
||||||
|
one_time_burst:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
minimum: 0
|
||||||
|
description: The initial size of a token bucket.
|
||||||
|
refill_time:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
minimum: 0
|
||||||
|
description: The amount of milliseconds it takes for the bucket to refill.
|
||||||
|
description:
|
||||||
|
Defines a token bucket with a maximum capacity (_size_), an initial burst size
|
||||||
|
(_one_time_burst_) and an interval for refilling purposes (_refill_time_).
|
||||||
|
The refill-rate is derived from _size_ and _refill_time_, and it is the constant
|
||||||
|
rate at which the tokens replenish. The refill process only starts happening after
|
||||||
|
the initial burst budget is consumed.
|
||||||
|
Consumption from the token bucket is unbounded in speed which allows for bursts
|
||||||
|
bound in size by the amount of tokens available.
|
||||||
|
Once the token bucket is empty, consumption speed is bound by the refill-rate.
|
||||||
|
|
||||||
|
RateLimiterConfig:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
bandwidth:
|
||||||
|
$ref: '#/components/schemas/TokenBucket'
|
||||||
|
ops:
|
||||||
|
$ref: '#/components/schemas/TokenBucket'
|
||||||
|
description:
|
||||||
|
Defines an IO rate limiter with independent bytes/s and ops/s limits.
|
||||||
|
Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
|
||||||
|
|
||||||
DiskConfig:
|
DiskConfig:
|
||||||
required:
|
required:
|
||||||
- path
|
- path
|
||||||
@@ -637,6 +679,8 @@ components:
|
|||||||
poll_queue:
|
poll_queue:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
rate_limiter_config:
|
||||||
|
$ref: '#/components/schemas/RateLimiterConfig'
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user