Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo Optimizations Benchmarked
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
natros
n00b
n00b


Joined: 26 Sep 2003
Posts: 70

PostPosted: Fri Oct 30, 2009 6:53 pm    Post subject: Gentoo Optimizations Benchmarked Reply with quote

Very interesting
http://www.linux-mag.com/id/7574/1/
_________________
-=[abit ip35 pro core2quad q6600 (oc 3.0 ghz) 8 gb ram 2x320 raid0 ext4 xfx8800gt 512mb]=-
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31711
Location: 56N 3W

PostPosted: Sat Oct 31, 2009 8:42 am    Post subject: Reply with quote

natros,

Thank you for the link
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2867
Location: Omnipresent

PostPosted: Sat Oct 31, 2009 10:15 am    Post subject: Reply with quote

Given the small gap between the different GCC optimization levels, and the large gap between Gentoo and Ubuntu in some tests, perhaps a comparison of different USE flag sets would be more useful.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
rahulthewall
Veteran
Veteran


Joined: 01 Nov 2007
Posts: 1264
Location: Zürich

PostPosted: Sat Oct 31, 2009 12:49 pm    Post subject: Reply with quote

I came here to post it - too late I guess. :P Allow me to say this: Gentoo FTW!

This does match with my own experience as well, my Gentoo system has always been far more responsive that Ubuntu and even Arch.
_________________
Who shall guard the guards?
Back to top
View user's profile Send private message
XQYZ
Apprentice
Apprentice


Joined: 19 Jul 2009
Posts: 231
Location: Europe

PostPosted: Sat Oct 31, 2009 1:35 pm    Post subject: Reply with quote

Same for me. Ubuntu has always lagged massively on my computer (which is AMD X2 5200+ w/ 2.7Ghz, 4GB RAM and a GeForce 9800GT). Gentoo on the other hand runs snappy as it's supposed to be. Also of course, portage is the best package manager I can imagine.
Back to top
View user's profile Send private message
Thaidog
Veteran
Veteran


Joined: 19 May 2004
Posts: 1036
Location: Hilton Head, SC

PostPosted: Sat Oct 31, 2009 7:49 pm    Post subject: Reply with quote

Good to see they actually did some gaming benchmarks. 8)
_________________
www.LinuxDNA.com
http://groups.google.com/group/linuxdna
Registered Linux User: 437619
"I'm a big believer in technology over politics" - Linus Torvalds
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1221
Location: Jefferson, USA

PostPosted: Sun Nov 01, 2009 3:37 am    Post subject: Linux Magazine: Gentoo Optimizations Benchmarked Reply with quote

Linux Magazine has written an article titled "Gentoo Optimizations Benchmarked" which uses the Phoronix Test Suite to compare Gentoo with Ubuntu 9.04.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3753
Location: sleeping in the bathtub

PostPosted: Sun Nov 01, 2009 4:37 am    Post subject: Reply with quote

Dupe!

Silly marines.

:P
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Nov 01, 2009 5:19 am    Post subject: Reply with quote

Hypnos wrote:
Given the small gap between the different GCC optimization levels, and the large gap between Gentoo and Ubuntu in some tests, perhaps a comparison of different USE flag sets would be more useful.

Somehow I doubt that'd actually make much of a difference for most USE flags.
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1221
Location: Jefferson, USA

PostPosted: Sun Nov 01, 2009 5:19 am    Post subject: Reply with quote

Hopeless wrote:
Dupe!

Silly marines.

:P

Well, that settles it. I have offically FAILED. I shall now commence the depression ceremony.

...

Okay I'm done.
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Nov 01, 2009 5:22 am    Post subject: Reply with quote

I don't know what they do, but Ubuntu and especially Fedora is considerably less responsive on my machine than Gentoo. Firefox scrolling, for example, is always laggy under Ubuntu, even without a compositing manager, while on Gentoo, it's not laggy at all while running a compositing manager! Drawing performance is usually terrible. I can see windows draw as they are opened, while it is usually nearly instantaneous on Gentoo (except for the big hog programs). Program startup time is a little bit better, but I think they have done some optimizations for that.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 5127
Location: &akkara

PostPosted: Sun Nov 01, 2009 5:28 am    Post subject: Reply with quote

Merged two posts - this and that one, above.

