View previous topic :: View next topic |
Author |
Message |
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Fri May 16, 2003 1:49 pm Post subject: Gentoo on the Opteron (x86-64) |
|
|
Hi alltogether,
today a Opterontestsystem arrived and I will try to set up an Opteron optimized Gentoo on this System. Anyone out there who did this already and have some tipps? In particular, which gcc Version should be used (I expect 3.3 to be the answer)? Reading the gcc documentation I found some flags and some informations regarding x86-64 optimizations, but one question remains: Which Processormodel do I have to tell gcc (march)? I didn't find something opteronspecific (not even in gcc 3.3)! So anyone ideas what I should supply march with?
I will keep you updated about my ongoing if anyone is interested!
Last edited by nimrod on Fri May 16, 2003 4:13 pm; edited 1 time in total |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
Posted: Fri May 16, 2003 2:34 pm Post subject: |
|
|
Here is a question before you optimize for an Opeteron? Does gcc 3.3 support sse2. I have read many articles where icc (intel c Compiler)supports this only on the new Xeons. THe articles had someone compile on a Xeon machine and take the compiled binaries to an opeteron machine and watch it surpass the itanium 2. I will have to talk to a friend that showed me the articles and then I will post the links. |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Fri May 16, 2003 2:56 pm Post subject: |
|
|
In fact gcc supports sse2 (I think they started in Version 3.1, but they fixed one bug related to this in the 3.3 release) but yes I'm really interested in the article you mentioned! |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
Posted: Fri May 16, 2003 2:57 pm Post subject: |
|
|
Here is a snippet from changelogs on http://gcc.gnu.org/gcc-3.3/changes.html
BTW this is gcc3.3
The following changes have been made to the IA-32/x86-64 port:
SSE2 and 3dNOW! intrinsics are now supported.
Support for thread local storage has been added to the IA-32 and x86-64 ports.
The x86-64 port has been significantly improved.
sse2 on the opeteron is supposed to be pheoniminal |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
Posted: Fri May 16, 2003 3:06 pm Post subject: |
|
|
try adding sse2 to your ccflags when you compile on an opeteron. That is th only thing(in theory) to optimize for the Opeteron. |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Fri May 16, 2003 3:11 pm Post subject: |
|
|
Thats why we want to bench the hell out of it
My Plan is the following one:
- gcc 3.3
- binutils (2.14....)
- glibc 2.3.2-r1
- linux-kernel 2.5.69
with the following flags for gcc:
-mmmx -msse -msse2 -m3dnow -m3dnowext -m64 -O3 -pipe -fexpensive-optimizations -ffast-math -mfpmath=sse,387
but the question is march=XXXX ?
Any ideas or concerns regarding those flags? |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
Posted: Fri May 16, 2003 9:35 pm Post subject: |
|
|
k8 is the march |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
Posted: Fri May 16, 2003 9:36 pm Post subject: |
|
|
Those look good. THat has been what I have seen on other sites for optimizations. |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat May 17, 2003 9:19 am Post subject: |
|
|
Ok, thanks for all the infos. I guess I have those flags together now.
Now I will start to set up the box. I will keep you informed about my ongoings! |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat May 17, 2003 11:19 am Post subject: |
|
|
Ok .. booting gentoo 1.4rc4 works (with smp bootoption, it recognize both Opteron CPUs).
Hm this are the flags I see with cat /proc/cpuinfo
Code: | flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall mmxext lm 3dnowext 3dnow |
I was wondering what mmxext means? |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat May 17, 2003 2:25 pm Post subject: |
|
|
Bootstrapping with gcc 3.3 doesn't work (used an ebuild provided by cyfred)... there are too much problems. So I decided to built first a 32bit System with the following flags:
Code: | CFLAGS="-march=athlon-xp -mmmx -msse -msse2 -m3dnow -fexpensive-optimizations -ffast-math -mfpmath=sse,387" |
Then I will run some benchmark on this system and check the pure 32bit performance. After that I will try to get gcc 3.3 up and running and recompile kernel and as much as possible other stuff in 64bit mode (as I understand I need to recompile everything if I recompile glibc with 64bit support, because I can't use a 64bit lib from a 32 bit program). |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat May 17, 2003 7:39 pm Post subject: |
|
|
For those who care:
I finished my first benchmarks on the pure 32 bit System:
the dual AMD Opteron (240, 1,4ghz) is as fast as an dual Intel P4 XEON with 2,667 ghz.
By the way I only needed 3 hours to setup the whole system from stage 1. (no desktop stuff only, emerge system and logger,cron,kernel etc).
Tomorrow I will try to set up as much as possible using gcc 3.3 |
|
Back to top |
|
|
Evangelion Veteran
Joined: 31 May 2002 Posts: 1087 Location: Helsinki, Finland
|
Posted: Mon May 19, 2003 7:34 am Post subject: |
|
|
w00t! Any updates on this?
<=== Future Athlon64-owner so I'm really interested on this. _________________ My tech-blog | My other blog |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Tue May 20, 2003 4:13 pm Post subject: |
|
|
So here I'm back again. I only get forward very slow (it isn't as easy as I hoped to bootstrap the system with gcc 3.3 . If anyone is out there with some tipps I wouldn't mind .
Another Question which went through my mind:
If I have a pure 64bit System (all packages compiled with gcc -m64 ), can I use 32bit compiled Packages (which I can't recompile) or should I have a 32bit Version of glibc also available (and other libs maybe).
Anyone knows how Suse does this? |
|
Back to top |
|
|
Lycander Guru
Joined: 10 Apr 2003 Posts: 468
|
Posted: Tue May 20, 2003 11:54 pm Post subject: |
|
|
Forgive my lousy memory but I vaguely remember reading somewhere, someone claims that using SSE2 on Opteron platforms actually incurrs a speed penalty. Can anyone confirm this? |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Wed May 21, 2003 10:04 am Post subject: |
|
|
I hardly doubt this ... as I understand the Opterondesign, the SSE2 Units are an important part of it. But if I have some time to test it, I will check the difference between -msse2 and -mnosse2! |
|
Back to top |
|
|
taskara Advocate
Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Thu May 22, 2003 5:22 am Post subject: |
|
|
well I did hear the following:
that sse2 instructions worked BEST for the opteron if first compiled on a XEON using ICC, then ported across to opteron platform.
This was a few months ago, don't know if the situation has changed at all.
Obviously the opteron won't compile anything using ICC. _________________ Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer! |
|
Back to top |
|
|
cchapman Guru
Joined: 16 Jan 2003 Posts: 440 Location: Fremont, NE
|
Posted: Thu May 22, 2003 12:35 pm Post subject: |
|
|
Come to think of it that does sound familar. I though that gcc with sse2 will also make it faster but nnot quite as good as ICC. |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Thu May 22, 2003 1:50 pm Post subject: |
|
|
Ok .. I benched the whole system with -mno-sse2 at it is measurable slower (around 24% .. depends on the benchmark). So I guess SSE2 is quite ok for Opteron .
Next thing: the ICC - Issue
Hm pretty sure that this compiler makes awesome SSE2 code .. thats why it could make code faster on Opteron. But I guess ICC doesn't support 3dnow and 3dnowext (I don't know yet what 3dnowext means .. I will have a lookt for it). I am not sure how 3dnow and 3dnowext compares with SSE and SSE2 (in normal applications ... games is another question of cause) ... anyone who knows a little bit more about 3dnow and 3dnowext .. and how much impact those options have with gcc on standartaplications (I remember that there is no -m3dnowext option in the gcc 3.3 release yet). |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Thu May 22, 2003 2:13 pm Post subject: |
|
|
Ok .. learned that 3dnowext is no new feature of the opteron (AMDs CPUs have this since sometime now).
Also I "think" that gcc needs no -m3dnowext option, because it uses the -m3dnow and -march options to determine if 3dnowext is available.
I hope that I'll be able to set up the basesystem on 64bit on weekend .. maybe I find some time to check ICC out .. would be nice to compare!
I keep you informed!
Ah another thing ... I recently read that the Gentoo Team works on an Opteronfeatured Release .. anyone knows more about that? |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Thu May 22, 2003 6:42 pm Post subject: |
|
|
By the way ... using ICC only makes sense if you like to use your Opteron as a pure 32bit System ..
I'm not aware of any 64 bit capabilities of the ICC for the Opteron! |
|
Back to top |
|
|
TheMatt n00b
Joined: 22 May 2003 Posts: 35 Location: Boulder, CO
|
Posted: Thu May 22, 2003 7:30 pm Post subject: |
|
|
Quote: | I'm not aware of any 64 bit capabilities of the ICC for the Opteron! |
True, but you could reach unknown levels of 133t-ness if you can use ECC to compile on the Opteron.
In fact, it is my enormous bad luck compiling with ECC on Itanium II's is the reason I am jonesing for Opterons in my next workstation. (Unless anyone out there has a spare Alpha EV7?)
Keep up the good work! I'm reading this thread with great envy...
The Matt _________________ The Matt
I am a theoretical chemist. Fear me! Please. |
|
Back to top |
|
|
m3thos n00b
Joined: 09 Apr 2002 Posts: 46 Location: Portugal
|
Posted: Fri May 23, 2003 1:57 am Post subject: |
|
|
nimrod wrote: | So here I'm back again. I only get forward very slow (it isn't as easy as I hoped to bootstrap the system with gcc 3.3 . If anyone is out there with some tipps I wouldn't mind .
Another Question which went through my mind:
If I have a pure 64bit System (all packages compiled with gcc -m64 ), can I use 32bit compiled Packages (which I can't recompile) or should I have a 32bit Version of glibc also available (and other libs maybe).
Anyone knows how Suse does this? |
opteron can run 32bits apps natively, you don't have to bother about that.
optimize to x86-64 everything that you can, and the rest.. simply run it!.
just make you kernel x86-64 aware.
p.s.: do you really thrust those expensive optimization flags of gcc?
the last time I checked the gcc benchmark page, they worren't all that stable/reliable, and in many benchmarks a simple -02 -fomit-frame-pointer -pipe gave the best result.
anyway, its just a thought. _________________ Miguel Sousa Filipe
handle: m3thos
More human than human |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat May 24, 2003 12:18 pm Post subject: |
|
|
First of all: got another Testsystem with dual 1,6 ghz Opteron and 6 GB RAM .. will have a look on this to check out the performancedifference between 1,4 and 1,6.
Quote: |
do you really thrust those expensive optimization flags of gcc?
|
Hm .. I am not sure about that. On an XEON System -fexpensive-optimizations brought around 2% performancegain in some benchmarks .. while other was'nt slower. Haven't checked out this on Opteron. Will try this out on the 1,4 Ghz System.
Quote: |
just make you kernel x86-64 aware
|
I'm working on it |
|
Back to top |
|
|
|