Brian Scanlan wrote:
>> I've never benchmarked it, and I accept that it is therefore possible (but,
extremely unlikely) that a glibc/kernel/java runtime/httpserver compiled for an
i586 would be as fast or faster, then say such a system compiled specifically
for a P4 for arguments sake. Possible, but, I hope you'd agree, probably unlikely.
> I'll make up a figure of, say, 5%. You get a 5% performance gain out of
> compiling everything for your architecture - big deal.
I'll take 5%. Five percent can mean the difference on many different system
types. In a customer facing environment at christmas time when you're trying to
sell *everything* on your website and curing accounts for not buying you that
load balanced server, you'd want that 5%.
I'd be of the opinion that in an environment where you're using an interpreted
language like java, which isn't going to be fast due to it's interpreted
nature, that you'd be glad of *any* performance increase you could get. Maybe,
not, maybe if performance was the issue, Java wouldn't be in use *anyway*.
> You can do this
> if you want in other distros, gentoo hasn't got the monopoly on easily
> compiling packages with gcc options, and certainly debian has the tools
> to automate such things (debuild and apt-build spring to mind).
The difference being that that majority of binary based distros *aren't*
compiled with arch specific optimisations included. Certainly not with cool
things like -march/mcpu=pentiumX, -03, pro police and friends, maybe even
affecting the -mpreferred-stackboundary -falign-functions etc, well most binary
based distros probably aren't. I think the logic that argues that these sorts
of optimisations are *trivial* is an uphill argument, since, it's seems pretty
counter intuative. Pro police, is one of my favourites, I mean, if we can leave
aside the 'comptent admins lock down their servers' argument, it gives *me* a
warmer feeling to have pro police compiled binaries or say a non-executable
stack at the kernel level, then not. Perhaps you might have a go at the sys
admin for not doing his job, but, I think that dodges the whole *warmer
Sure we can argue the toss about competent admins doing their jobs, if that
were the case, then why not just go and deploy Windows NT... because you're so
sure.. you're competent?
Because no matter how competent you are, you sleep better, when you run Linux,
because it's a more secure system, and *I'd* sleep better, with the other sorts
of optimisations that *can* be applied to binary based distros, easily, in
contrast to our source based friends, where you can build your nexus 6, with
-mdont_kill_dekker if you so choose, something which isn't necessary if you
aren't a bladerunner you might argue, but arguably something handy if you are!
> Processor-specific optimisations add very little to the majority of programs.
To noddy programs no, I suspect not. To real programs, where real programmers
have spent real time optimising, bug squashing, not sleeping and drinking
copious amounts of coffee, I'm not so sure.
>> However, it's probably worth noting that, if there was no performance gain
to be had, distros like Gentoo, probably wouldn't exist. Maybe they would,
probably they wouldn't.
> There's a negligible performance gain - people are interested in
> building all their own packages customised for their system - it sounds
> like good fun. I wouldn't consider it relevant in a production
> environment or for a Linux newbie to be considering.
Strange because that *is* how distros like FreeBSD are built and last time I
checked FreeBSD was relevant in production environments, very relevant as it
happens, ports *is* the progenitor of portage, the names are even similar, so I
think that, in context, it's not just about fun, sure... it's fun *too*, so is
making a DMZ, but, I doubt many people would say that was their primary
motivation for doing so.
>> Even still, if you aren't using something like blackdown (can that be used
in this context, I don't know), you'd still *probably* be able to get a gain...
in performance, how much of a gain is debateable.
> I'm saying it's negligible and not worth considering as a factor when
> trying to decide what distro to use.
I don't accept that a cpu specific kernel, libc and java runtime will get
non-trivial benefit from every last bit of optimisation that can be squeezed
out of it.
If code was written like that.. can you imagine how *bad* the cumlative penalty
you'd pay for such.. a nonchalant approach to code optimisation would end up
Written in C or in php, where the php interpreter measures strlen() each time
it iterates, but *hopefully* you're compiler was smart enough to have optimised
away the multiple calls to strlen() to one call, and a variable, in lieu of
strlen. How does optimisation *stop* being valid at a macro system level, then
it is in the guts of programs like the above?
>> Portage is *excellent*, at least, I like it.
> Do you run it on production servers, i.e. you like your production
> servers to be compiling stuff?
I don't get a choice... usually I have to run name brands on production
servers, so that management droid types can overcome their prejudices about
systems they don't understand, or couldn't be arsed learning about.
Mentioning Debian, in lieu of old Red Hat systems, seems to rebound off of people.
Others : "Our closed source toys are only rated for Red Hat AS... that's what
we have to run"
You : "Au Contraire.... I have a magic wand that lets us run it on Debian"
Others : "Yeah but, nobody *knows* Debian"
You : "Well few know Linux... why don't we just use Windows on our webservers
and paint a big kick me sign across our website? "
> A DB server spends very little time loading programs and most of the
> time in I/O
That depends on the level of data processing you do at the DB level.
> I don't see the inherent need to optimise (say) a mysql
> database server for your processor type.
According to this piece of propaganda that's just wrong
I'm pretty sure gcc 3.5 will fair better then 3.2 did, but, if it were the case
that optimising your database server at compilation time made *no* difference,
then, how in the hell could you get a magic 30% increase out of nowhere?
I'd not use a closed source alternative if given a choice, but, it's hardly
rational to claim that you get no performance increase from optimising large
and complex applications... now is it? You'd expect those are *exactly* the
guys who need all the help they can get. How trivial is it to set a code monkey
to work optimising the source code of a database, in comparision to a small
>> Somehow, I'm going to have difficutly believing a sizeable server
application will not run any quicker compiled with -O3 -march=pentium4, then it
would with -mcpu=i586.
> Of course it will, but not by much, and that gentoo can do this by
> default is no reason to choose it as a distro in a production
> environment or as a newbie to linux.
We are assuming a very constrained optimisation gain here are we not? What if,
we use magic compilers, or magic version numbers where binary distro x was
compiled with gcc x.x, but you can compile all your souces using the latest
release? That's not such an unlikely postulate now is it, and if all compilers
are not equal, then we have a *potential* to introduce significant performance
increases, do we not?
> Debian's packagers would be a very
> strong reason to go with Debian in a production environment, and the
> sheer numbers of Fedora users,books and ease of the default install
> would make it a good choice for a newbie (I know I started on
I stared on Mandrake afair, but, assuming that in the scheme of things all
noobies are not equal, I don't see a real reason to use a distro for it's eye
I'm still going to sleep better, know my server has a -f_dont_kill_bod switch
on it's nexus_6 binaries.
Like a law of robotics that.
Besides before the topic becomes lost in the depths of semantic debate. As a
flavour goes, if he has the time and paticence, I think it would be worth his
while to try out Gentoo.
Sure, in a production environment, I'd probably just tow the line and use Red
Hat, but, that's politics, as opposed to a genuinely held opinion on my part.
Assuming you couldn't use a source based guy, like FreeBSD or Gentoo, I'd just
Debian, since apt is good, but, if you can negate the politics that virtually
insist on using named brands and use your favourite flavour, I'd use Gentoo or
if I couldn't be bothered with the build process, Debian.
Embedded Software Engineer
Europlex Technologies Ltd
Clonshaugh Business & Technology Park
T:+353 (0) 1 2500500
F:+353 (0) 1 2500590
E:bryano at euoplex.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!