mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
docs: Clarify 'burst' units for QoS
The burst attribute for bandwidth specifies how much bytes can be transmitted in a single burst. Therefore, the unit is in multiples of 1024 (thus kibibytes) not SI-like 1000. It has always been like that. The 'tc' output is still confusing though, for instance: # tc class add dev $DEV parent 1: classid 1:1 htb rate 1000kbps burst 2097152 # tc class show dev vnet2 class htb 1:1 root rate 8Mbit ceil 8Mbit burst 2Mb cburst 1600b Please note that 2097152 = 2*1024*1024. Even the man page is confusing. From tc(8): kb or k Kilobytes mb or m Megabytes But I guess this is because 'tc' predates IEC standardisation of binary multiples and thus can't change without breaking scripts parsing its output. And while at it, adjust _virNetDevBandwidthRate struct member description, to make it obvious which members use SI/IEC units. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
d2a9c24b84
commit
f3b422d9cc
@ -634,7 +634,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>burst</code></dt>
|
<dt><code>burst</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Optional attribute which specifies the amount of kilobytes that
|
Optional attribute which specifies the amount of kibibytes that
|
||||||
can be transmitted in a single burst at <code>peak</code> speed.
|
can be transmitted in a single burst at <code>peak</code> speed.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>floor</code></dt>
|
<dt><code>floor</code></dt>
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
|
|
||||||
typedef struct _virNetDevBandwidthRate virNetDevBandwidthRate;
|
typedef struct _virNetDevBandwidthRate virNetDevBandwidthRate;
|
||||||
struct _virNetDevBandwidthRate {
|
struct _virNetDevBandwidthRate {
|
||||||
unsigned long long average; /* kbytes/s */
|
unsigned long long average; /* kilobytes/s */
|
||||||
unsigned long long peak; /* kbytes/s */
|
unsigned long long peak; /* kilobytes/s */
|
||||||
unsigned long long floor; /* kbytes/s */
|
unsigned long long floor; /* kilobytes/s */
|
||||||
unsigned long long burst; /* kbytes */
|
unsigned long long burst; /* kibibytes */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _virNetDevBandwidth virNetDevBandwidth;
|
typedef struct _virNetDevBandwidth virNetDevBandwidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user