mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: starlight@binnacle.cx
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>,
	Willy Tarreau <w@1wt.eu>, Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: big picture UDP/IP performance question re 2.6.18 -> 2.6.32
Date: Sun, 02 Oct 2011 11:06:25 -0400	[thread overview]
Message-ID: <6.2.5.6.2.20111002110545.03a82460@binnacle.cx> (raw)
In-Reply-To: <1317540066.3802.32.camel@edumazet-laptop>

At 09:21 AM 10/2/2011 +0200, Eric Dumazet wrote:
>Le dimanche 02 octobre 2011 Ã  01:33 -0400, 
>
>You might try to disable any fancy power saving
>mode in your machine.  Maybe on your machine, cost
>to enter/exit deep sleep state is too high.

I'll check this out.  It's an Opteron 6174 and
so recent and with all the aggressive power
saving AMD can dish out.  Note that 'cpuspeed'
is turned off.  Only thing I can think of
off the top of my head is to boot with 
'nohalt' (which used to be idle=poll).  If
anyone knows further Magney Cours tweaks
please let me know.

>Just to clarify a bit :
>
>Sometimes, optimizing one part of the kernel can
>have a negative impact on some workloads because
>we end up doing more sleep/wakeup of consumers :
>Several threads might try to acquire a lock at the
>same time, while previously they got no
>contention.
>
>In 2.6.35, commit c377411f2494a (net:
>sk_add_backlog() take rmem_alloc into account)
>changed backlog limit, avoid taking socket lock on
>flood, allowing to receive 200.000 pps on a test
>machine instead of 100pps.  But the receiver was
>doing a plain
>
>while (1)
>	recv(...);
>
>And maximum throughput was reached because task
>never called scheduler...

Sometimes I think it might be nice to run without
an OS at all :-)

We are looking at various kernel bypass approaches
for receiving packets and it's in my mind that
one of these may get us to running on newer
kernels without giving up performance.

>I see nothing obvious in the profile but userland
>processing, futex calls.

Indeed, this is from the app-internal queuing
I mentioned in the last post.  Because UDP is
presently unusable in any .32 or .39 kernel
I'm stuck with using packet sockets as a proxy
for them.  As mentioned, the two produce very
similar results in all past tests.

>Network processing seems to account less than 10%
>of total cpu...  All this sounds more a process
>scheduling regression than a network stack one..

Interesting.  When I start testing kernel bypass
the degree to which this is the case should become
clear.

>On new kernels, you can check if your udp sockets
>drops frames because of rcvbuffer being full (cat
>/proc/net/udp, check last column 'drops')

As I've stated several times, all these tests are
run with verifiable zero data loss.  The max-load
test is the highest rate were zero data loss can
be maintained.  UDP socket buffers are set to 64MB.

>To check if softirq processing hit some limits :
>cat /proc/net/softnet_stat

Ok.

>Please send full "dmesg" output 

Ok.

At 07:47 AM 10/2/2011 -0700, Stephen Hemminger wrote:
>Try disabling PCI DMA remapping. The additional
>overhead of setting up IO mapping can be a
>performance buzz kill. Try CONGIG_DMAR=n

Definitely.  Thanks for the tip!

-----

Probably won't get to these until Monday or
Tuesday.


  parent reply	other threads:[~2011-10-02 15:33 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02  5:33 starlight
2011-10-02  7:21 ` Eric Dumazet
2011-10-02  8:03   ` Eric Dumazet
2011-10-02 14:47   ` Stephen Hemminger
2011-10-02 15:06   ` starlight [this message]
2011-10-04 19:54     ` Loke, Chetan
  -- strict thread matches above, loose matches on Subject: below --
2011-10-07  3:27 starlight
2011-10-07  5:40 ` Eric Dumazet
2011-10-07  6:13   ` starlight
2011-10-07 18:09     ` chetan loke
     [not found]       ` <CAAsGZS4s1wTWW1j7FRUWW9jqpPUVF3Q46AMa7+njvE1ckX0Snw @mail.gmail.com>
2011-10-07 18:37         ` starlight
2011-10-07 19:27           ` chetan loke
     [not found]             ` <CAAsGZS4b2F9N3nV3TNu5xG+=2d0L0ncste4xv2vqoVFb1pOxEw @mail.gmail.com>
2011-10-07 19:41               ` starlight
2011-10-07 20:07           ` Ben Hutchings
2011-10-11 16:24   ` Chris Friesen
2011-10-07  2:33 starlight
2011-10-07  2:24 starlight
2011-10-05  6:58 starlight
2011-10-05  8:53 ` Eric Dumazet
     [not found]   ` <1317804832.2473.25.camel@edumazet-HP-Compaq-6005-Pr o-SFF-PC>
2011-10-05 11:50     ` starlight
2011-10-05  6:11 starlight
2011-10-05  3:35 starlight
2011-10-03 18:02 starlight
2011-10-05  6:53 ` Eric Dumazet
2011-10-03 15:25 starlight
2011-10-03 16:16 ` Eric Dumazet
     [not found]   ` <1317658588.2442.5.camel@edumazet-HP-Compaq-6005-Pro -SFF-PC>
2011-10-03 16:28     ` starlight
2011-10-04 19:16 ` Christoph Lameter
2011-10-04 19:38   ` Joe Perches
2011-10-04 19:42     ` Christoph Lameter
2011-10-04 19:49       ` Serge Belyshev
2011-10-04 20:03         ` Christoph Lameter
2011-10-04 20:12           ` Serge Belyshev
2011-10-04 22:32             ` Con Kolivas
2011-10-04 19:45     ` starlight
2011-10-05 13:22   ` Peter Zijlstra
2011-10-05 14:26     ` Christoph Lameter
2011-10-05 15:12       ` Andi Kleen
2011-10-05 15:33       ` Peter Zijlstra
2011-10-05 15:12     ` starlight
2011-10-01 21:13 starlight
2011-10-01 18:16 starlight
2011-10-01 18:40 ` Willy Tarreau
2011-10-01 19:11 ` Eric Dumazet
2011-10-01 19:43   ` starlight
2011-10-01  5:30 starlight
2011-10-01  6:44 ` Eric Dumazet
2011-10-01 15:56   ` starlight

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=6.2.5.6.2.20111002110545.03a82460@binnacle.cx \
    --to=starlight@binnacle.cx \
    --cc=a.p.zijlstra@chello.nl \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=w@1wt.eu \
    /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

all inboxes | Powered by JetHome®