(And my you all type fast, there's now three posts between my comment and the relevant merged posts, making the typical short-and-sweet 'merged N above' hard to use!)
Back to top
View user's profile Send private message
david_e
n00b
n00b


Joined: 27 Jul 2007
Posts: 51
Location: Berlin, Germany

PostPosted: Sun Nov 01, 2009 11:33 am    Post subject: Reply with quote

Maybe it has to do with -march: that can make a huge difference... btw I think that also Ubuntu is compiled -O2.
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1221
Location: Jefferson, USA

PostPosted: Sun Nov 01, 2009 3:25 pm    Post subject: Reply with quote

david_e wrote:
Maybe it has to do with -march: that can make a huge difference... btw I think that also Ubuntu is compiled -O2.

I remember doing some tests back in 2005 with GCC3 and came to the definite conclusion that it wasn't about architecture but optimization level instead.
Back to top
View user's profile Send private message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 617
Location: Munich, Germany

PostPosted: Sun Nov 01, 2009 3:38 pm    Post subject: Reply with quote

Thanks for the link!

Notice how in some scenarios -Os performs much better than higher optimization levels. It would have been interesting to expand a little on those tests and profile if this is really due to a more favorable memory footprint (as the article speculates) or whether some optimization patterns actually hurt computational performance in specific cases.

I would also love to see measurements of memory consumption. Maybe I'll do some myself.
Back to top
View user's profile Send private message
david_e
n00b
n00b


Joined: 27 Jul 2007
Posts: 51
Location: Berlin, Germany

PostPosted: Sun Nov 01, 2009 4:04 pm    Post subject: Reply with quote

wswartzendruber wrote:
david_e wrote:
Maybe it has to do with -march: that can make a huge difference... btw I think that also Ubuntu is compiled -O2.

I remember doing some tests back in 2005 with GCC3 and came to the definite conclusion that it wasn't about architecture but optimization level instead.

I never benchmarked it, but, for example, SSE should have a noticeable impact on codes that are designed for it, like FFTW.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3753
Location: sleeping in the bathtub

PostPosted: Sun Nov 01, 2009 4:42 pm    Post subject: Reply with quote

david_e wrote:
wswartzendruber wrote:
david_e wrote:
Maybe it has to do with -march: that can make a huge difference... btw I think that also Ubuntu is compiled -O2.

I remember doing some tests back in 2005 with GCC3 and came to the definite conclusion that it wasn't about architecture but optimization level instead.

I never benchmarked it, but, for example, SSE should have a noticeable impact on codes that are designed for it, like FFTW.
Yeah, but aren't such optimizations controlled by configure flags (and hence USE flags in the case of gentoo) rather than CFLAGS?

zyko wrote:
Thanks for the link!

Notice how in some scenarios -Os performs much better than higher optimization levels. It would have been interesting to expand a little on those tests and profile if this is really due to a more favorable memory footprint (as the article speculates) or whether some optimization patterns actually hurt computational performance in specific cases.

I would also love to see measurements of memory consumption. Maybe I'll do some myself.
That's what caught my attention moreso than anything as well.

I have of late been compiling more and more packages with different -O levels via /etc/portage/env, anything which is always running but is mostly idle and performance is a non-issue gets -Os, other select packages which put the system under load get -O3, and -O2 is in make.conf for everything else.

I have to be honest, though, I've tested a few things and in most cases I see very little difference (if any) between the three levels, but there are some stand out cases.
For example, libgcrypt, with -O3 it's actually more than twice as fast as with -O2, although the code I was testing with only used the cryptographic hashes, and libtomcrypt was generally quite a bit faster with the same hashes (which saw more modest but real speed improvements under -O3 also, about 20% faster IIRC).

I'd really like to start testing everything which could potentially benefit from -O3, which would mostly be limited to anything related to compression, cryptography, and any kind of rendering.

As for -Os, I'd like to use that by default with more exceptions via /etc/portage/env where appropriate, whoever in all honesty I doubt there is much to be gained in terms of memory usage;
just about anything which uses a significant amount of memory will do so due the the data which is loaded and internal structures it uses, which should be unaffected by the -O level.

Having said that, I've recently recompiled all the qt and kde libraries with -Os and have seen some significant drop in the library sizes, they're around 15% smaller in some cases, but again how much of an actual saving this gives at runtime is anyone's guess.

I would really like to start coming up with real recommendations for specific -O levels for specific packages though, anyone else?
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
Thaidog
Veteran
Veteran


Joined: 19 May 2004
Posts: 1036
Location: Hilton Head, SC

PostPosted: Sun Nov 01, 2009 5:12 pm    Post subject: Reply with quote

widremann wrote:
I don't know what they do, but Ubuntu and especially Fedora is considerably less responsive on my machine than Gentoo. Firefox scrolling, for example, is always laggy under Ubuntu, even without a compositing manager, while on Gentoo, it's not laggy at all while running a compositing manager! Drawing performance is usually terrible. I can see windows draw as they are opened, while it is usually nearly instantaneous on Gentoo (except for the big hog programs). Program startup time is a little bit better, but I think they have done some optimizations for that.


Yeah I get the same issues with Firefox under FC11. Especially when scrolling down, say, this thread for instance.... FF just grays out and goes crazy scrolling way past where I wanted it to. I think if FF was compiled and the kernel actually had the correct cpu driver it would not happen. Gentoo never does this for me.
_________________
www.LinuxDNA.com
http://groups.google.com/group/linuxdna
Registered Linux User: 437619
"I'm a big believer in technology over politics" - Linus Torvalds
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 13046
Location: Ste-Foy,Canada

PostPosted: Sun Nov 01, 2009 8:08 pm    Post subject: Reply with quote

That's great news about -O2 :P
_________________
Sysadmin of GentooQuébec.org
Wiki
Signature
IRC on Freenode : #gentoo-quebec
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 684
Location: Billings, MT, USA

PostPosted: Sun Nov 01, 2009 8:37 pm    Post subject: Reply with quote

I always use -O2 in all my builds. Probably why my older systems run extremely well (my ol' P1s and 2's).
_________________
Router(PE1750,4GB RAM,3x36GB HDDs,2xIntel Pro/1000+GT Quad Port) | MyDT(PhmIIx3 720@3.3GHz,8GB RAM,2TB+2TB+1.5TB HDDs,GFGTX560Ti,LG BD-RE,Win7)
MyLT(Asus G53SX,32GB RAM,2x2TB HDDs,BD-RE,Intel 6230,Win7) | Wife(C2D@2.4GHz,4GB RAM,250GB HDD,DVDRW,Win7)
Back to top
View user's profile Send private message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 617
Location: Munich, Germany

PostPosted: Sun Nov 01, 2009 11:47 pm    Post subject: Reply with quote

Quote:
As for -Os, I'd like to use that by default with more exceptions via /etc/portage/env where appropriate, whoever in all honesty I doubt there is much to be gained in terms of memory usage;
just about anything which uses a significant amount of memory will do so due the the data which is loaded and internal structures it uses, which should be unaffected by the -O level.


Agreed. However, even very minor memory savings can be of value for embedded systems or virtual servers. If -Os reduces the amount of memory occupied by cached binaries, that would make a noticeable difference for systems running on very restricted resources. That may potentially increase the amout of virtual servers one can run on one physical server, thereby saving some money etc...

Quote:
I would really like to start coming up with real recommendations for specific -O levels for specific packages though, anyone else?


Me too :)
Back to top
View user's profile Send private message
saellaven
Apprentice
Apprentice


