| View previous topic :: View next topic |
| Author |
Message |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Sun Nov 22, 2009 6:14 am Post subject: Ubuntu equally fast as Gentoo....WHAT??? |
|
|
I compiled lpaq9m.cpp (a compression tool) with -mtune=athlon64 -O3, then compressed a 10 MB file, it was talking around 54 seconds to compress on Gentoo AND Ubtuntu...this is what's bugging me...there should have been an advantage in the performance front (at least 10%) when compiling the whole OS from source!!
-------Verdict--------
Nope. I measured the startup times and saw Gentoo to be pretty fast.
lpaq9m.cpp might not get an optimization since it's too small.
Last edited by dE_logics on Tue Feb 09, 2010 1:09 pm; edited 1 time in total |
|
| Back to top |
|
 |
slycordinator Advocate


Joined: 31 Jan 2004 Posts: 3047 Location: Houston, TX
|
Posted: Sun Nov 22, 2009 6:25 am Post subject: |
|
|
The fact that you think there should be "at least a 10% increase in performance" is truly lol-worthy. _________________ My political stance/bias
slycordinator != slycoordinator |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Sun Nov 22, 2009 7:02 am Post subject: |
|
|
| So the only advantage are the USE flags...ok they have a significant contribution, but I was wondering about the compile time optimization........no difference? |
|
| Back to top |
|
 |
StringCheesian l33t

Joined: 21 Oct 2003 Posts: 886
|
Posted: Sun Nov 22, 2009 7:58 am Post subject: |
|
|
| dE_logics wrote: | | So the only advantage are the USE flags...ok they have a significant contribution, but I was wondering about the compile time optimization........no difference? |
Several years ago, people were running linux distros compiled for 386 or 486 on Pentium 4s and Athlon XPs. Processor features like MMX and SSE were being underutilized. Back then a distro compiled with -march=athon-xp had more of an advantage.
Not so much these days, especially for 64 bit distros. The generic optimizations used for 64 bit Ubuntu are not that different from the more specific optimizations typically used for 64 bit Gentoo. They both enable SSE, SSE2, MMX, etc.
The difference was rarely so high as 10% anyway. It has always been mostly placebo-effect induced hype. |
|
| Back to top |
|
 |
aidanjt Veteran


Joined: 20 Feb 2005 Posts: 1087 Location: Rep. of Ireland
|
Posted: Sun Nov 22, 2009 8:13 am Post subject: Re: Ubuntu equally fast as Gentoo....WHAT??? |
|
|
This surely has to be a troll thread. _________________
| drizek wrote: | | Here in America, we are like a bunch of shit-slinging monkeys. |
|
|
| Back to top |
|
 |
slycordinator Advocate


Joined: 31 Jan 2004 Posts: 3047 Location: Houston, TX
|
Posted: Sun Nov 22, 2009 8:43 am Post subject: |
|
|
| StringCheesian wrote: | | Not so much these days, especially for 64 bit distros. The generic optimizations used for 64 bit Ubuntu are not that different from the more specific optimizations typically used for 64 bit Gentoo. They both enable SSE, SSE2, MMX, etc. | Plus, "-mtune=athlon64 -O3" is a generic optimization anyway. _________________ My political stance/bias
slycordinator != slycoordinator |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Sun Nov 22, 2009 9:30 am Post subject: |
|
|
It would have been a good idea to place this thread in the chat area........mods....pls do so.
Have a look -
http://www.linux-mag.com/id/7574/1/
So it DOES matter...I use blender...so I have major advantage in FPS.
I was wondering even if the optimization is about 2% per library/binary, then also it would sum up to a very large quantity for the whole system (use calculus theories or sorta like chaos theory).
I see Gentoo as VERY fast...no doubt, it's placebo effect...it's real and VERY significant I can count it.
Actually it's more than what difference I expected.
Furthermore, I heard Ubuntu binaries are compile with Os flag (the difference was 5 to 7% with lpaq9m sources)...now all this is an advantage in Gentoo.
To add more factors...I use a usual athlon X2...if it was an atom processor...or some unusual processor like the top notch phenom, xeon or i7 (etc....) there would have been a significant difference. |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Sun Nov 22, 2009 9:31 am Post subject: |
|
|
blank---------
Posted this by mistake.
Last edited by dE_logics on Sun Nov 22, 2009 9:37 am; edited 1 time in total |
|
| Back to top |
|
 |
