Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does compiling gentoo really give a better performance?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
jos
n00b
n00b


Joined: 30 Apr 2003
Posts: 11
Location: The Netherlands

PostPosted: Fri May 02, 2003 12:08 pm    Post subject: Does compiling gentoo really give a better performance? Reply with quote

Hello,

Does compiling gentoo from stage 1 really give you a better performance at a old Pentium 1, or is it just 2%?

In some newsgroups they are laughing about Gentoo because they say compiling yourself doesn't give a perfomance edge.

Has someone done some benchmarks (with real world tests no test like let's add 10 billion times a number)?

Jos
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Fri May 02, 2003 12:29 pm    Post subject: Reply with quote

yea, compilig enhances the performance, because it compiles the source to completely suit your architecture (you need to set them only once in /etc/make.config in gentoo), and also you can select how much would you like packages to be optimised for your exact structure (not only x86, but it optimises to let's say athlon-xp or PII-celeron) - this can be done using the -O flags -O1 being the lowest optimisation, produces the smallest binary, compiles faster but loads slower and -O3 being the maximum optimisation, produces the biggest binary, compiles slower but runs faster (how much, depends of the structure). most people stick with the -O2 flag :)

maybe someone else made some real benchmarks, i haven't bothered, i see my gentoo work and work faster, and that's enought for me :)
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Fri May 02, 2003 1:11 pm    Post subject: Re: Does compiling gentoo really give a better performance? Reply with quote

Moved from Installing Gentoo.


jos wrote:
Does compiling gentoo from stage 1 really give you a better performance at a old Pentium 1, or is it just 2%?

In some newsgroups they are laughing about Gentoo because they say compiling yourself doesn't give a perfomance edge.

Has someone done some benchmarks (with real world tests no test like let's add 10 billion times a number)?

I don't know actual numbers but openoffice-bin is noticeably slower than the version I compiled myself. BTW it depends a lot (i.e. you compare the custom binaries to what? What settings are used for the two versions?).

Also optimization is IMHO not the main point of Gentoo (being a nice thing BTW). I like Gentoo's flexiblility the most (not to mention the Gentoo community :wink: ).
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Fri May 02, 2003 1:25 pm    Post subject: Reply with quote

also another nice feature gentoo has is that it's really easy to maintain and update :D
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
panserg
Apprentice
Apprentice


Joined: 16 Apr 2003
Posts: 188

PostPosted: Fri May 02, 2003 4:11 pm    Post subject: Reply with quote

Mozilla downloaded in binaries crashes a lot and works much slower. Mozilla from sources is much more stable and seems to work faster. True for all Linux and BSD I've tried, but on Gentoo the additional bonus is it's easier and safier to upgrade.

Another examples where I've noticed the same difference (more or less): postgresql, xemacs, openoffice.

Basically, the longer is output of "./configure --help" is the more chances that binary will crash calling some library.
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Fri May 02, 2003 4:15 pm    Post subject: Reply with quote

hook wrote:
most people stick with the -O2 flag :)


hehe...-O3 baby!
Back to top
View user's profile Send private message
guero61
l33t
l33t


Joined: 14 Oct 2002
Posts: 811
Location: Behind you

PostPosted: Fri May 02, 2003 4:16 pm    Post subject: Reply with quote

I am running Gentoo on an original P-100, compiled in-machine w/32MB of RAM

I don't know if it's faster or not, as I've never run anything else on it. However, even if you do only get 2%, on a machine that slow 2% is a huge help!
Back to top
View user's profile Send private message
dice
Guru
Guru


Joined: 21 Apr 2002
Posts: 577

PostPosted: Fri May 02, 2003 4:28 pm    Post subject: Reply with quote

There is a small performance increase you get from building everything from source. However, consider the ammount of time it takes you to do so on a machine such as an old Pentium and you'll probably come to the conclusion that it isn't worth it in that respect. As other people in this thread have already mentioned, the main feature of Gentoo is not the performance increase that you get from source but the flexibility that is provided by doing so. Just set your USE flags and from then on all software installed on your machine is customized to your particular environment. You don't have some corporation or distro maintainer who's trying to please everyone cramming everything including the kitchen sink down your throat, you have what you want and only what you want.

BTW, if you have a fast machine that you also have linux on you should take a look at distcc:
http://cvs.gentoo.org/~zwelch/distcc.html
http://cvs.gentoo.org/~zwelch/xdistcc.html
Back to top
View user's profile Send private message
zeky
Guru
Guru


Joined: 24 Feb 2003
Posts: 470
Location: Vukojebina, Europe

PostPosted: Fri May 02, 2003 5:16 pm    Post subject: Reply with quote

"Does compiling gentoo really give a better performance?"
Well.... I'll explain nice and simple this Q...

It's the same as you would ask: "Does it fell better when u have sex with a girl, rather than a sex doll"

lol :lol: :wink:


Last edited by zeky on Fri May 02, 2003 5:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Fri May 02, 2003 5:19 pm    Post subject: Reply with quote

z3ky wrote:
I'll explain nice and simple this Q...

It's the same as you would ask: "Does it fell better when u have sex with a girl, rather than a sex doll"

lol :lol: :wink:
8O
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Fri May 02, 2003 5:30 pm    Post subject: Reply with quote

z3ky wrote:

It's the same as you would ask: "Does it fell better when u have sex with a girl, rather than a sex doll"


Girl??... Sex.... no doll ?

damn, that's innovative thjnking.
Back to top
View user's profile Send private message
gsfgf
Veteran
Veteran


Joined: 08 May 2002
Posts: 1266

PostPosted: Fri May 02, 2003 7:30 pm    Post subject: Reply with quote

yes. not that much on small binaries, but it adds up. oo is much faster when compiled. The big gain, though is stability. Locally built stuff is noticeably more stable. And USE flags give you tight control over what your apps do, which can't always be had with biraries.
_________________
Aim:gsfgf0
Back to top
View user's profile Send private message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Fri May 02, 2003 8:07 pm    Post subject: Reply with quote

Openoffice, mozilla, and firebird I've noticed considerable increases in stability and speed from compiling locally.
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance
Back to top
View user's profile Send private message
jkcunningham
l33t
l33t


Joined: 28 Apr 2003
Posts: 649
Location: 47.49N 121.79W

PostPosted: Sat May 03, 2003 2:21 pm    Post subject: Reply with quote

I've run other linux distributions for several years (SuSE, Redhet mostly), and while I learned a great deal about the workings of the operating system (particularly when compared to Windows) , there still remains a level of "Mr Wizard" behind the curtain when you install from a GUI. I never had the sense that I knew what was going on. The main reason I've loaded Gentoo was to build a system from ground up. The fact that is no slower is my only requirement. If its faster, well, that's a bonus.

There's a long thread in a Mandrake forum that has been discussed here before (I don't have the link at the moment) that seems to indicate Mandrake's binary for KDE is significantly faster than what obtains from compiling Gentoo's source for KDE. Of course, it's possible. I don't plan to run KDE so I'm not very concerned about that. I assume someone who is will figure out the difference and fix it one of these days.

