From: Eric Dumazet <eric.dumazet@gmail.com>
To: starlight@binnacle.cx
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 09:21:06 +0200 [thread overview]
Message-ID: <1317540066.3802.32.camel@edumazet-laptop> (raw)
In-Reply-To: <6.2.5.6.2.20111001215241.03a7ed48@binnacle.cx>
Le dimanche 02 octobre 2011 à 01:33 -0400, starlight@binnacle.cx a
écrit :
> Did some additional testing and have an update:
>
> 1) compiled 2.6.32.27 with CGROUP and NAMESPACES
> disabled as much as 'make menuconfig' will allow.
> Made no difference on performance--same exact
> result.
>
> 2) did observe that the IRQ rate is 100k on
> 2.6.32.27 where it is 33k on 2.6.18(rhel).
>
> 3) compiled 2.6.39.4 with same config used
> in (1) above, allowing 'make menuconfig'
> to fill in differences. Tried 'make defconfig'
> but it left out too many modules and the kernel
> would not even install. The config used to
> build this kernel is attached.
>
> .39 Runs 7% better than .32 but still 27.5% worse
> than 2.6.18(rhel) on total reported CPU and 97%
> worse on system CPU. The IRQ rate was 50k here.
>
> 4) Ran the full 30 minute test again with
>
> perf record -a
>
> running and generated a report (attached).
> This was done in packet socket mode because
> all the newer kernels have some serious bug
> where UDP data is not delivered to about
> half of the sockets even though it arrives
> to the interface. [I've been ignoring
> this since packet socket performance is
> close to UDP socket performance and I'm more
> worried about network overhead than the
> UDP bug. Comparisons are with same mode
> test on the 2.6.18(rhel) kernel.]
>
> The application '_raw_spin_lock' number
> stands out to me--makes me think that
> 2.6.39 has greater bias toward spinning
> futexes than 2.6.18(rhel) as the user
> CPU was 6.5% higher. The .32(rhel) kernel
> is exactly the same on user CPU. In UDP
> mode there is little or none of this lock-
> contention CPU--it appears here due to the
> need for queuing messages to worker
> threads in packet-socket mode.
>
> Beyond that it looks to me like the kernel paths
> have no notable hot-spots, which makes me think
> that the code path has gotten longer everywhere
> or that subtle changes have interacted badly
> with cache behavior to cause the performance
> loss. However someone who knows the kernel
> code may see things here that I cannot.
>
> -----
>
> This popped into my head. About two years ago
> I tried benchmarking SLES RT with our application.
> The results were horrifically bad. Don't know
> if anything from the RT work was merged into
> the kernel, but my overall impression was that
> RT traded CPU for latency to the extreme point
> where any application that used more than
> 10% of the much higher CPU consumption would
> not work. Haven't looked at latency during
> these tests, but I suppose if there are
> improvements it might be worth the extra CPU
> it's costing. Any thoughts on this?
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 see nothing obvious in the profile but userland processing, futex
calls.
Network processing seems to account less than 10% of total cpu...
All this sounds more a process scheduling regression than a network
stack one..
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')
To check if softirq processing hit some limits :
cat /proc/net/softnet_stat
Please send full "dmesg" output
next prev parent reply other threads:[~2011-10-02 7:21 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-02 5:33 big picture UDP/IP performance question re 2.6.18 -> 2.6.32 starlight
2011-10-02 7:21 ` Eric Dumazet [this message]
2011-10-02 8:03 ` Eric Dumazet
2011-10-02 14:47 ` Stephen Hemminger
2011-10-02 15:06 ` starlight
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
[not found] <6.2.5.6.2.20111001012019.05c05b80@flumedata.com>
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=1317540066.3802.32.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=starlight@binnacle.cx \
--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