From: Jesper Dangaard Brouer <jdb@comx.dk>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Loopback performance from kernel 2.6.12 to 2.6.37
Date: Tue, 09 Nov 2010 15:38:36 +0100 [thread overview]
Message-ID: <1289313516.17448.28.camel@traveldev.cxnet.dk> (raw)
In-Reply-To: <1289312178.17448.20.camel@traveldev.cxnet.dk>
On Tue, 2010-11-09 at 15:16 +0100, Jesper Dangaard Brouer wrote:
> On Tue, 2010-11-09 at 14:59 +0100, Jesper Dangaard Brouer wrote:
> > On Mon, 2010-11-08 at 16:06 +0100, Eric Dumazet wrote:
> > ...
> > > > > > > I noticed that the loopback performance has gotten quite bad:
> > > > > > >
> > > > > > > http://www.phoronix.com/scan.php?page=article&item=linux_2612_2637&num=6
>
> > > Their network test is basically :
> > >
> > > netcat -l 9999 >/dev/null &
> > > time dd if=/dev/zero bs=1M count=10000 | netcat 127.0.0.1 9999
> >
> > Should it not be:
> > netcat -l -p 9999 >/dev/null &
> >
> > When I run the commands "dd | netcat", netcat never finish/exits, I have
> > to press Ctrl-C to stop it. What am I doing wrong? Any tricks?
>
> To fix this I added "-q 0" to netcat. Thus my working commands are:
>
> netcat -l -p 9999 >/dev/null &
> time dd if=/dev/zero bs=1M count=10000 | netcat -q0 127.0.0.1 9999
>
> Running this on my "big" 10G testlab system, Dual Xeon 5550 2.67GHz,
> kernel version 2.6.32-5-amd64 (which I usually don't use)
> The results are 7.487 sec
Using kernel 2.6.35.8-comx01+ (which is 35-stable with some minor
patches of my own) on the same type of hardware (our preprod server).
The result is 12 sec.
time dd if=/dev/zero bs=1M count=10000 | netcat -q0 127.0.0.1 9999
10000+0 records in
10000+0 records out
10485760000 bytes (10 GB) copied, 12,0805 s, 868 MB/s
real 0m12.082s
user 0m0.311s
sys 0m15.896s
BUT perf top reveals that its probably related to the function
'find_busiest_group' ... any kernel config hints how I get rid of that?
samples pcnt function DSO
_______ _____ ___________________________ ______________
4152.00 12.8% copy_user_generic_string [kernel]
1802.00 5.6% find_busiest_group [kernel]
852.00 2.6% __clear_user [kernel]
836.00 2.6% _raw_spin_lock_bh [kernel]
819.00 2.5% ipt_do_table [ip_tables]
628.00 1.9% rebalance_domains [kernel]
564.00 1.7% _raw_spin_lock [kernel]
562.00 1.7% _raw_spin_lock_irqsave [kernel]
522.00 1.6% schedule [kernel]
441.00 1.4% find_next_bit [kernel]
413.00 1.3% _raw_spin_unlock_irqrestore [kernel]
394.00 1.2% tcp_sendmsg [kernel]
391.00 1.2% tcp_packet [nf_conntrack]
368.00 1.1% do_select [kernel]
> Using vmstat I see approx 400000 context switches per sec.
>
Previous:
> Perf top says:
> samples pcnt function DSO
> _______ _____ _________________________ ___________
>
> 6442.00 16.3% copy_user_generic_string [kernel]
> 2226.00 5.6% __clear_user [kernel]
> 912.00 2.3% _spin_lock_irqsave [kernel]
> 773.00 2.0% _spin_lock_bh [kernel]
> 736.00 1.9% schedule [kernel]
> 582.00 1.5% ipt_do_table [ip_tables]
> 569.00 1.4% _spin_lock [kernel]
> 505.00 1.3% get_page_from_freelist [kernel]
> 451.00 1.1% _spin_unlock_irqrestore [kernel]
> 434.00 1.1% do_select [kernel]
> 354.00 0.9% tcp_sendmsg [kernel]
> 348.00 0.9% tick_nohz_stop_sched_tick [kernel]
> 347.00 0.9% tcp_transmit_skb [kernel]
> 345.00 0.9% zero_fd_set [kernel]
--
Jesper Dangaard Brouer
ComX Networks A/S
next prev parent reply other threads:[~2010-11-09 14:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1288954189.28003.178.camel@firesoul.comx.local>
[not found] ` <1288988955.2665.297.camel@edumazet-laptop>
[not found] ` <1289213926.15004.19.camel@firesoul.comx.local>
[not found] ` <1289214289.2820.188.camel@edumazet-laptop>
2010-11-08 15:06 ` Loopback performance from kernel 2.6.12 to 2.6.37 Eric Dumazet
2010-11-09 0:05 ` Andrew Hendry
2010-11-09 5:22 ` Eric Dumazet
2010-11-09 6:23 ` Eric Dumazet
2010-11-09 6:30 ` Andrew Hendry
2010-11-09 6:38 ` Eric Dumazet
2010-11-09 6:42 ` Eric Dumazet
2010-11-09 13:59 ` Jesper Dangaard Brouer
2010-11-09 14:06 ` Eric Dumazet
2010-11-09 14:16 ` Jesper Dangaard Brouer
2010-11-09 14:25 ` Eric Dumazet
2010-11-18 13:52 ` Eric Dumazet
2010-11-18 17:41 ` Eric Dumazet
2010-11-18 17:48 ` David Miller
2010-11-09 14:38 ` Jesper Dangaard Brouer [this message]
2010-11-10 11:24 ` Jesper Dangaard Brouer
2010-12-12 15:48 ` Arnaldo Carvalho de Melo
2010-11-09 21:35 Xose Vazquez Perez
2010-11-10 8:49 ` Jesper Dangaard Brouer
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=1289313516.17448.28.camel@traveldev.cxnet.dk \
--to=jdb@comx.dk \
--cc=eric.dumazet@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).