小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

關(guān)于tc 中htb算法中的r2q和quantum的做用

 sven_ 2014-07-04

分類: 網(wǎng)絡(luò)與安全

tc qdisc add dev eth0 root handle 1: htb r2q 10 default 10

r2q:在規(guī)則中的作用是用來分配剩余帶寬的全局變量,它的默認(rèn)值為10,此時最實用的規(guī)則的速度為15KBps(120kbit)。
quantum與r2q的關(guān)系為quantum=rate/r2q,quantum的值必須在1500到60000之間,值越小越好
每個規(guī)則的quantum的值就是從父類借用帶寬的因子(也就是每個子類每次可以從父類借用空閑帶寬的大小)也可以說是與其他子類同時從父類借帶寬的比例。


rate單位為Mbit時,上限臨界值為 0.7左右,即r2q最小要設(shè)為0.7。
rate單位為Gbit時,上限臨界值為700左右,即r2q最小要設(shè)為700。


tc returns: "quantum of class # is small. Consider r2q change."

Reported by Alwin Garside on 2009-01-28
AffectsStatusImportanceAssigned toMilestone
Vulpes
Low
Alwin Garside

Bug Description

It is documented in HTB manual. The complaint was not displayed before and sharing was silently wrong. Quantum of leaf should be between 1500 and 60000 and it is computed as rate/r2q (or can be supplied independly). So that if your maximal leaf rate is 1Mbit (120000Bps) then r2q should be 3. If max rate is 10kbit (1200Bps) then r2q should be 1. It is warning only and will not affect functionality, only precision. devik

Smallest rate : 16kbit = 2 kilobyt / r2q (=10) = 200. And this is < 1500. So you get warnings. Biggest rate : 100mbit = 12.5 mbyte / r2q = 1.2 Mbyte > 60.000. So you get warnings.

If you do tc qdisc add dev eth0 root handle 1: htb default 10 r2q 1 Smallest rate : 16kbit = 2kilobyte / r2k = 2000. And this is > 1500. So no warnings. Biggest rate : 100mbit = 12.5 mbyte / r2q = 12.5 Mbyte > 60.000. So you get warnings. But you can overrule the quantum : tc class add dev eth0 parent 1:1 classid 1:11 htb rate 128kbit burst 2k quantum 60000

Quantum is used when 2 classes are getting more bandwidth then the rate. So it's only important for sharing the remaining bandwidth. In that case, each class may send quantum bytes.

see: http://archives.free.net.ph/message/20051020.143239.c839805b.en.html#lartc




閱讀(781) | 評論(0) | 轉(zhuǎn)發(fā)(0) |

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多