As soon as I finish installing a few more basic apps I plan to benchmark some large simulation and signal processing codes I wrote at work. I'm planning on benchmarking the difference between running my "optimized" version (athlon-xp -O3 --funroll-loops --fast-math) with the stage 3 binary. If the numbers are interesting (and anyone is interested) I'll post the results.

-Jeff
Back to top
View user's profile Send private message
henke
Apprentice
Apprentice


Joined: 30 Sep 2002
Posts: 165
Location: Stockholm, Sweden

PostPosted: Sat May 03, 2003 2:37 pm    Post subject: Reply with quote

jos wrote:
Does compiling gentoo from stage 1 really give you a better performance at a old Pentium 1, or is it just 2%?


I don't know and I don't care :twisted:
Back to top
View user's profile Send private message
L-Chamber
n00b
n00b


Joined: 24 Jan 2003
Posts: 15
Location: New Zealand (Aotearoa)

PostPosted: Mon May 26, 2003 6:20 am    Post subject: Reply with quote

This is not 100% on topic, but I thought I'd mention it after reading this:

Quote:
There is a small performance increase you get from building everything from source. However, consider the ammount of time it takes you to do so on a machine such as an old Pentium and you'll probably come to the conclusion that it isn't worth it in that respect.


Quote:
BTW, if you have a fast machine that you also have linux on you should take a look at distcc:


