Optimized kernel builds: the straight dope
John Richard Moser
nigelenki at comcast.net
Fri Aug 18 21:06:55 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matt Zimmerman wrote:
> == Background ==
>
> You've all seen our kernel lineup before. In the beginning, on i386 we had
> linux-386, linux-686, linux-k7, linux-686-smp, linux-k7-smp. Later, we
> added specialized server kernels, and folded SMP support into linux-686 and
> linux-k7.
>
[...]
> == Conclusion ==
>
> Having read over it, I think the numbers are fairly compelling. The
> difference in performance between -386 and -686 is insigificant; the
> measurements are all within a reasonable error range, and within that range,
> -686 was slower as often as it was faster.
>
Been there done that. See benchmarks at the end of:
https://wiki.ubuntu.com/ubuntu-i686
Honestly there are places where 686 code can become a bit faster; but
they're far and few and in practice we don't hit them much
> My recommendation is that we phase out these additional kernel builds, which
> I expect will save us a great deal of developer time, buildd time, archive
> storage and bandwidth.
>
I personally like my i686 kernel, just because I don't like the name
'i386' :)
Why don't you look into glibc as well, since we have i486 vs i686 glibc.
> I'm interested to hear (objective, reasoned) feedback on this data and my
> conclusions from the members of this list.
Matt, can we call the i386 kernel "i486" instead? I see the config is
for i486 (CONFIG_M486=y)...
Aside from properly relabeling the i386 kernel, I don't have a problem.
Himem is on in the i386 kernel; and ArchLinux and Gentoo are only
faster because users compile out a lot of the generic stuff we MUST
offer for a complete desktop system (ipv6 for example...) and don't have
as many start-up services/background programs running all the time.
(not to mention Gentoo users tend to try to get --as-needed wherever
they can to speed up load times).
I'd honestly recommend (shameless plug) looking into some new linker
optimizations for Edgy+1; processes sit mostly idle once loaded and the
kernel accounts for about 18% (oprofile) of total system CPU time
anyway[***], so our big issues are dynamic linker time (read: process
load speed) and memory usage. I put up an LWN.net article on the topic
at the below link:
http://lwn.net/Articles/192624/
Pretty much -Wl,-O1,--hash-style=both everywhere should be good for
Edgy+1. -Bdirect would be difficult to maintain and the section it adds
may eventually change. Drepper doesn't want to include support in
mainline glibc[*][**], although there's been good reaction by several
people on the Binutils mailing list and by Gentoo users and developers.
Such a shame, too, since it's coming along so well and will probably be
killed by one man's opinions. :(
On the other hand, every little thing adds up; --hash-style is a
combination of two minor optimizations that gives a substantial increase
overall, for example. There are gains in some minor places using i686
instructions; and if analysis shows i486 is so insignificant that we
really don't care, I would not oppose moving up to i586 (I have one of
these!) or i686 for the whole system. I just won't say it's significant
in its own right, especially not for just the kernel.
[*] http://sourceware.org/ml/binutils/2005-10/msg00437.html "Forget it,
we have prelinking, which is much more efficient."
[**] I more bank on this part of the argument:
http://sourceware.org/ml/binutils/2005-10/msg00438.html
[***] I oprofile'd the whole system to figure out how intensive position
independent executables would be (X spends 5% in its main exec; other
tasks spend <=0.02%; system wide total 8%). At a side glance I noticed
vmlinuz wanted 18% total, which includes whatever the kernel is doing
AND any syscalls that userspace makes.
- --
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.
Creative brains are a valuable, limited resource. They shouldn't be
wasted on re-inventing the wheel when there are so many fascinating
new problems waiting out there.
-- Eric Steven Raymond
We will enslave their women, eat their children and rape their
cattle!
-- Bosc, Evil alien overlord from the fifth dimension
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQIVAwUBROYd3Qs1xW0HCTEFAQLIkA//Riw/sLrfVCrXS5jYgSjNBE3WUub8eujg
KBWmfdw9q/aA6Zjk17wYMIPIljW35xsm5iAjYNfS+aebuOiDbTUnMLmOagGlqwOX
Kcc0NeohTXUuwz1c9AI7ajJrVx9Y3d4/X1CUAWP/GO6CiO5DQwVktX2yGVCAIcJJ
SoWuzJRVhn8qqL03hzaOygMbIwEhbD98fJrdVopW1gooB/LbgOFhE+PnvzFWTLPH
vQXNWZNQAd8r6tn/o2P8pUt4S79cUv33wZfeif/0s+kmde3hwwGFwE8pUGMd1PgG
F4KoSsvL4GVozwDeSiIJBF2TsfjkhJzElPC9Vmwz5p2QIZ7TtpFpAejIuOa90bA7
yvH3ERVn46hlq2Ub2e89Ld3SAVilVwo5GSb9rVKUpw3M/OZbl1r/MTa7XsQCarqJ
lA5Esz68VjTWsEcSDAau7LBD1qplnG7SqL7VPkzBqeBNUlaVYf8U0ugu4IZrf8WB
3/n7AITpinwEzF40JY6yjOHhD98OOuiTQfIWF6OcT6Pv/T3FseoCU0NC44qEKXHp
C+XSvZ2CVDVeWJ5koAhTPau+gheXmrzLXW2ipDsx9JxMtjrzXl76LZVYCo8C5wZF
jagrCyXacn7vkQ/hIoLgHpX8IXny0c+o9ip48FigB+znuAnHTtxWqYdFlMh+E7TG
v8+jhj6+EGE=
=JQg0
-----END PGP SIGNATURE-----
More information about the ubuntu-devel
mailing list