From: Calin Velea <calin.velea@gemenii.ro>
To: Calin Velea <vcalinus@gemenii.ro>
Cc: Radu Rendec <radu.rendec@ines.ro>,
Jarek Poplawski <jarkao2@gmail.com>,
Jesper Dangaard Brouer <hawk@diku.dk>,
Denys Fedoryschenko <denys@visp.net.lb>,
netdev <netdev@vger.kernel.org>
Subject: Re[2]: htb parallelism on multi-core platforms
Date: Thu, 30 Apr 2009 02:00:53 +0300 [thread overview]
Message-ID: <457095732.20090430020053@gemenii.ro> (raw)
In-Reply-To: <395864833.20090430014946@gemenii.ro>
Hello Calin,
Thursday, April 30, 2009, 1:49:46 AM, you wrote:
> Wednesday, April 29, 2009, 7:21:11 PM, you wrote:
>> I finally managed to disable NAPI on e1000e - apparently it can only be
>> done on the "official" Intel driver (downloaded from their website), by
>> compiling with "make CFLAGS_EXTRA=-DE1000E_NO_NAPI". This doesn't seem
>> to be available in the (2.6.29) kernel driver.
>> With NAPI disabled, 4 (of 8) cores go to 100% (instead of only one), but
>> overall throughput *decreases* from ~110K pps (with NAPI) to ~80K pps.
>> This makes sense, since h/w interrupt is much more time consuming than
>> polling (that's the whole idea behind NAPI anyway).
>> Radu Rendec
> I tested with e1000 only, on a single quad-core CPU - the L2 cache was
> shared between the cores.
> For 8 cores I suppose you have 2 quad-core CPUs. If the cores actually
> used belong to different physical CPUs, L2 cache sharing does not occur -
> maybe this could explain the performance drop in your case.
> Or there may be other explanation...
> Anyway - coming back to David Miller's words:
> "HTB acts upon global state, so anything that goes into a particular
> device's HTB ruleset is going to be single threaded.
> There really isn't any way around this. "
> It could be the only way to get more power is to increase the number
> of devices where you are shaping. You could split the IP space into 4 groups
> and direct the trafic to 4 IMQ devices with 4 iptables rules -
> -d 0.0.0.0/2 -j IMQ --todev imq0,
> -d 64.0.0.0/2 -j IMQ --todev imq1, etc...
> Or you can customize the split depeding on the traffic distribution.
> ipset nethash match can also be used.
> The 4 devices can have the same htb ruleset, only the right parts
> of it will match.
> You should test with 4 flows that use all the devices simultaneously and
> see what is the aggregate throughput.
> The performance gained through parallelism might be a lot higher than the
> added overhead of iptables and/or ipset nethash match. Anyway - this is more of
> a "hack" than a clean solution :)
> p.s.: latest IMQ at http://www.linuximq.net/ is for 2.6.26 so you will need to try with that
You will also need -i ethX (router), or -m physdev --physdev-in ethX
(bridge) to differentiate between upload and download in the iptables rules.
--
Best regards,
Calin mailto:calin.velea@gemenii.ro
next prev parent reply other threads:[~2009-04-29 23:01 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
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 ` Calin Velea [this message]
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=457095732.20090430020053@gemenii.ro \
--to=calin.velea@gemenii.ro \
--cc=denys@visp.net.lb \
--cc=hawk@diku.dk \
--cc=jarkao2@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=radu.rendec@ines.ro \
--cc=vcalinus@gemenii.ro \
/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).