NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/56319: CBQ: high bandwidths are inaccurate
>Number: 56319
>Category: kern
>Synopsis: CBQ: high bandwidths are inaccurate
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 21 05:15:00 +0000 2021
>Originator: Ryota Ozaki
>Release: current
>Organization:
>Environment:
NetBSD kvm 9.99.86 NetBSD 9.99.86 (KVM) #83: Wed Jul 21 12:14:19 JST 2021 (hidden) amd64
>Description:
For example even if you specify 750 Mbps to a class, it is treated as 800 Mbps
internally.
This happens because CBQ represents a bandwidth as nanosecond per byte
and an integer in the kernel. So bandwidths from 730 Mbps to 800 Mbps
are all rounded to 800 Mbps.
>How-To-Repeat:
# cat /etc/altq.conf
interface vioif1 bandwidth 1000M cbq no-control
class cbq vioif1 root NULL pbandwidth 100
class cbq vioif1 0: root pbandwidth 75 default
# altqd
# altqstat -c 1
altqstat: cbq on interface vioif1
Class 1 on Interface vioif1: root
priority: 0 depth: 1 offtime: 1 [us] wrr_allot: 1500 bytes
nsPerByte: 8 (1000.00Mbps), Measured: 90711.30M [bps]
pkts: 0, bytes: 0
overs: 0, overactions: 0
borrows: 0, delays: 0
drops: 0, drop_bytes: 0
QCount: 0, (qmax: 30)
AvgIdle: 0 [us], (maxidle: 0 minidle: -12 [us])
Class 2 on Interface vioif1: 0:
priority: 1 depth: 0 offtime: 7 [us] wrr_allot: 1500 bytes
nsPerByte: 10 (800.00Mbps)
pkts: 0, bytes: 0
overs: 0, overactions: 0
borrows: 0, delays: 0
drops: 0, drop_bytes: 0
QCount: 0, (qmax: 30)
AvgIdle: 2 [us], (maxidle: 2 minidle: -15 [us])
>Fix:
Treat bandwidths as picosecond per byte in the kernel.
Home |
Main Index |
Thread Index |
Old Index