Max altq bandwidth 4.26 Gbit

Kristof Provost kp at FreeBSD.org
Wed Aug 10 09:30:27 UTC 2016


On 10 Aug 2016, at 11:19, Radek Krejča wrote:
>> That looks like you might be hitting the maximum of an unsigned
>> integer.
>> Try using relative specifications (i.e. as a percentage) instead.
>>
> Yes, I think so. But I dont know, that I can say relative 
> specification for inteface bandwidth. Could you show me how?
>
I don’t run ALTQ myself, so all I can say is what the man page says:
      bandwidth ⟨bw⟩
            The maximum bitrate for all queues on an interface may be 
specified
            using the bandwidth keyword.  The value can be specified as 
an
            absolute value or as a percentage of the interface 
bandwidth.  When
            using an absolute value, the suffixes b, Kb, Mb, and Gb are 
used to
            represent bits, kilobits, megabits, and gigabits per second,
            respectively.  The value must not exceed the interface 
bandwidth.  If
            bandwidth is not specified, the interface bandwidth is used 
(but take
            note that some interfaces do not know their bandwidth, or 
can adapt
            their bandwidth rates).

I’d expect that ‘altq on $int_if cbq bandwidth 85% queue { 
default_nat.........’ would do what you want.
Looking at the code, I’m not at all sure that it’ll end up working 
either, but it’s worth a try.

Fundamentally, we’ll have to change pf (and worse, the interface to 
user space) to use 64-bit integers to carry bandwidth information, not 
32-bit ones.
Can you file a bug so this doesn’t get forgotten?

> I have 10Gb line and I need to shape my client with exact bandwidth. 
> How can I manage with your advice?
>
You can only specify integer percentages (so 85%, not 85.5%), so I’m 
afraid you’ll lose some accuracy.

Regards,
Kristof


More information about the freebsd-pf mailing list