netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Denys Fedoryschenko <denys@visp.net.lb>
Cc: netdev@vger.kernel.org
Subject: Re: iproute2 / tbf with large burst seems broken again
Date: Wed, 26 Aug 2009 21:03:35 +0200	[thread overview]
Message-ID: <20090826190335.GA3009@ami.dom.local> (raw)
In-Reply-To: <20090825200306.GA3020@ami.dom.local>

On Tue, Aug 25, 2009 at 10:03:06PM +0200, Jarek Poplawski wrote:
> Denys Fedoryschenko wrote, On 08/25/2009 01:16 PM:
> ...
> > But this one maybe will overflow because of limitations in iproute2.
> > 
> > PPoE_146 ~ # ./tc -s -d qdisc show dev ppp13
> > qdisc tbf 8004: root rate 96000bit burst 797465b/8 mpu 0b lat 275.4s
> >  Sent 82867 bytes 123 pkt (dropped 0, overlimits 0 requeues 0)
> >  rate 0bit 0pps backlog 0b 0p requeues 0
> > qdisc ingress ffff: parent ffff:fff1 ----------------
> >  Sent 506821 bytes 1916 pkt (dropped 0, overlimits 0 requeues 0)
> >  rate 0bit 0pps backlog 0b 0p requeues 0
> > 
> > So maybe all of that just wrong way of using TBF.
> 
> I guess so; I've just recollected you described it some time ago. If
> it were done only with TBF it would mean very large surges with line
> speed and probably a lot of drops by ISP. Since you're ISP, you
> probably drop this with HTB or something (then you should mention it
> describing the problem) or keep very long queues which means great
> latencies. Probably there is a lot of TCP resending btw. Using TBF
> with HTB etc. is considered wrong idea anyway. (But if it works for
> you shouldn't care.)
> 
> > At same time this means, if HTB and policers in filters done same way, that 
> > QoS in Linux cannot do similar to squid delay pools feature:
> > 
> > First 10Mb give with 1Mbit/s, then slow 64Kbit/s. If user use less than 64K - 
> > recharge with that unused bandwidth a "10 Mb / 1Mbit bucket".

So I thought about it a little more and I'm quite sure this idea with
large buckets is wrong/ineffective. I guess you could "describe" it
in HTB something like this:

tc class add dev ppp0 parent 1:3 classid 1:4 htb rate 64kbit\
   burst 10mb cburst 10mb
tc class add dev ppp0 parent 1:4 classid 1:4 htb rate 64kbit ceil 1mbit\
   cburst 10mb

(Of course, there would be this overflow problem with 2.6.31-rc and
so big buffers.)

So, the main point is: if somebody didn't send his/her 64Kbits long
time ago it usually means it's lost and can't be shared later. You
could try your luck, but e.g. if at the moment all users use their
64Kbits plus one of them 'thinks' he/she can send "saved" bits, it
means some other guy doesn't get his/her minimum (they send together
but some bytes will be dropped or queued).

It would work OK if you've reserved 1mbit per 64Kbit user but I guess
it's not what you do. So, IMHO, it should be better to use classical
methods to guarantee these 64Kbit with reasonable latency, plus
additonal borrowing with ceil and reasonable (much smaller buffers)
yet.

Jarek P.

  reply	other threads:[~2009-08-26 19:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24 23:37 iproute2 / tbf with large burst seems broken again Denys Fedoryschenko
2009-08-25  6:22 ` Jarek Poplawski
2009-08-25  7:34   ` Denys Fedoryschenko
2009-08-25  8:43     ` Jarek Poplawski
2009-08-25  9:00       ` Jarek Poplawski
2009-08-25  9:41         ` Jarek Poplawski
2009-08-25 10:29           ` Denys Fedoryschenko
2009-08-25 11:16           ` Denys Fedoryschenko
2009-08-25 12:13             ` Jarek Poplawski
2009-08-25 12:18               ` Denys Fedoryschenko
2009-08-26 21:59                 ` [PATCH] " Jarek Poplawski
2009-08-31  5:05                   ` David Miller
2009-08-31  5:30                     ` Jarek Poplawski
2009-08-31  5:32                       ` David Miller
2009-08-31  8:03                         ` Denys Fedoryschenko
2009-08-31  8:18                         ` Denys Fedoryschenko
2009-08-31  8:37                           ` David Miller
2009-08-31  8:51                             ` Denys Fedoryschenko
2009-08-31  9:05                               ` Jarek Poplawski
2009-08-31  8:58                             ` Jarek Poplawski
2009-09-01 22:51                               ` David Miller
2009-08-31  8:49                           ` Jarek Poplawski
2009-08-25 20:03             ` Jarek Poplawski
2009-08-26 19:03               ` Jarek Poplawski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-24 12:07 Denys Fedoryschenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090826190335.GA3009@ami.dom.local \
    --to=jarkao2@gmail.com \
    --cc=denys@visp.net.lb \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).