- 論壇徽章:
- 0
|
在使用tc做流量控制的時候,對兩個參數(shù)很困惑,關(guān)于peakrate跟mtu參數(shù),實(shí)驗(yàn)發(fā)現(xiàn)mtu參數(shù)對影響很大,不明白這個到底是如何來影響的?
文檔中關(guān)于這個的內(nèi)容:
peakrate
If tokens are available, and packets arrive, they are sent out immediately by default, at 'lightspeed' so to speak. That may not be what you want, especially if you have a large bucket.
The peakrate can be used to specify how quickly the bucket is allowed to be depleted. If doing everything by the book, this is achieved by releasing a packet, and then wait just long enough, and release the next. We calculated our waits so we send just at peakrate.
However, due to the default 10ms timer resolution of Unix, with 10.000 bits average packets, we are limited to 1mbit/s of peakrate!
mtu/minburst
The 1mbit/s peakrate is not very useful if your regular rate is more than that. A higher peakrate is possible by sending out more packets per timertick, which effectively means that we create a second bucket!
This second bucket defaults to a single packet, which is not a bucket at all.
To calculate the maximum possible peakrate, multiply the configured mtu by 100 (or more correctly, HZ, which is 100 on Intel, 1024 on Alpha).
還請做過的同學(xué)指點(diǎn)一下 |
|