Joined: 23 Jul 2006
Posts: 241

PostPosted: Mon Nov 02, 2009 12:09 am    Post subject: Reply with quote

zyko wrote:
Thanks for the link!

Notice how in some scenarios -Os performs much better than higher optimization levels. It would have been interesting to expand a little on those tests and profile if this is really due to a more favorable memory footprint (as the article speculates) or whether some optimization patterns actually hurt computational performance in specific cases.

I would also love to see measurements of memory consumption. Maybe I'll do some myself.


Without investigating, it's possible the -Os code generated code which fit into CPU cache, whereas the other optimization levels didn't. If there was heavy looping involved with little need to pull in more data/code, the smaller code could easily beat the pants off more "optimized" but longer code.
Back to top
View user's profile Send private message
Thaidog
Veteran
Veteran


Joined: 19 May 2004
Posts: 1036
Location: Hilton Head, SC

PostPosted: Mon Nov 02, 2009 10:55 pm    Post subject: Reply with quote

saellaven wrote:
zyko wrote:
Thanks for the link!

Notice how in some scenarios -Os performs much better than higher optimization levels. It would have been interesting to expand a little on those tests and profile if this is really due to a more favorable memory footprint (as the article speculates) or whether some optimization patterns actually hurt computational performance in specific cases.

I would also love to see measurements of memory consumption. Maybe I'll do some myself.


Without investigating, it's possible the -Os code generated code which fit into CPU cache, whereas the other optimization levels didn't. If there was heavy looping involved with little need to pull in more data/code, the smaller code could easily beat the pants off more "optimized" but longer code.


Maybe but if the code loops could be vectorized, which O3 does now, it would probably be better to use O3. The problem I see with making any speculations is that most of these benchmarks require more than one program to run so even if we are simply testing a single app there are a lot of moving wheels under it that take up resources too. I think it gets down to a case by case basis and what apps and deps should be compiled how gets very complicated.
_________________
www.LinuxDNA.com
http://groups.google.com/group/linuxdna
Registered Linux User: 437619
"I'm a big believer in technology over politics" - Linus Torvalds
Back to top
View user's profile Send private message
likewhoa
l33t
l33t


Joined: 04 Oct 2006
Posts: 738
Location: Brooklyn, New York

PostPosted: Wed Nov 04, 2009 12:42 am    Post subject: Reply with quote

i love me some benchmarks, thanks for this!
Back to top
View user's profile Send private message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 478
Location: Bantayan Island

PostPosted: Wed Nov 04, 2009 8:54 am    Post subject: Reply with quote

Holy cow Gentoo roasted Ubuntu!
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