We have some fast machines in our office, all running distccd.
We also have various older boxes (p200's, p2 350's, etc) that do various things.

So far, we've installed Gentoo (from stage 1) on about 3 or 4 of these older boxes using distcc on faster boxes to do the compiling work. No problems so far, this may be a solution for those who want(need?) that 2% on their slow box, but do not want to waste hours compiling locally when a machine on the network could do the work in a fraction of the time.
Back to top
View user's profile Send private message
timfreeman
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2003
Posts: 142
Location: Chicago

PostPosted: Mon May 26, 2003 3:57 pm    Post subject: Reply with quote

Quote:
that seems to indicate Mandrake's binary for KDE is significantly faster than what obtains from compiling Gentoo's source for KDE.


honestly, I can't tell/remember the difference. But when I had Mandrake before, I wasn't looking out for a difference .. to hell I'd install it again though (not to blindly promote).

I never had stability problems with it either.. BUT, of course all the other Gentoo favorables apply to me too .. I love the customization and tight control as well as learning far more about linux/gnu
_________________
|||
Back to top
View user's profile Send private message
timfreeman
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2003
Posts: 142
Location: Chicago

PostPosted: Mon May 26, 2003 4:11 pm    Post subject: Reply with quote

Quote:
So far, we've installed Gentoo (from stage 1) on about 3 or 4 of these older boxes using distcc on faster boxes to do the compiling work. No problems so far, this may be a solution for those who want(need?) that 2% on their slow box, but do not want to waste hours compiling locally when a machine on the network could do the work in a fraction of the time.


This is awesome.

Sorry, I'm kind of new to actually networking. They say you need similar toolchains if you want to use several computers at once to compile.. But with one computer doing the compiling, this isn't necessary, right? Let's say I want my one stabler version of everything computer (server) to do the compiling for my "less stable" version of everything. That's no problem right .. because all of the dependencies and all are actually worked out by what is calling portage in the first place (the "less stable" comp == only, it is using the CPU resources off of the other comp)?

Can I remove 'localhost' from the options.. and then merge later?

This is what I glean from that link, am I right? The one computer runs portage and calls the other comp?

Sweet.
_________________
|||
Back to top
View user's profile Send private message
beowulf
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 225

PostPosted: Mon May 26, 2003 4:26 pm    Post subject: Reply with quote

I really don't believe the speed increase is too great. Sure there are some packages that benefit immensely, but some packages are just not worth it. I think it all comes down to time vs. preformance. Is it worth compiling OO.org for a day if you only use it twice a month? Is the net-misc/whois package really going to benefit from being compiled with -O3 -march=[cpu] ?

I don't think there's been a meaningful benchmark of a system compiled for i686 vs an athlon-tbird for example. There's just too many variables, some uncontrollable, others with no means to measure speed... How do you account for access speeds of a library when you must take into consideration where the disk heads are, what's in the cache, system load, etc... i believe (though could be wrong) that it's near impossible to measure the speed in a factual form...

IMO the "compile for your own arch" is what created the hype, got the users here.... it's portage that made us stay :)

my 2 cents :)
_________________
I have nothing witty to say here... ever :-(
Back to top
View user's profile Send private message
Anti
n00b
n00b


Joined: 18 Apr 2002
Posts: 45

PostPosted: Mon May 26, 2003 4:30 pm    Post subject: Reply with quote

I've been running Gentoo for ages now, but I've never really benchmarked the speed-difference. But it is noticable when comparing to distributions such asn Mdk and RH. Of course this is after enabling dma and such ;)
Generally it runs really smooth.

But anyway, after using gentoo for a short while I became aware of the different kinds of optimizations that were possible.

I decided to try it out on some of my own code, and some of them really made huge differences. I don't remember any exact numbers, though, but in some cases we're talking from 2 secs runtime to about 0.1 sec with some optimizations.
_________________
stuff is good.
Back to top
View user's profile Send private message
Cossins
Veteran
Veteran


