From: ebiederm@xmission.com (Eric W. Biederman)
To: Rafael David Tinoco <rafael.tinoco@canonical.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>,
Dave Chiluk <chiluk@canonical.com>,
linux-kernel@vger.kernel.org, davem@davemloft.net,
Christopher Arges <chris.j.arges@canonical.com>,
Jay Vosburgh <jay.vosburgh@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: Thu, 24 Jul 2014 00:01:02 -0700 [thread overview]
Message-ID: <87egxbkzpt.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <73833A09-DF3C-49CE-8F78-91A822651F75@canonical.com> (Rafael David Tinoco's message of "Thu, 17 Jul 2014 09:05:01 -0300")
Rafael David Tinoco <rafael.tinoco@canonical.com> writes:
> Hello Eric,
>
> Coming back to this...
>
> On Jun 16, 2014, at 12:01 PM, Rafael Tinoco <rafael.tinoco@canonical.com> wrote:
>
>> ...
>>
>> On Fri, Jun 13, 2014 at 9:02 PM, Eric W. Biederman
>> <ebiederm@xmission.com> wrote:
>>> Rafael Tinoco <rafael.tinoco@canonical.com> writes:
>>>
>>>> Okay,
>>>>
>>>> Tests with the same script were done.
>>>> I'm comparing : master + patch vs 3.15.0-rc5 (last sync'ed rcu commit)
>>>> and 3.9 last bisect good.
>>>>
>>>> Same tests were made. I'm comparing the following versions:
>>>>
>>>> 1) master + suggested patch
>>>> 2) 3.15.0-rc5 (last rcu commit in my clone)
>>>> 3) 3.9-rc2 (last bisect good)
>>>
>>> I am having a hard time making sense of your numbers.
>>>
>>> If I have read your email correctly my suggested patch caused:
>>> "ip netns add" numbers to improve
>>> 1x "ip netns exec" to improve some
>>> 2x "ip netns exec" to show no improvement
>>> "ip link add" to show no effect (after the 2x ip netns exec)
>>
>> - "netns add" are as good as they were before this regression.
>> - "netns exec" are improved but still 50% of the last good bisect commit.
>> - "link add" didn't show difference.
>>
>>> This is interesting in a lot of ways.
>>> - This seems to confirm that the only rcu usage in ip netns add
>>> was switch_task_namespaces. Which is convinient as that rules
>>> out most of the network stack when looking for performance oddities.
>>>
>>> - "ip netns exec" had an expected performance improvement
>>> - "ip netns exec" is still slow (so something odd is still going on)
>>> - "ip link add" appears immaterial to the performance problem.
>>>
>>> It would be interesting to switch the "ip link add" and "ip netns exec"
>>> in your test case to confirm that there is nothing interesting/slow
>>> going on in "ip link add"
>>
>> - will do that.
>
> IP link add seems ok.
>
>>
>>>
>>> Which leaves me with the question what ip "ip netns exec" remains
>>> that is using rcu and is slowing all of this down.
>>
>> - will check this also.
>
> Based on my tests (and some other users that deployed this patch on a server farm)
> it looks like changing rcu_read_lock() to task_lock() did the trick. We are getting
> same (sometimes much better) results - comparing bisect good - for a big amount
> of netns being created simultaneously.
>
> Is it possible to make this change permanent in kernel tree ?
Definitely. I just need to finish getting my act together.
It sounded like you had seen other performance problems and I was
waiting on your futher testing so we could narrow down.
If you can't see other problems then I am happy to move forward with
this.
Thank you for testing and reporting this,
Eric
prev parent reply other threads:[~2014-07-24 7:04 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
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 [this message]
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=87egxbkzpt.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=chiluk@canonical.com \
--cc=chris.j.arges@canonical.com \
--cc=davem@davemloft.net \
--cc=jay.vosburgh@canonical.com \
--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