Re: Tuning make.conf
On Mar 13, 2008, at 17:32 , Luca Presotto wrote: Hi everyone! I was starting to think to recompile everything for my pc to speed up everything. I started googling and I found almost nothing about how to change make.conf on bsd. Almost everything was about Gentoo, somehow not unsurprisingly. Try man make.conf J.H. The first thing I noticed is that for linux all the instructions are about doing CFLAGS= value while it seems from /etc/share/examples/ make.conf that in bsd I don't need . Is it correct? Second question: If I set MAKEOPTS= -j 3 will that be used when portupgrading? (It's really to slow otherwise!) Third question...The most difficult..Which are the best flags for my machine? (freebsd 7.0-RELEASE with an intel centrino core2 duo) I have seen in the /examples/etc/make.conf that one of the possible CPUTYPE is core2 which looks to me as the right one but a geekier friend of mine that lives inside gentoo-linux told me that this option is unknown is gcc 4.2 and will be working from gcc4.3, so he told me to use prescott. And what do I have to set to make gcc aware of the type of CPU I have? CPUTYPE= cpu and then CFLAGS= --O2 -pipe (etc..) or should I not write the cputype and then do: CLFAGS= -march=mycpu --O2 etc Can someone give me some advice on how to configure this file? Or can you provide me some documentation? Thank you! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions- [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
Luca Presotto wrote: Hi everyone! I was starting to think to recompile everything for my pc to speed up everything. I started googling and I found almost nothing about how to change make.conf on bsd. Almost everything was about Gentoo, somehow not unsurprisingly. The first thing I noticed is that for linux all the instructions are about doing CFLAGS= value while it seems from /etc/share/examples/make.conf that in bsd I don't need . Is it correct? Second question: If I set MAKEOPTS= -j 3 will that be used when portupgrading? (It's really to slow otherwise!) Third question...The most difficult..Which are the best flags for my machine? (freebsd 7.0-RELEASE with an intel centrino core2 duo) I have seen in the /examples/etc/make.conf that one of the possible CPUTYPE is core2 which looks to me as the right one but a geekier friend of mine that lives inside gentoo-linux told me that this option is unknown is gcc 4.2 and will be working from gcc4.3, so he told me to use prescott. And what do I have to set to make gcc aware of the type of CPU I have? CPUTYPE= cpu and then CFLAGS= --O2 -pipe (etc..) or should I not write the cputype and then do: CLFAGS= -march=mycpu --O2 etc Can someone give me some advice on how to configure this file? Or can you provide me some documentation? Thank you! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] You're *really* wasting your time. The whole thing about those compiler optimizations is a myth. And most ports are already compiled with -O2 by default IIRC. But why would you spend two days compiling for a 0.1% speed increase? Your system is doing no cpu cycles at all for most of the time anyway. And I really wouldn't recommend aggressive optimizations for stuff like the kernel. Disabling unnecessary services or installing apps you often use without support for X and Y (like installing KDE or Gnome base, then the apps you *really* want on top of it) will give you much better performance than messing with CFLAGS and such. Also, makeopts and -pipe just make _compiling_ faster, not the applications themselves!!!. Please take a look at the following pages, they have a lot more information about this matter ;) http://funroll-loops.info/ http://bugs.gentoo.org/show_bug.cgi?id=74072 -- - Marcin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Tuning make.conf
You're *really* wasting your time. I supposed that! Your system is doing no cpu cycles at all for most of the time anyway. [cut]Also, makeopts and -pipe just make _compiling_ faster, not the applications themselves!!!. I agree with everything. In any case I think that a faster compiling will really be a good thing. I have been reading another time the man of make.conf and I still have some doubts. Neither in the example either in the man page there is any reference to MAKEOPTS. Changing from -j1 to -j3 would really be a huge difference! To be able to set this is very important. Then I don't want an ultra tweaked make.conf like gentooers do. Just a reasonable one. (And you have convinced me, I won't recompile everything. Just to have a good compiling when I will be upgrading) I have some doubts about the correct syntax, the man is ambiguous in this point. If I write CPUTYPE= core2 will it automatically sets all the best safe CFLAGS for my core or just set the -march=core2 Should my make.conf be like: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS= --O2 -pipe -fno-strict-aliasing or just: MAKEOPTS==-j3 CPUTYPE=core2 or maybe: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS+= --O2 -pipe -fno-strict-aliasing Please take a look at the following pages, they have a lot more information about this matter ;) http://funroll-loops.info/ http://bugs.gentoo.org/show_bug.cgi?id=74072 Actually that's really funny!! I think that's why there are so many pages about gentoo and almost none about other OSes. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
Hi, On Mar 13, 2008, at 18:58 , Luca Presotto wrote: You're *really* wasting your time. I supposed that! Your system is doing no cpu cycles at all for most of the time anyway. [cut]Also, makeopts and -pipe just make _compiling_ faster, not the applications themselves!!!. I agree with everything. In any case I think that a faster compiling will really be a good thing. I have been reading another time the man of make.conf and I still have some doubts. Neither in the example either in the man page there is any reference to MAKEOPTS. Changing from -j1 to -j3 would really be a huge difference! Isn't -j depend on how many cpu/core and a faster harddisk / raid? In our small lab we used to install New system on some Very Old SCSI for testing (18G SCSI 2 I think). It takes 2x to 3x more time to build world / kernel than a New SCSI Ultra 320 HD on the Same machine no matter what we put in -j. Faster / Higher IO through put always compile faster. Also there may be problem buildworld and buildkernel if use -j IIRC, other method is required to speed up compiler when build world / kernel. Like not compile everything except what is Really need to be recompile. To be able to set this is very important. Then I don't want an ultra tweaked make.conf like gentooers do. Just a reasonable one. (And you have convinced me, I won't recompile everything. Just to have a good compiling when I will be upgrading) I have some doubts about the correct syntax, the man is ambiguous in this point. If I write CPUTYPE= core2 will it automatically sets all the best safe CFLAGS for my core or just set the -march=core2 Should my make.conf be like: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS= --O2 -pipe -fno-strict-aliasing or just: MAKEOPTS==-j3 CPUTYPE=core2 or maybe: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS+= --O2 -pipe -fno-strict-aliasing I remember seeing some thread in Stable@, Question@, Performance@ discuss about best CPUTYPE on AMD64 not long ago. J.H. Please take a look at the following pages, they have a lot more information about this matter ;) http://funroll-loops.info/ http://bugs.gentoo.org/show_bug.cgi?id=74072 Actually that's really funny!! I think that's why there are so many pages about gentoo and almost none about other OSes. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions- [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
Should my make.conf be like: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS= --O2 -pipe -fno-strict-aliasing or just: MAKEOPTS==-j3 CPUTYPE=core2 or maybe: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS+= --O2 -pipe -fno-strict-aliasing Setting CFLAGS can cause errors while compiling and other undesirable effects, so I recommend leaving CFLAGS undefined. If you want to optimise things use COPTFLAGS instead. -Reko ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Tuning make.conf
Isn't -j depend on how many cpu/core and a faster harddisk / raid? Yes, it is. But with j1 you have only one job running at a time. On a dual core you can really easily running at least two jobs at the same time. Then I've read a number of ideas about which is the relation between the number of cores and the optimal number of jobs. I have been suggested something between n+1 and 2n+1 Of course the optimal number of jobs depends on the disk speed and similar. But switching between 1 and 3 gives something like halving the time needed to compile everything. Maybe it's possible that when building the kernel it gives some problem, but I'm thinking about compiling ports. Or does portupgrade automatically chooses which -j to use? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
On Thu, 13 Mar 2008 14:05:27 +0200 Reko Turja [EMAIL PROTECTED] wrote: MAKEOPTS==-j3 CPUTYPE=core2 CFLAGS+= --O2 -pipe -fno-strict-aliasing Setting CFLAGS can cause errors while compiling and other undesirable effects, so I recommend leaving CFLAGS undefined. If you want to optimise things use COPTFLAGS instead. Don't set either of them, they both get set automatically, and messing with COPTFLAGS is potentially more dangerous than with messing CFLAGS. Just set CPUTYPE unless you know what you are doing. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
On Thu, 13 Mar 2008 13:30:05 +0100 Luca Presotto [EMAIL PROTECTED] wrote: Maybe it's possible that when building the kernel it gives some problem, but I'm thinking about compiling ports. You need to understand that make.conf affects FreeBSD make, which is used for building the base system, and for the ports infrastructure. It's use in ports in analogous to the python part of the Gentoo portage system. The actual port build itself is normally done by gmake (GNU make), because that's determined by the upstream project. Passing -j directly to a port make doesn't make any sense, and breaks the ports system. What you need to do is pass the -j to the underlying gmake in the build stage. I can't remember offhand how to do that, but you can look in bsd.port.mk to see what variables get used. There is also talk of regularizing this this approach by changes to the ports system. Whether or not an individual port works with -j is mostly a matter for the upstream project; many builds will break or become flakey, so any -j settings need to be made per port rather than globally. (BTW if you want to speed-up builds you might also try devel/ccache.) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
On Thu, 13 Mar 2008 13:01:47 + RW [EMAIL PROTECTED] wrote: Just set CPUTYPE unless you know what you are doing. I forgot to mention, you can set core2 if you want to. At present, it will be automatically translated into either nocona (64-bit) or prescott (32-bit). See /usr/src/share/mk/bsd.cpu.mk. As a generally rule, start from the assumption that everything that Gentoo users say about setting-up FreeBSD is wrong. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tuning make.conf
On Thu, 13 Mar 2008 14:20:14 + RW [EMAIL PROTECTED] wrote: prescott (32-bit). See /usr/src/share/mk/bsd.cpu.mk. That should be /usr/share/mk/bsd.cpu.mk ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Tuning make.conf
Thank you for your answers, you have been very clear! I'm still not into recompiling the kernel for the moment! I will have a look at the way to speed up the various ports building with the gmake. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]