From: ebiederm@xmission.com (Eric W. Biederman)
To: Rafael Tinoco <rafael.tinoco@canonical.com>
Cc: paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
davem@davemloft.net, Dave Chiluk <dave.chiluk@canonical.com>,
Christopher Arges <chris.j.arges@canonical.com>
Subject: Re: Possible netns creation and execution performance/scalability regression since v3.8 due to rcu callbacks being offloaded to multiple cpus
Date: Wed, 11 Jun 2014 00:07:29 -0700 [thread overview]
Message-ID: <87mwdj6i1a.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <CAJE_dJyfq5zWcs2y52siXRruCCA1Dk_=Ds=rZ8BrBZLa7FCbuQ@mail.gmail.com> (Rafael Tinoco's message of "Wed, 11 Jun 2014 02:52:09 -0300")
Rafael Tinoco <rafael.tinoco@canonical.com> writes:
> Paul E. McKenney, Eric Biederman, David Miller (and/or anyone else interested):
>
> It was brought to my attention that netns creation/execution might
> have suffered scalability/performance regression after v3.8.
>
> I would like you, or anyone interested, to review these charts/data
> and check if there is something that could be discussed/said before I
> move further.
>
> The following script was used for all the tests and charts generation:
> ====
> #!/bin/bash
> IP=/sbin/ip
>
> function add_fake_router_uuid() {
> j=`uuidgen`
> $IP netns add bar-${j}
> $IP netns exec bar-${j} $IP link set lo up
> $IP netns exec bar-${j} sysctl -w net.ipv4.ip_forward=1 > /dev/null
> k=`echo $j | cut -b -11`
> $IP link add qro-${k} type veth peer name qri-${k} netns bar-${j}
> $IP link add qgo-${k} type veth peer name qgi-${k} netns bar-${j}
> }
>
> for i in `seq 1 $1`; do
> if [ `expr $i % 250` -eq 0 ]; then
> echo "$i by `date +%s`"
> fi
> add_fake_router_uuid
> done
[snip long explanation]
> I was able to see that, from the script above, the following lines
> causes major impact on netns scalability/performance:
>
> 1) ip netns add -> huge performance regression:
>
> 1 cpu: no regression
> 4 cpu: regression for NOCB_CPU_ALL
>
> obs: regression from 250 netns/sec to 50 netns/sec on 500 netns
> already created mark
copy_netns except possibly in the per_net callbacks does not use
rcu so I am mystified. So a little more digging to figure out which
rcu usage is causing the problem would be very interesting.
> 2) ip netns exec -> some performance regression
>
> 1 cpu: no regression
> 4 cpu: regression for NOCB_CPU_ALL
>
> obs: regression from 40 netns (+1 exec per netns creation) to 20
> netns/sec on 500 netns created mark
The performance regression is probably in setns().
switch_task_namespaces is occassionaly a choke point.
At one point I was playing with ideas on how to use the task lock
instead of rcu to protect nsproxy. As the original reason we could
not use task_lock appeared to have disappeared.
That could be worth playing with.
> ========
>
> FULL NOTE: http://people.canonical.com/~inaddy/lp1328088/
>
> ** Assumption: RCU callbacks being offloaded to multiple cpus
> (cpumask_setall) caused regression in
> copy_net_ns<-created_new_namespaces or unshare(clone_newnet).
>
> ** Next Steps: I'll probably begin to function_graph netns creation execution
Eric
next prev parent reply other threads:[~2014-06-11 7:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 5:52 Rafael Tinoco
2014-06-11 7:07 ` Eric W. Biederman [this message]
2014-06-11 13:39 ` Paul E. McKenney
2014-06-11 15:17 ` Rafael Tinoco
2014-06-11 15:46 ` David Chiluk
2014-06-11 16:18 ` Paul E. McKenney
2014-06-11 18:27 ` Dave Chiluk
2014-06-11 19:48 ` Paul E. McKenney
2014-06-11 20:55 ` Eric W. Biederman
2014-06-11 21:03 ` Rafael Tinoco
2014-06-11 20:46 ` Eric W. Biederman
2014-06-11 21:14 ` Dave Chiluk
2014-06-11 22:52 ` Paul E. McKenney
2014-06-11 23:12 ` Eric W. Biederman
2014-06-11 23:49 ` Paul E. McKenney
2014-06-12 0:14 ` Eric W. Biederman
2014-06-12 0:25 ` Rafael Tinoco
2014-06-12 1:09 ` Eric W. Biederman
2014-06-12 1:14 ` Rafael Tinoco
[not found] ` <CAJE_dJzjcWP=e_CPM1M64URVHiEFFb+fP6g2YKZVdoFntkQMZg@mail.gmail.com>
2014-06-13 18:22 ` Rafael Tinoco
2014-06-14 0:02 ` Eric W. Biederman
2014-06-16 15:01 ` Rafael Tinoco
2014-07-17 12:05 ` Rafael David Tinoco
2014-07-24 7:01 ` Eric W. Biederman
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=87mwdj6i1a.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=chris.j.arges@canonical.com \
--cc=dave.chiluk@canonical.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rafael.tinoco@canonical.com \
/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
Powered by JetHome