Gentoo Forums
Gentoo Forums
Quick Search: in
Ubuntu equally fast as Gentoo....WHAT???
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Sun Nov 22, 2009 1:14 am    Post subject: Ubuntu equally fast as Gentoo....WHAT??? Reply with quote

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 8:09 am; edited 1 time in total
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3039
Location: Houston, TX

PostPosted: Sun Nov 22, 2009 1:25 am    Post subject: Reply with quote

:lol:

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
View user's profile Send private message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Sun Nov 22, 2009 2:02 am    Post subject: Reply with quote

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
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 854

PostPosted: Sun Nov 22, 2009 2:58 am    Post subject: Reply with quote

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
View user's profile Send private message
AidanJT
l33t
l33t


Joined: 20 Feb 2005
Posts: 985
Location: Rep. Of Ireland

PostPosted: Sun Nov 22, 2009 3:13 am    Post subject: Re: Ubuntu equally fast as Gentoo....WHAT??? Reply with quote

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
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3039
Location: Houston, TX

PostPosted: Sun Nov 22, 2009 3:43 am    Post subject: Reply with quote

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
View user's profile Send private message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Sun Nov 22, 2009 4:30 am    Post subject: Reply with quote

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
View user's profile Send private message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Sun Nov 22, 2009 4:31 am    Post subject: Reply with quote

blank---------

Posted this by mistake.


Last edited by dE_logics on Sun Nov 22, 2009 4:37 am; edited 1 time in total
Back to top
View user's profile Send private message
Azdo
n00b
n00b


Joined: 22 Nov 2009
Posts: 5

PostPosted: Sun Nov 22, 2009 4:32 am    Post subject: Reply with quote

...and maybe the bottleneck is not in the CPU but in the I/O performance of the hard disk.
Back to top
View user's profile Send private message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Sun Nov 22, 2009 4:38 am    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 8512
Location: Córdoba (Spain)

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

Moved from Portage & Programming to News & Announcements.
_________________
Formerly known as 6thpink.
Gentoo Handbook | My home (re-factored) | My rock band
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 8512
Location: Córdoba (Spain)

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

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.
_________________
Formerly known as 6thpink.
Gentoo Handbook | My home (re-factored) | My rock band
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Nov 22, 2009 6:30 am    Post subject: Reply with quote

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
Code:
-mtune=native -O2
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
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 8512
Location: Córdoba (Spain)

PostPosted: Sun Nov 22, 2009 6:45 am    Post subject: Reply with quote

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.
_________________
Formerly known as 6thpink.
Gentoo Handbook | My home (re-factored) | My rock band
Back to top
View user's profile Send private message
wswartzendruber
l33t
l33t


Joined: 22 Mar 2004
Posts: 724
Location: California, USA

PostPosted: Sun Nov 22, 2009 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message
djdunn
Guru
Guru


Joined: 25 Dec 2004
Posts: 407
Location: indiana pennsylvania

PostPosted: Sun Nov 22, 2009 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Nov 22, 2009 4:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gaff
n00b
n00b


Joined: 04 Jun 2009
Posts: 0

PostPosted: Sun Nov 22, 2009 4:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
energyman76b
Veteran
Veteran


Joined: 26 Mar 2003
Posts: 1935
Location: Germany

PostPosted: Sun Nov 22, 2009 4:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Mon Nov 23, 2009 2:10 am    Post subject: Reply with quote

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
View user's profile Send private message
dE_logics
Guru
Guru


Joined: 01 Jan 2009
Posts: 547

PostPosted: Mon Nov 23, 2009 2:18 am    Post subject: Reply with quote

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 4:03 am; edited 1 time in total
Back to top
View user's profile Send private message
energyman76b
Veteran
Veteran


Joined: 26 Mar 2003
Posts: 1935
Location: Germany

PostPosted: Mon Nov 23, 2009 3:52 am    Post subject: Reply with quote

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
View user's profile Send private message
vputz
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 298
Location: Oxford, England

PostPosted: Mon Nov 23, 2009 5:04 am    Post subject: Reply with quote

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
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2414
Location: Parkway exit 98, nj, us

PostPosted: Mon Nov 23, 2009 7:14 am    Post subject: Reply with quote

just make sure your CFLAGS include -fzomg-optimized, -mtune=so-fast and -O9.
_________________
let's see... between my cloudposts, vesuvas, doubling cubes, deserted temples.... that's 30214 mana per turn...

I tap everything and play sigil of distinction on my Darksteel Colossus... can you block a 30225/30225 trample indestructable?
Back to top
View user's profile Send private message
tylerwylie
Guru
Guru


Joined: 19 Sep 2004
Posts: 449
Location: /US/Illinois/Champaign

PostPosted: Mon Nov 23, 2009 7:18 am    Post subject: Reply with quote

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.
_________________
Half of history is hiding the truth.
Bipartisanship is the evil party and the stupid party agreeing to do stupid evil things.
lol government.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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