Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2016 11:30:23 +0200
From:      "Kristof Provost" <kp@FreeBSD.org>
To:        "Radek =?utf-8?q?Krej=C4=8Da?=" <radek.krejca@starnet.cz>
Cc:        "freebsd-pf@freebsd.org" <freebsd-pf@freebsd.org>
Subject:   Re: Max altq bandwidth 4.26 Gbit
Message-ID:  <13955BA9-910E-4C4A-B86A-5A355F8A10C9@FreeBSD.org>
In-Reply-To: <AAA772390F662049B3046CA8C662C08506A4BE08@EXCHANGE.mail.starnet.cz>
References:  <AAA772390F662049B3046CA8C662C08506A4BE01@EXCHANGE.mail.starnet.cz> <A58CF11E-B2A3-4021-9827-C093730B2D1D@FreeBSD.org> <AAA772390F662049B3046CA8C662C08506A4BE08@EXCHANGE.mail.starnet.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13955BA9-910E-4C4A-B86A-5A355F8A10C9>