List Info

Thread: Tuning make.conf




Tuning make.conf
country flaguser name
Switzerland
2008-03-13 04:32:47
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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
Taiwan
2008-03-13 05:09:24
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-questionsfreebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
> To unsubscribe, send any mail to
"freebsd-questions- 
> unsubscribefreebsd.org"

_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
Netherlands
2008-03-13 05:22:05
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-questionsfreebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"
>
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://b
ugs.gentoo.org/show_bug.cgi?id=74072

--
- Marcin

_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

RE: Tuning make.conf
country flaguser name
Switzerland
2008-03-13 05:58:52
>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://b
ugs.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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
Taiwan
2008-03-13 07:02:24
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://b
ugs.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-questionsfreebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
> To unsubscribe, send any mail to
"freebsd-questions- 
> unsubscribefreebsd.org"

_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
Finland
2008-03-13 07:05:27
> 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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

RE: Tuning make.conf
country flaguser name
Switzerland
2008-03-13 07:30:05
>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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
United Kingdom
2008-03-13 08:01:47
On Thu, 13 Mar 2008 14:05:27 +0200
"Reko Turja" <reko.turjaliukuma.net> 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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
United Kingdom
2008-03-13 08:31:15
On Thu, 13 Mar 2008 13:30:05 +0100
"Luca Presotto" <Luca.Presottocern.ch> 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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: Tuning make.conf
country flaguser name
United Kingdom
2008-03-13 09:20:14
On Thu, 13 Mar 2008 13:01:47 +0000
RW <fbsd06mlists.homeunix.com> 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-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )