lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 06 Jan 2008 23:57:57 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Benjamin LaHaise <bcrl@...ck.org>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: regression: sysctl_check changes in 2.6.24 are O(n) resulting in slow creation of 10000 network interfaces

Benjamin LaHaise <bcrl@...ck.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