netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denys Fedoryschenko <denys@visp.net.lb>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	netdev@vger.kernel.org
Subject: Re: [RFC] iproute2/tc caching proposal
Date: Thu, 7 May 2009 22:41:14 +0300	[thread overview]
Message-ID: <200905072241.14646.denys@visp.net.lb> (raw)
In-Reply-To: <4A032C24.7060709@gmail.com>

On Thursday 07 May 2009 21:44:52 Jarek Poplawski wrote:
> Denys Fedoryschenko wrote, On 05/07/2009 12:03 AM:
> > Since already someone did caching in iproute2, my changes is very
> > trivial, but giving huge improvement in batch performance (30k rules
> > 10minutes vs 30 seconds).
> >
> > ll_init_map is called in many places in tc, but since tc not changing
> > anything, that can change this map, i think it is enough to call it only
> > at the beginning, after rtnl_open().
> >
> > Only one exclusion - tc monitor, because it is running long time, and
> > things can change over this time, so we call ll_init_map on each received
> > rtnetlink event.
>
> Do you mean 30 sec. is to short for a change? I don't know these things
> enough; your idea looks very nice, but I wonder if you tested how it
> behaves if e.g. after 15k rules some dev goes away which is used in the
> next 15k?
Well, i think if this point are criticial - not good idea to use batching at 
all. 
Bad condition can happen on 1k interface, and "old style", just each line 
takes hundreds of milliseconds, and there is chance that when root qdisc 
created, in batch, interface doesn't exist, and when you will start creating 
classes it will appear.

In my case even if device disappeared and id is not valid , it will just not 
add shaper(error, in case of flag -force - not critical), because id of 
interface will be different, even if device with same name appeared, because 
device id is incremental as i understand.

For example:
ppp100 assigned to john, who have 100Mbit unlimited. Let's say ppp100 have 
assigned id 12345.
Batch started, and before it is reached john, he disconnected and another user 
connected let's say willy (32Kbit/s) and catch ppp100, but id will be 
different, it will just give error. I use flag "-force" for that.
If i will refresh "interface-id" map on each batch line, first, on system with 
1k+ interface it will take around 10 minutes instead of 30 seconds, to load 
20-40k lines batch file. Second, willy can get 100Mbits because of mistake.



>
> > Also please check "[RFC] [IPROUTE2] Filter class output by classid", if
> > it is ok. Many people told it is useful patch.
>
> I agree it's useful and quite natural option.
>
> Thanks,
> Jarek P.



      parent reply	other threads:[~2009-05-07 19:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 22:03 [RFC] iproute2/tc caching proposal Denys Fedoryschenko
2009-05-07 18:44 ` Jarek Poplawski
2009-05-07 19:27   ` Jarek Poplawski
2009-05-07 19:49     ` Denys Fedoryschenko
2009-05-07 20:01       ` Jarek Poplawski
2009-05-07 19:41   ` Denys Fedoryschenko [this message]

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=200905072241.14646.denys@visp.net.lb \
    --to=denys@visp.net.lb \
    --cc=jarkao2@gmail.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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).