Azdo n00b

Joined: 22 Nov 2009 Posts: 8
|
Posted: Sun Nov 22, 2009 9:32 am Post subject: |
|
|
| ...and maybe the bottleneck is not in the CPU but in the I/O performance of the hard disk. |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Sun Nov 22, 2009 9:38 am Post subject: |
|
|
| Azdo wrote: | | ...and maybe the bottleneck is not in the CPU but in the I/O performance of the hard disk. |
That's is not possible with lpaq9m...or in general any powerful compression algorithm. |
|
| Back to top |
|
 |
i92guboj Moderator


Joined: 30 Nov 2004 Posts: 9106 Location: Córdoba (Spain)
|
Posted: Sun Nov 22, 2009 10:10 am Post subject: |
|
|
Moved from Portage & Programming to News & Announcements. _________________ Gentoo Handbook |
|
| Back to top |
|
 |
i92guboj Moderator


Joined: 30 Nov 2004 Posts: 9106 Location: Córdoba (Spain)
|
Posted: Sun Nov 22, 2009 10:15 am Post subject: |
|
|
Sorry for the first move, my browser did something strange in the middle.
Now: moved from News & Announcements to Gentoo Chat.
As for the thread: if you are using Gentoo because of the gain of performance, you are probably using it for the wrong reason. As said:
- most distros nowadays use worthy architectures, no longer 386-only object code
- most uber-specific compile flags are only noticeable in very specific programs, depending on the task they do and *how* do they do it
- anyway your cflags are really not that special (note that I am not saying they should be, setting crazy CFLAGS globally is a bad thing)
Sure you could tune up CFLAGS for each specific package (on a given architecture and for a given configuration) to get a slight improvement (slight, most times). Is is worth your time? No. _________________ Gentoo Handbook |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27174 Location: 56N 3W
|
Posted: Sun Nov 22, 2009 11:30 am Post subject: |
|
|
dE_logics,
| Code: | | -mtune=athlon64 -O3 | is a poor choice for optimisation.
-mtune=athlon64 is generic fits any and all EM64T and AMD64 CPUs. Its only the right choice if you have an early amd64 CPU, or you need to run the code on lots of different EM64T/AMD64 CPUs.
-O3 gives you optimisations that make the code bigger but potentially faster. The trap here is that the bigger code will be slower, if it no longer fits in the CPU cache.
Often its a slowdown.
Optimising is about performance over a wide range of programs. Whats good for one may be bad for others or even have no effect at all.
You cannot assess your optimisation with a single application.
Provided you build and run applications on the same system and you have gcc-4.2 or later will be a better choice, or certainly no worse, depending on your CPU. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
i92guboj Moderator


Joined: 30 Nov 2004 Posts: 9106 Location: Córdoba (Spain)
|
Posted: Sun Nov 22, 2009 11:45 am Post subject: |
|
|
I didn't even notice before, but note that "-mtune" doesn't really do that much optimization. If you truly want to measure how it can vary from code compiled for athlon64 to code compiled for a generic x86_64 cpu, you should be using -march, which truly optimizes the code breaking the compatibility with anything that's not that concrete cpu. Otherwise you are compiling a generic binary that will run on any x86_64 cpu.
Also, note that 64 bit cpus are really on early stages, compared to x86. The kind of performance difference that you can expect from compiling nowadays for x86_64 to athlon64 is the same difference you could expect between compiling for 386 or 486 back on its day... In other words: next to nil.
Once we have 6th generation x86_64 bit cpus sure that there will be a difference between that chip and a basic x86_64. _________________ Gentoo Handbook |
|
| Back to top |
|
 |
wswartzendruber Veteran


Joined: 23 Mar 2004 Posts: 1129 Location: California, USA
|
Posted: Sun Nov 22, 2009 3:13 pm Post subject: |
|
|
| i92guboj wrote: | I didn't even notice before, but note that "-mtune" doesn't really do that much optimization. If you truly want to measure how it can vary from code compiled for athlon64 to code compiled for a generic x86_64 cpu, you should be using -march, which truly optimizes the code breaking the compatibility with anything that's not that concrete cpu. Otherwise you are compiling a generic binary that will run on any x86_64 cpu.
Also, note that 64 bit cpus are really on early stages, compared to x86. The kind of performance difference that you can expect from compiling nowadays for x86_64 to athlon64 is the same difference you could expect between compiling for 386 or 486 back on its day... In other words: next to nil.
Once we have 6th generation x86_64 bit cpus sure that there will be a difference between that chip and a basic x86_64. |
Huh? I don't get it. I thought x86-64 was just a 64-bit extension to x86 with SSE(2) plus some registers. I thought the advantage was being able to operate on 64-bit numbers in a single cycle. The x264 encoder is already significantly (~15%) faster on 64-bit than 32-bit. |
|
| Back to top |
|
 |
djdunn Guru


Joined: 26 Dec 2004 Posts: 517 Location: Under the moon and all the stars in the sky.
|
Posted: Sun Nov 22, 2009 5:56 pm Post subject: |
|
|
| wswartzendruber wrote: | | Huh? I don't get it. I thought x86-64 was just a 64-bit extension to x86 with SSE(2) plus some registers. I thought the advantage was being able to operate on 64-bit numbers in a single cycle. The x264 encoder is already significantly (~15%) faster on 64-bit than 32-bit. |
well yeah for the first couple chips AMD put out.
but we reached the point that we are seeing some very different chips just like in X86. The newer chips are beyond the production worthy proof of concept models, and have become their own unique identity. _________________ Now, with penguins, (cuddly such), "contented" means it has either just gotten laid, or it's stuffed on herring. Take it from me, I'm an expert on penguins, those are really the only two options.
--Linus Torvalds |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27174 Location: 56N 3W
|
Posted: Sun Nov 22, 2009 9:21 pm Post subject: |
|
|
Moved from Gentoo Chat to Off the Wall.
Its not gentoo related any more _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Gaff n00b


Joined: 05 Jun 2009 Posts: 0
|
Posted: Sun Nov 22, 2009 9:26 pm Post subject: |
|
|
the reason I started using Gentoo back in the days of pre-1.4 was that I could get 2.5 kernel and different threading system (the one before nptl, whatever it was called) by simply emerging stuff I needed.
At the time I was sitting with redhat at work, and installing anything useful was a nightmare. Like codecs, recompiling glibc, etc etc.
Portage and USE flags were pure bliss in comparison. The fact that you could tinker with CFLAGS was interesting, but not the main issue. |
|
| Back to top |
|
 |
energyman76b Advocate


Joined: 26 Mar 2003 Posts: 2005 Location: Germany
|
Posted: Sun Nov 22, 2009 9:52 pm Post subject: |
|
|
also intel broke compatibility from the go with not implementing the full 64bit spec. Intel is a bunch of jerks - so no surprise. _________________
| AidanJT wrote: |
...because pro-lifers (especially the catholic variety) are sick, depraved, satanic ....
|
...'people' - had to clean it up to not be offensive...
"The secret of politics? Make a good treaty with Russia." |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Mon Nov 23, 2009 7:10 am Post subject: |
|
|
| i92guboj wrote: | Sorry for the first move, my browser did something strange in the middle.
Now: moved from News & Announcements to Gentoo Chat.
As for the thread: if you are using Gentoo because of the gain of performance, you are probably using it for the wrong reason. As said:
- most distros nowadays use worthy architectures, no longer 386-only object code
- most uber-specific compile flags are only noticeable in very specific programs, depending on the task they do and *how* do they do it
- anyway your cflags are really not that special (note that I am not saying they should be, setting crazy CFLAGS globally is a bad thing)
Sure you could tune up CFLAGS for each specific package (on a given architecture and for a given configuration) to get a slight improvement (slight, most times). Is is worth your time? No. |
Then what's the use of gentoo, and I really don't see that...Gentoo is no doubt faster...and I think it's worth it.
The use flags and all result in only ~750 packages installed, where as in Ubutntu it was like...1500.
I can count and lay down the performance boosts. |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Mon Nov 23, 2009 7:18 am Post subject: |
|
|
| i92guboj wrote: | I didn't even notice before, but note that "-mtune" doesn't really do that much optimization. If you truly want to measure how it can vary from code compiled for athlon64 to code compiled for a generic x86_64 cpu, you should be using -march, which truly optimizes the code breaking the compatibility with anything that's not that concrete cpu. Otherwise you are compiling a generic binary that will run on any x86_64 cpu.
Also, note that 64 bit cpus are really on early stages, compared to x86. The kind of performance difference that you can expect from compiling nowadays for x86_64 to athlon64 is the same difference you could expect between compiling for 386 or 486 back on its day... In other words: next to nil.
Once we have 6th generation x86_64 bit cpus sure that there will be a difference between that chip and a basic x86_64. |
hummm...I'll give it a try...thanks.
[quote=energyman76b]Intel is a bunch of jerks - so no surprise.[/quote]
+1, if AMD dies off, Intel will have i7, i8, i9...with the only difference -
i7 = 3.2 GHZ
i8 = 3.4ghz
i9 = 3.6ghz
You know Intel is like Microsoft...all it thinks about is business and earning money.
You're in Phoronix forums right?
Last edited by dE_logics on Mon Nov 23, 2009 9:03 am; edited 1 time in total |
|
| Back to top |
|
 |
energyman76b Advocate


Joined: 26 Mar 2003 Posts: 2005 Location: Germany
|
Posted: Mon Nov 23, 2009 8:52 am Post subject: |
|
|
| dE_logics wrote: | | i92guboj wrote: | I didn't even notice before, but note that "-mtune" doesn't really do that much optimization. If you truly want to measure how it can vary from code compiled for athlon64 to code compiled for a generic x86_64 cpu, you should be using -march, which truly optimizes the code breaking the compatibility with anything that's not that concrete cpu. Otherwise you are compiling a generic binary that will run on any x86_64 cpu.
Also, note that 64 bit cpus are really on early stages, compared to x86. The kind of performance difference that you can expect from compiling nowadays for x86_64 to athlon64 is the same difference you could expect between compiling for 386 or 486 back on its day... In other words: next to nil.
Once we have 6th generation x86_64 bit cpus sure that there will be a difference between that chip and a basic x86_64. |
hummm...I'll give it a try...thanks.
[quote=energyman76b]Intel is a bunch of jerks - so no surprise. |
+1, if AMD dies off, Intel will have i7, i8, i9...with the only difference -
i7 = 3.2 GHZ
i8 = 3.4ghz
i9 = 3.6ghz
You like Intel is like Microsoft...all it thinks about is business and earning money.
You're in Phoronix forums right?[/quote]
yes _________________
| AidanJT wrote: |
...because pro-lifers (especially the catholic variety) are sick, depraved, satanic ....
|
...'people' - had to clean it up to not be offensive...
"The secret of politics? Make a good treaty with Russia." |
|
| Back to top |
|
 |
vputz Apprentice


Joined: 16 Mar 2005 Posts: 299 Location: Oxford, England
|
Posted: Mon Nov 23, 2009 10:04 am Post subject: |
|
|
| The real advantage of Gentoo is in flexibility, not speed. If you get an extra bit of speed with optimization, that's a pleasant side effect, but not really the primary benefit. |
|
| Back to top |
|
 |
poly_poly-man Advocate


Joined: 06 Dec 2006 Posts: 2477 Location: RIT, NY, US
|
Posted: Mon Nov 23, 2009 12:14 pm Post subject: |
|
|
just make sure your CFLAGS include -fzomg-optimized, -mtune=so-fast and -O9. _________________ iVBORw0KGgoAAAANSUhEUgAAA
avatar: new version of logo - see topic 838248. Potentially still a WiP. |
|
| Back to top |
|
 |
tylerwylie Guru


Joined: 19 Sep 2004 Posts: 455 Location: /US/Illinois/Champaign
|
Posted: Mon Nov 23, 2009 12:18 pm Post subject: |
|
|
| vputz wrote: | | The real advantage of Gentoo is in flexibility, not speed. If you get an extra bit of speed with optimization, that's a pleasant side effect, but not really the primary benefit. | This. If you want speed, look at something like Arch. _________________ POLITICS, n. A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage. |
|
| Back to top |
|
 |
|