Hello! Somehow, i cannot find info now how to build kernel and world very optimized to a particular machine. Maybe i am not looking hard enough? The point is that if i have Xeon HT cpus (not very new, but definitelly not Pentium PRO :) i can build kernel and world using insttructions for this CPU and optimization for it, so i would get myself a speedy system and less memory hungry, right? The only option known to me which is related to the isee is cpu setting in kernel config file. Anything else? Thank you very much in advance -- Regards, Artem Kuchin
Erik Trulsson
2007-Oct-12 03:11 UTC
how to compiel kernel and world to maxium optimization
On Fri, Oct 12, 2007 at 02:02:09PM +0400, Artem Kuchin wrote:> Hello! > > Somehow, i cannot find info now how to build kernel and world > very optimized to a particular machine. Maybe i am not looking > hard enough? > > The point is that if i have Xeon HT cpus (not very new, but > definitelly not Pentium PRO :) i can build kernel and world > using insttructions for this CPU and optimization for it, so > i would get myself a speedy system and less memory hungry, right? > > The only option known to me which is related to the isee is cpu > setting in kernel config file. Anything else? > > Thank you very much in advanceYou can set CPUTYPE in /etc/make.conf to have the compiler do some CPU-specific optimizations. You can also set CFLAGS/COPTFLAGS (for world/kernel) in /etc/make.conf to whatever flags the compiler supports. Don't complain if anything breaks though - you are only supposed to touch those flags if you know what you are doing. Don't expect any major (or even noticable) improvements from these settings though. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Jeremy Chadwick
2007-Oct-12 03:21 UTC
how to compiel kernel and world to maxium optimization
On Fri, Oct 12, 2007 at 02:02:09PM +0400, Artem Kuchin wrote:> The point is that if i have Xeon HT cpus (not very new, but > definitelly not Pentium PRO :) i can build kernel and world > using insttructions for this CPU and optimization for it, so > i would get myself a speedy system and less memory hungry, right?Not necessarily. This assumption is often driven by what I like to call the "Gentoo mentality". Throwing on optimisations and assuming the system will "magically be more efficient" is not how you gain efficiency; I grow tired of seeing programs mindlessly set -O3 and other insanities, based purely on assumptions.> The only option known to me which is related to the isee is cpu > setting in kernel config file. Anything else?By using CPUTYPE in /etc/make.conf. /usr/share/examples/etc/make.conf lists value values. For a Xeon, you should probably use "nocona", assuming the Xeon model you have supports SSE3 instructions. Other- wise, use "prescott". Also, very important: use CPUTYPE?=value and not CPUTYPE=value. There's a thread on the values (focusing around amd64, but the same applies to i386) below; see the post from Mike Meyer. http://groups.google.com/group/lucky.freebsd.amd64/browse_thread/thread/79b9b9664cc87ae5/6eb86b7ede208173?lnk=st&q=freebsd+cputype+xeon#6eb86b7ede208173 -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |