From: ebiederm@xmission.com (Eric W. Biederman)
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: regression: sysctl_check changes in 2.6.24 are O(n) resulting in slow creation of 10000 network interfaces
Date: Sun, 06 Jan 2008 23:57:57 -0700 [thread overview]
Message-ID: <m1ir26ktqi.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20080106220307.GU28570@kvack.org> (Benjamin LaHaise's message of "Sun, 6 Jan 2008 17:03:07 -0500")
Benjamin LaHaise <bcrl@kvack.org> writes:
> Hello folks,
>
> 2.6.24-rc6 regresses on the 10000 network interface creation test relative to
> 2.6.23. The cause appears to be the new code in sysctl_check_lookup(), which
> shows up as the #1 item while profiling. Is a revert of this new code
> possible until its scaling issues are fixed? 2.6.23 can do more than 100 new
> network interfaces per second for the first few thousand devices, but with
> 2.6.24-rc6 the results drop off rather dramatically to less than 10 interfaces
> per second. The 10000 interface test is unbearable with the new sysctl_check
> code.
Why do we need 10000 interfaces? Why isn't network device creation a
slow path?
The problem seems to be in the data structures used by sysctl.
You are increasing the length of the linked list each time you
add a network interface. So sysctl lookups slow down.
At 10000 entries that is a long linked list walk.
At 100000 things get even longer. Now the numbers you report still
seem like a lot of time to me. My guess would be that we are getting
badly into cache miss territory.
If what you describe is a real scenario where users care we need
to fix the sysctl data structures so that they scale.
Because of this bug report and another one I got earlier today
about a real bug in the parallel port code detected by the very
lookup that is slowing you down. I am quite reluctant to contemplate
pulling this code. It seems to be doing it's job, if in some cases
uncomfortably so.
So is this a bug report telling me that there are users with
10k or 100k interfaces that care. So we need to fix sysctl.
Is there a specific kernel test case that is run often that having
slow sysctl performance matters for? CONFIG_SYSCTL=n should solve
that if it is specialized.
Eric
next prev parent reply other threads:[~2008-01-07 6:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-06 22:03 Benjamin LaHaise
2008-01-07 6:57 ` Eric W. Biederman [this message]
2008-01-07 7:10 ` David Miller
2008-01-07 10:25 ` Eric W. Biederman
2008-01-08 1:47 ` Benjamin LaHaise
2008-01-07 20:45 ` Andi Kleen
2008-01-07 21:30 ` Alan Cox
2008-01-07 22:57 ` Andi Kleen
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=m1ir26ktqi.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=bcrl@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome