netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Radu Rendec <radu.rendec@ines.ro>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Jesper Dangaard Brouer <hawk@diku.dk>,
	Denys Fedoryschenko <denys@visp.net.lb>,
	netdev <netdev@vger.kernel.org>,
	Calin Velea <calin.velea@gemenii.ro>
Subject: Re: htb parallelism on multi-core platforms
Date: Wed, 29 Apr 2009 16:15:51 +0300	[thread overview]
Message-ID: <1241010951.6554.355.camel@blade.ines.ro> (raw)
In-Reply-To: <20090429122312.GA2759@ami.dom.local>

On Wed, 2009-04-29 at 14:23 +0200, Jarek Poplawski wrote:
> According to the author's(?) comment with hysteresis "The speed gain
> is about 1/6", so not very much here considering htb_dequeue time.

Thought so :)

> Radu, since not only your worst case, but also the real case u32
> lookups are very big I think you should mainly have a look at Calin's
> u32 hash generator or at least his method, and only after optimizing
> it try these other tricks. Btw. I hope Calin made this nice program
> known to networking/admins lists too.

I've just had a look at Calin's approach to optimizing u32 lookups. It
does indeed make a very nice use of u32 hash capabilities, resulting in
a maximum of 4 lookups. The algorithm he uses takes advantage of the
fact that only a (small) subset of the whole ipv4 address space is
actually used in an ISP's network.

Unfortunately his approach makes it a bit difficult to dynamically
adjust the configuration, since the controller (program/application)
must remember the exact hash tables, filters etc in order to be able to
add/remove CIDRs without rewriting the entire configuration. Unused hash
tables also need to be "garbage collected" and reused, otherwise the
hash table id space could be exhausted.

Since I only use IP lookups (and u32 is very generic) I'm starting to
ask myself if a different kind of data structures and classifier were
more appropriate.

For instance, I think a binary search tree that is matched against the
bits in the ip address would result in pretty nice performance. It would
take at most 32 iterations (descending through the tree) with less
overhead than the (complex) u32 rule match.

> Btw. #2: I think you wrote you didn't use iptables...
No, I don't use iptables.

Btw, the e1000e driver seems to have no way to disable NAPI. Am I
missing something (like a global kernel config option that disables NAPI
completely)?

Thanks,

Radu



  reply	other threads:[~2009-04-29 13:16 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 10:40 htb parallelism on multi-core platforms Radu Rendec
2009-04-17 11:31 ` David Miller
2009-04-17 11:33 ` Badalian Vyacheslav
2009-04-17 22:41 ` Jarek Poplawski
2009-04-18  0:21   ` Denys Fedoryschenko
2009-04-18  7:56     ` Jarek Poplawski
2009-04-22 14:02       ` Radu Rendec
2009-04-22 21:29         ` Jesper Dangaard Brouer
2009-04-23  8:20           ` Jarek Poplawski
2009-04-23 13:56             ` Radu Rendec
2009-04-23 18:19               ` Jarek Poplawski
2009-04-23 20:19                 ` Jesper Dangaard Brouer
2009-04-24  9:42                   ` Radu Rendec
2009-04-28 10:15                     ` Jesper Dangaard Brouer
2009-04-29 10:21                       ` Radu Rendec
2009-04-29 10:31                         ` Jesper Dangaard Brouer
2009-04-29 11:03                           ` Radu Rendec
2009-04-29 12:23                             ` Jarek Poplawski
2009-04-29 13:15                               ` Radu Rendec [this message]
2009-04-29 13:38                                 ` Jarek Poplawski
2009-04-29 16:21                                   ` Radu Rendec
2009-04-29 22:49                                     ` Calin Velea
2009-04-29 23:00                                       ` Re[2]: " Calin Velea
2009-04-30 11:19                                       ` Radu Rendec
2009-04-30 11:44                                         ` Jesper Dangaard Brouer
2009-04-30 14:04                                         ` Re[2]: " Calin Velea
2009-05-08 10:15                                           ` Paweł Staszewski
2009-05-08 17:55                                             ` Vladimir Ivashchenko
2009-05-08 18:07                                               ` Denys Fedoryschenko
2009-04-23 12:31           ` Radu Rendec
2009-04-23 18:43             ` Jarek Poplawski
2009-04-23 19:06               ` Jesper Dangaard Brouer
2009-04-23 19:14                 ` Jarek Poplawski
2009-04-23 19:47                   ` Jesper Dangaard Brouer
2009-04-23 20:00                     ` Jarek Poplawski
2009-04-23 20:09                     ` Jeff King
2009-04-24  6:01               ` Jarek Poplawski
     [not found]             ` <1039493214.20090424135024@gemenii.ro>
2009-04-24 11:19               ` Jarek Poplawski
2009-04-24 11:35             ` Re[2]: " Calin Velea

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=1241010951.6554.355.camel@blade.ines.ro \
    --to=radu.rendec@ines.ro \
    --cc=calin.velea@gemenii.ro \
    --cc=denys@visp.net.lb \
    --cc=hawk@diku.dk \
    --cc=jarkao2@gmail.com \
    --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).