From: Alex Bligh <alex@alex.org.uk>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, Alex Bligh <alex@alex.org.uk>
Subject: Re: Scalability of interface creation and deletion
Date: Sun, 08 May 2011 11:09:35 +0100 [thread overview]
Message-ID: <443ACEB21CD1E406E4AE377F@nimrod.local> (raw)
In-Reply-To: <1304793553.3207.24.camel@edumazet-laptop>
--On 7 May 2011 20:39:13 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le samedi 07 mai 2011 à 20:32 +0200, Eric Dumazet a écrit :
>
> Also you could patch synchronize_sched() itself instead of
> synchronize_net()
OK, I did this, plus instrumented the call to rcu_barrier()
you mentioned:
Looking at the synchronize_net() and rcu_barrier() calls:
Total 8.43935 Usage 399 Average 0.02115 elsewhere
Total 10.65050 Usage 200 Average 0.05325 rcu_barrier
Total 9.28948 Usage 200 Average 0.04645 synchronize_net
it's spending about 1/3 of its time in that rcu_barrier, 1/3
in synchronize_sched() and 1/3 elsewere.
Turning now to the synchronize_sched() (per your patch), I see
Total 16.36852 Usage 400 Average 0.04092 synchronize_sched()
Note "Usage 400". That's because precisely half the calls to
synchronize_sched() occur outside of synchronize_net(), and
half occur within synchronize_net() (per logs)
A typical interface being removed looks like this:
May 8 09:47:31 nattytest kernel: [ 177.030197] synchronize_sched() in
66921 us
May 8 09:47:31 nattytest kernel: [ 177.030957] begin synchronize_net()
May 8 09:47:31 nattytest kernel: [ 177.120085] synchronize_sched() in
89080 us
May 8 09:47:31 nattytest kernel: [ 177.120819] end synchronize_net()
May 8 09:47:31 nattytest kernel: [ 177.121698] begin rcu_barrier()
May 8 09:47:31 nattytest kernel: [ 177.190152] end rcu_barrier()
So for every interface being destroyed (I'm doing 200 as veths
are pairs), we do 2 synchronize_sched() calls and 1 rcu_barrier.
Each of these takes roughly 42ms with CONFIG_HZ set to 100,
leading to 125ms per interface destroy, and 250ms per veth
pair destroy.
It may be a naive question but why would we need to do
2 synchronize_sched() and 1 rcu_barrier() to remove an
interface?
--
Alex Bligh
next prev parent reply other threads:[~2011-05-08 10:09 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 11:08 Scalability of interface creation and deletion Alex Bligh
2011-05-07 12:22 ` Eric Dumazet
2011-05-07 15:26 ` Alex Bligh
2011-05-07 15:54 ` Eric Dumazet
2011-05-07 16:23 ` Ben Greear
2011-05-07 16:37 ` Eric Dumazet
2011-05-07 16:44 ` Ben Greear
2011-05-07 16:51 ` Eric Dumazet
2011-05-08 3:45 ` Ben Greear
2011-05-08 8:08 ` Alex Bligh
2011-05-09 21:46 ` Octavian Purdila
2011-05-07 16:26 ` Eric Dumazet
2011-05-07 18:24 ` Alex Bligh
2011-05-07 18:32 ` Eric Dumazet
2011-05-07 18:39 ` Eric Dumazet
2011-05-08 10:09 ` Alex Bligh [this message]
2011-05-07 18:42 ` Eric Dumazet
2011-05-07 18:50 ` Alex Bligh
2011-05-08 7:12 ` Eric Dumazet
2011-05-08 8:06 ` Alex Bligh
2011-05-08 9:35 ` Alex Bligh
2011-05-08 12:18 ` Alex Bligh
2011-05-08 12:50 ` Paul E. McKenney
2011-05-08 13:13 ` Alex Bligh
2011-05-08 13:44 ` Paul E. McKenney
2011-05-08 14:27 ` Alex Bligh
2011-05-08 14:47 ` Paul E. McKenney
2011-05-08 15:17 ` Alex Bligh
2011-05-08 15:48 ` Paul E. McKenney
2011-05-08 21:00 ` Eric Dumazet
2011-05-09 4:44 ` [PATCH] veth: use batched device unregister Eric Dumazet
2011-05-09 6:56 ` Michał Mirosław
2011-05-09 8:20 ` Eric Dumazet
2011-05-09 9:17 ` [PATCH net-next-2.6] net: use batched device unregister in veth and macvlan Eric Dumazet
2011-05-09 18:42 ` David Miller
2011-05-09 19:05 ` Eric Dumazet
2011-05-09 20:17 ` Eric Dumazet
2011-05-10 6:40 ` [PATCH net-2.6] vlan: fix GVRP at dismantle time Eric Dumazet
2011-05-10 19:23 ` David Miller
2011-05-09 7:45 ` [PATCH v2 net-next-2.6] veth: use batched device unregister Eric Dumazet
2011-05-09 9:22 ` Eric Dumazet
2011-05-09 5:37 ` Scalability of interface creation and deletion Alex Bligh
2011-05-09 6:37 ` Eric Dumazet
2011-05-09 7:11 ` Paul E. McKenney
2011-05-09 17:30 ` Jesse Gross
2011-05-08 12:44 ` Paul E. McKenney
2011-05-08 13:06 ` Alex Bligh
2011-05-08 13:14 ` Alex Bligh
2011-05-08 12:32 ` Paul E. McKenney
2011-05-07 18:51 ` Alex Bligh
2011-05-07 19:24 ` Eric Dumazet
2011-05-07 18:38 ` Alex Bligh
2011-05-07 18:44 ` Eric Dumazet
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=443ACEB21CD1E406E4AE377F@nimrod.local \
--to=alex@alex.org.uk \
--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).