Re: [gentoo-user] cpu flags / USE flags / compiler flags
On Sun, 4 Sep 2005 21:59:10 -0400 [EMAIL PROTECTED] wrote: In either case, I wouldn't want to extrapolate Xeon Irwindale results to all Intel X86 chips, let alone AMD. /usr/portage/app-benchmarks has several items in it. Does anybody know which ones have floating-point tests? There are many floating-point tests. You choose by what you want to prove. And an example - [MN] sys-cluster/hpl (1.0-r2): HPL - A Portable Implementation of the High-Performance Linpack Benchmark for Distributed-Memory Computers Linpack is pretty standard but only compare linpack results to linpack results. AIM5 and AIM7 a different set. SpecFP, yet a different set. Floating point tests are meaningless outside of themselves. If your apps happens to run the same type of setup as a specific floating point test, then there is meaning. If you app has a lot of other things going on, no floating point test is going be give you an idea of how the app is going to perform. Tinfoil-hat-theory... have you noticed that Microsoft just loves to use Xeons, especially dual-Xeons, in their get the facts propaganda? I wonder if they've found a problem with gcc's optimizations for Xeon, and are exploiting that problem to bias all their comparisons. No. nothing as creative as that. It's well known that Intel's C/C++ compiler is better at some things than others. Microsoft, probably, just happens to use Intel's compiler for WinXX while forgetting to use it in place of gcc. If you want to prove that Opterons are faster than Xeons, you'll buy a copy of the PathScale compiler for the Opterons and use Intel's compiler for the Xeons. Bob - -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On 9/5/05, Bob Sanders [EMAIL PROTECTED] wrote: If you want to prove that Opterons are faster than Xeons, you'll buy a copy of the PathScale compiler for the Opterons and use Intel's compiler for the Xeons. Bob Bob, I don't think this was ever the point. The question was: For this specific machine what would be the best flags? I have a specific revision of the AMD64 process. What flags should I use? Possibly some sort of test could compile lots of things, look at numbers, and allow me to make a quantitive decision instead of just shooting in the dark. - Mark -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On Mon, 5 Sep 2005 20:35:10 -0700 Mark Knecht [EMAIL PROTECTED] wrote: Bob, I don't think this was ever the point. The question was: For this specific machine what would be the best flags? You;ll hate this - it depends on what your main apps do. Are they i/o intensive, compute intensive - more integer, specific FP instruction set? Small enough to fit into L2 cache, do lots of branching, multithreaded? I have a specific revision of the AMD64 process. What flags should I use? Possibly some sort of test could compile lots of things, look at numbers, and allow me to make a quantitive decision instead of just shooting in the dark. If you don't have a contained set of apps that represent a set of conditions that can be specifically defined, no benchmark is going to give a correct answer. In other words - your running a general purpose desktop, then there is no specific set of flags that will optimize everything. There is a set of AMD optimized strings that is being put into glibc. But it won't be for awhile - it does significant breakage to nano. And maybe to other apps. No specific compiler flags will be required for this optimization to happen - it will double memcopy speed. And that alone will provide a significant increase in performance with just a recompile - more performance than is obtainable by a set of flags. Finally, what is done by the people dropping US$100K to US$1M, they take the app they are going to run an test with that. They don't rely on benchmarks. Figure out what it is that will be your primary app. Find out how to get performance measurements on it - run sar if you have to. Change the compiler flags and re-run. Look for the bottlenecks and work to eliminate them. See - [ N] app-admin/sysstat (5.0.5-r2): System performance tools for Linux Bob - -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
Hm. Clear, brief, instructive. Smells a lot like a mini-HOWTO. On 9/3/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: There are CPU flags and there are USE flags. Some of them have the same names, and that may confuse you. It works like this... 1) Get a listing of your cpu's flags in /proc/cpuinfo 2) Check against the list of supported flags in gcc for you cpu, and add them to CFLAGS 3) Check http://www.gentoo.org/dyn/use-index.xml for a list of valid USE flags, and include any that show up in /proc/cpuinfo 4) Repeat step 3) with /usr/portage/profiles/use.local.desc for any programs you're emerging. There doesn't seem to be anything special on your pentium4, but my AMD64 not only has mmx and 3dnow, it also has mmxext and 3dnowext. mplayer can take advantage of them. I include them in the /etc/portage/package.use entry for media-video/mplayer. I'll assume that you're using gcc 3.3.5. In that case, the place to look for CPU flag options is... http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY* version of sse available, you can improve performance by running floating point math via sse, rather than 387 instructions. I recommend... CFLAGS=-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse http://www.gentoo.org/dyn/use-index.xml shows mmx and sse as valid USE flags, so you can include them in USE. -- Walter Dnes [EMAIL PROTECTED] My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On Sunday 04 September 2005 05:27, [EMAIL PROTECTED] wrote: That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY* version of sse available, you can improve performance by running floating point math via sse, rather than 387 instructions. I recommend... CFLAGS=-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse emm. I would not do this. -mfpmath=sse seems to be slower than -fpmath=387 http://www.anandtech.com/mac/showdoc.aspx?i=2436p=5 has the numbers/made the experience. It seems, that gcc is not he best optimizer in the world ;) -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
I agree with Ellotheth that it seems like there's an opportunity to come up with a good optimization doc but the paper is interesting. The answers might not be the same for P4 vs. AMD vs. sparc vs. Apple. Maybe a suite of files that get compiled, generate the numbers and instruct you what might work best? Interesting info. thanks. - Mark On 9/3/05, Volker Armin Hemmann [EMAIL PROTECTED] wrote: On Sunday 04 September 2005 05:27, [EMAIL PROTECTED] wrote: That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY* version of sse available, you can improve performance by running floating point math via sse, rather than 387 instructions. I recommend... CFLAGS=-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse emm. I would not do this. -mfpmath=sse seems to be slower than -fpmath=387 http://www.anandtech.com/mac/showdoc.aspx?i=2436p=5 has the numbers/made the experience. It seems, that gcc is not he best optimizer in the world ;) -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On Sun, Sep 04, 2005 at 08:21:47AM +0200, Volker Armin Hemmann wrote On Sunday 04 September 2005 05:27, [EMAIL PROTECTED] wrote: CFLAGS=-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse emm. I would not do this. -mfpmath=sse seems to be slower than -fpmath=387 http://www.anandtech.com/mac/showdoc.aspx?i=2436p=5 has the numbers/made the experience. It seems, that gcc is not he best optimizer in the world ;) I've read through the article, and there are a couple of interesting items in it... 1) The bit about sse being slower than 387 only applies to the brand new Xeon Irwindale. 2) The brand new 3.6 ghz Xeon Irwindale ran slower than the older 3.06 ghz Xeon Galatin. That leads to one of two possible conclusions... Really Bad) The Irwindale is at least lame if not totally b0rk3n. Not so Bad) The Irwindale is so new that the gcc developers haven't had an opportunity to implement optimizations for it. In either case, I wouldn't want to extrapolate Xeon Irwindale results to all Intel X86 chips, let alone AMD. /usr/portage/app-benchmarks has several items in it. Does anybody know which ones have floating-point tests? Tinfoil-hat-theory... have you noticed that Microsoft just loves to use Xeons, especially dual-Xeons, in their get the facts propaganda? I wonder if they've found a problem with gcc's optimizations for Xeon, and are exploiting that problem to bias all their comparisons. -- Walter Dnes [EMAIL PROTECTED] My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On Wed, Aug 31, 2005 at 09:04:21AM -0700, Mark Knecht wrote flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr [...deletia...] I then looked for CPU flags that had an equivalent USE flag and that might be of use for faster graphics. On this machine I chose mmx, sse sse2. Armed with that I changed my make.conf file to look like this: There are CPU flags and there are USE flags. Some of them have the same names, and that may confuse you. It works like this... 1) Get a listing of your cpu's flags in /proc/cpuinfo 2) Check against the list of supported flags in gcc for you cpu, and add them to CFLAGS 3) Check http://www.gentoo.org/dyn/use-index.xml for a list of valid USE flags, and include any that show up in /proc/cpuinfo 4) Repeat step 3) with /usr/portage/profiles/use.local.desc for any programs you're emerging. There doesn't seem to be anything special on your pentium4, but my AMD64 not only has mmx and 3dnow, it also has mmxext and 3dnowext. mplayer can take advantage of them. I include them in the /etc/portage/package.use entry for media-video/mplayer. I'll assume that you're using gcc 3.3.5. In that case, the place to look for CPU flag options is... http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY* version of sse available, you can improve performance by running floating point math via sse, rather than 387 instructions. I recommend... CFLAGS=-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse http://www.gentoo.org/dyn/use-index.xml shows mmx and sse as valid USE flags, so you can include them in USE. -- Walter Dnes [EMAIL PROTECTED] My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
Thanks Walter. That description verifies my guess and gives me a reason to continue looking at the issue. I appreciate your help. Cheers, Mark On 9/3/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Wed, Aug 31, 2005 at 09:04:21AM -0700, Mark Knecht wrote flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr [...deletia...] I then looked for CPU flags that had an equivalent USE flag and that might be of use for faster graphics. On this machine I chose mmx, sse sse2. Armed with that I changed my make.conf file to look like this: There are CPU flags and there are USE flags. Some of them have the same names, and that may confuse you. It works like this... 1) Get a listing of your cpu's flags in /proc/cpuinfo 2) Check against the list of supported flags in gcc for you cpu, and add them to CFLAGS 3) Check http://www.gentoo.org/dyn/use-index.xml for a list of valid USE flags, and include any that show up in /proc/cpuinfo 4) Repeat step 3) with /usr/portage/profiles/use.local.desc for any programs you're emerging. There doesn't seem to be anything special on your pentium4, but my AMD64 not only has mmx and 3dnow, it also has mmxext and 3dnowext. mplayer can take advantage of them. I include them in the /etc/portage/package.use entry for media-video/mplayer. I'll assume that you're using gcc 3.3.5. In that case, the place to look for CPU flag options is... http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY* version of sse available, you can improve performance by running floating point math via sse, rather than 387 instructions. I recommend... CFLAGS=-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse http://www.gentoo.org/dyn/use-index.xml shows mmx and sse as valid USE flags, so you can include them in USE. -- Walter Dnes [EMAIL PROTECTED] My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
[gentoo-user] cpu flags / USE flags / compiler flags
Hi, I've just recently (the last 4 or 5 days) been experiencing some lock-ups on Firefox. As far as I can tell these seem to come only when visiting certain web pages that have more multimedia content. When Firefox locks up it can be killed from a terminal and restarted. There are no messages in dmesg or /var/log/messages. In reviewing changes recently made I noted that the newest thing, for me, was changing some USE flags. What I thought I was doing was better matching the processor in each machine but possibly this is causing the problem. On my laptop, a P4 / ATI machine, I went about it like this: flash ~ # cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Mobile Intel(R) Pentium(R) 4 CPU 3.06GHz stepping: 9 cpu MHz : 3067.965 cache size : 512 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr bogomips: 6078.46 flash ~ # I then looked for CPU flags that had an equivalent USE flag and that might be of use for faster graphics. On this machine I chose mmx, sse sse2. Armed with that I changed my make.conf file to look like this: # These settings were set by the catalyst build script that automatically built this stage CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer CHOST=i686-pc-linux-gnu USE=mmx sse sse2 gnome kde -arts ladspa nptl nptlonly ladcca audiofile gimp gimpprint ppds usb alsa cdr dvd dvdr dvdread caps jack jack-tmpfs fluidsynth tcltk sndfile v4l v4l2 mysql flac xscreensaver samba i8x0 mythtv apache2 lirc mjpeg xvid real CXXFLAGS=${CFLAGS} MAKEOPTS=-j2 GENTOO_MIRRORS=http://mirror.tucdemonic.org/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://mirror.gentoo.gr.jp http://www.zentek-international.com/mirrors/gentoo/; ALSA_CARDS=atiixp VIDEO_CARDS=radeon PORTDIR_OVERLAY=/usr/local/portage I should note that I only remember adding sse2. mmx and sse where there before and I had no problems. QUESTION 1: Is this the right way to go about doing this sort of thing? Or are the CPU flags supposed to become part of the CFLAGS line also? QUESTION 2: Are there any known problems with sse2 support? I think I've added this on 3 machines and all 3 machines have experienced at least one, if not more, lockups. Certainly I can just remove the sse2 flag and recompile but I thought I'd ask first. Thanks, Mark -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
Hi, before you panic, have you tried the firefox-bin packet with the same site? Maybe nspluginviewer is the culprit? I had to kill it so many times I can't remember. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On 8/31/05, Volker Armin Hemmann [EMAIL PROTECTED] wrote: Hi, before you panic, have you tried the firefox-bin packet with the same site? Maybe nspluginviewer is the culprit? I had to kill it so many times I can't remember. Thanks Volker. I'll give it a try. I'm still interested in the right way to really set up these flags though. I was looking at some of the online docs and found stuff like this in some emails: I'm compiling currently with -mfpmath=387 -msse -mcpu=pentium3 -march=pentium3 and gcc 3.1.1-4 from the very latest experimental cygwin distribution. Obviously I'm not intested in cygwin, etc., but when I saw -msse it made me wonder if I was supposed to change my CFLAGS line from CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer to CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer -mmx -msse -msse2 I understand that the USE flags control what options are built into a pachage, but in the case of CPU flags do they also control the compiler flags that are used to build the package? Not being a programmer this is one part I'm confused about. Thanks, Mark -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
On Wednesday 31 August 2005 19:21, Mark Knecht wrote: On 8/31/05, Volker Armin Hemmann [EMAIL PROTECTED] wrote: Hi, before you panic, have you tried the firefox-bin packet with the same site? Maybe nspluginviewer is the culprit? I had to kill it so many times I can't remember. Thanks Volker. I'll give it a try. I'm still interested in the right way to really set up these flags though. I was looking at some of the online docs and found stuff like this in some emails: I'm compiling currently with -mfpmath=387 -msse -mcpu=pentium3 -march=pentium3 and gcc 3.1.1-4 from the very latest experimental cygwin distribution. Obviously I'm not intested in cygwin, etc., but when I saw -msse it made me wonder if I was supposed to change my CFLAGS line from CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer to CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer -mmx -msse -msse2 I understand that the USE flags control what options are built into a pachage, but in the case of CPU flags do they also control the compiler flags that are used to build the package? Not being a programmer this is one part I'm confused about. AFAIK the CFLAGS ONLY control the optimiziation, while the USEFLAGS only control the configuration - if somebody built in some optimiziation for mmx/sse, fine, this would be 'activated' by the useflags, not the cflags. hm, about your CFLAGs, I suppose, -march=pentium4 already sets them (mmx/sse), but this is something easily found in man gcc ;) -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] cpu flags / USE flags / compiler flags
please check it this is a flash animations proble. if it is then set XLIB_SKIP_ARGB_VISUALS=yes -- gentoo-user@gentoo.org mailing list