Extend tbrsize heuristic in pfctl(8) to provide a sensible value for
higher bandwidth interfaces. The new value is used above 2.5 Gbps, which is the highest standard rate that could be used prior to r338209, so the default behavior for all existing systems should remain the same. The value of 128 chosen is a balance between being big enough to reduce potential precision/quantization effects stemming from frequent bucket refills over small time intervals and being small enough to prevent a greedy driver from burst dequeuing more packets than it has available hardware ring slots for whenever altq transitions from idle to backlogged. Reviewed by: jmallett, kp MFC after: 2 weeks Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D16852
This commit is contained in:
parent
5b27058e96
commit
ff7b3f731a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338253
@ -299,8 +299,10 @@ eval_pfaltq(struct pfctl *pf, struct pf_altq *pa, struct node_queue_bw *bw,
|
||||
size = 4;
|
||||
else if (rate <= 200 * 1000 * 1000)
|
||||
size = 8;
|
||||
else
|
||||
else if (rate <= 2500 * 1000 * 1000)
|
||||
size = 24;
|
||||
else
|
||||
size = 128;
|
||||
size = size * getifmtu(pa->ifname);
|
||||
pa->tbrsize = size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user