Joined: 21 Mar 2003
Posts: 1136
Location: Copenhagen, Denmark

PostPosted: Mon May 26, 2003 4:35 pm    Post subject: Reply with quote

Well, the performance benefit vs. installation time is really out of question for the average Gentoo geek - most of us leave the computer compiling while going to bed. The next morning, when we come home from job/school/default daylight occupation, everything's done.

This is why some might consider Gentoo Linux less appropriate for big production or web servers which need to be fully operational 24/7.

Agreed, it isn't as quick as just typing rpm -ivh sompackage.rpm (except for the RPM-hunting process, which I'd say can be much more exhausting than compiling stuff), but really, it's just a matter of planning and timing.

Then, when everything's done, you can stop being frustrated about your computer not being cutting-edge ultra-optimized... :)

As for your P100, I'd really feel sorry for it if you made it compile a full system by its own. Distcc is the way to go. There is some guide for it somewhere in the forums, try searching for "distcc boostrap" or something similar...

- Simon
Back to top
View user's profile Send private message
guy
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 286
Location: USA

PostPosted: Mon May 26, 2003 5:33 pm    Post subject: Reply with quote

Beyond the speed from compiling, just look at the startups. When I used redhat, there must have been 20 init scripts loaded by default. I didnt even know what half of them were so I never bothered changing them. Now I have about 6, all of which I know I want. It starts fast as a mofo :)

Not to mention I know my system!! I had no idea where redhat installed its rpms. I didnt know what features my own PHP had. What codecs do my players have? What is being firewalled?? With Gentoo I know what's going on all the way down to the kernel (well, I did recompile the kernel on redhat, but it got angry :roll: )
_________________
www.manatee.servemp3.com
www.seas.upenn.edu/~bdodson/gina
www.goatse.cx [it will rise again!]
Back to top
View user's profile Send private message
Evangelion
Veteran
Veteran


Joined: 31 May 2002
Posts: 1087
Location: Helsinki, Finland

PostPosted: Mon May 26, 2003 5:54 pm    Post subject: Reply with quote

dice wrote:
There is a small performance increase you get from building everything from source. However, consider the ammount of time it takes you to do so on a machine such as an old Pentium and you'll probably come to the conclusion that it isn't worth it in that respect.


Keep in mind that usually that compiling takes place when you wouldn't be using the computer in any case. I usually leave large compiles running while I sleep and/or when I go to work. That way I don't lose any productive time on the computer. And besides, what stops you from using the computer while it compiles something else?
_________________
My tech-blog | My other blog
Back to top
View user's profile Send private message
paranode
l33t
l33t


Joined: 06 Mar 2003
Posts: 679
Location: Texas

PostPosted: Mon May 26, 2003 8:14 pm    Post subject: Reply with quote

dice wrote:
BTW, if you have a fast machine that you also have linux on you should take a look at distcc:


I've actually seen someone run distcc on a Windows box (with cygwin) to help them compile Gentoo on a slower box :twisted:

Cossins wrote:
This is why some might consider Gentoo Linux less appropriate for big production or web servers which need to be fully operational 24/7.


While this is certainly valid logic, my take on the matter is that you could buy a farm of servers and have one "unstable" box that builds the packages from source and then you could just install the binaries on the other production servers just like you would an RPM or whatever. I think servers could definitely benifit from compiler optimizations. If you don't use these compiler options the only thing that separates your new processor from a 5 year old one is clock speed. Electrical engineers put those special instructions in there for a reason!
_________________
Meh.
Back to top
View user's profile Send private message
Cossins
Veteran
Veteran


Joined: 21 Mar 2003
Posts: 1136
Location: Copenhagen, Denmark

PostPosted: Mon May 26, 2003 8:28 pm    Post subject: Reply with quote

Well, yeah, but not every company can afford a whole extra server just for compiling stuff... ;)

BTW, this is turning into a dupe discussion, all of these arguments were also discussed in another thread about a binary version of Gentoo...

- Simon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum