Ask a Question related to FreeBSD, Design and Development.
-
Richard Danter #1
Optimising FreeBSD
Hi all,
I'm still fairly new to this, so I hope you all don't mind another
question. Actually, several questions!!!!
First let me explain what I have, then what I want to do.
I have 2 machines which I want to run FreeBSD on. So far I have set one
of them up, a P-II machine, as a file & print server. Next set up a
P-III machine for day to day use as a workstation.
Since neither of these machines are particularly powerful I want to be
able to optimise the performance of them both. I don't mind sitting and
waiting for compiles now it if means better performance later.
Particularly on the workstation as I will be doing some fairly intensive
things on it (eg multimedia).
So on the P-II machine I installed 5.3-RELEASE with no problems. I then
re-built the kernel with the I686_CPU option set and a load of
unnecessary drivers removed. This saved about 4MB right away. I then
used CVSup to update the ports and installed Samba and one or two
others. I thought I was doing pretty well since I can print and read
files from both Windows and other *NIX machines, but I have since
realised that I probably don't have the best optimisations in place.
Having spent some more time reading the handbook and various bits on the
web I think I know what to do, but would really appreciate some
independent confirmation.
First, I think I need to edit the /etc/make.conf file. This is what I
think I should have in place:
CPUTYPE ?= p2 # or p3 on my workstation
CFLAGS = -O -pipe # O2 and above not recommended?
COPTFLAGS= -O -pipe
I am not sure I understand the difference between CFLAGS and COPTFLAGS.
Am I right in saying that COPTFLAGS is used for kernel builds and CFLAGS
is used for everything else? If so, should they be set the same, or can
I safely increase the -O setting in CFLAGS?
Is there anything else I need to set?
Assuming the settings above are right, now I guess I can rebuild my
kernel again without changing the configuration but I should now have p2
specific code? Is there anything in the kernel config file I need to
check? Do I even need to rebuild since I had the I686_CPU setting?
Next I guess I need to re-build the rest of the userland apps. Is it
simply a case of building world, or do I have to go through the whole
upgrade procedure as described in the Handbook?
I want to stick to -RELEASE, does this change (bug/security fixes)? If
so, how do I update? I can see CVSup config files for -CURRENT and
-STABLE, but not for -RELEASE.
I guess the last step is to recompile the ports I have installed. Is
there a quick way to rebuild just the ports I have installed or do I
need to go through them all one by one and 'make install clean' them?
Anything else I have missed?
Sorry for so many questions in one go!
Many thanks in advance,
Rich
Richard Danter Guest
-
Optimising queries
Hi! I wonder if anyone can tell me if there is anything I can do to make this set of queries a lot more efficient. Right now I have this code... -
Compile FreeBSD RELENG_5 on FreeBSD 4-STABLE
Hi. I have a FreeBSD 4-STABLE machine. I want to do my custom RENELG_5 FreeBSD release. I'm get all RELENG_5 CVS source (with cvs checkout... -
Optimising a web app
I have a web app using C# for coding. I need to track the "memory usage" and "performance" of the application. Are there any tools available for... -
Optimising speed
Hello I made a webpage with 2 flash films and a navigation bar which is a javascript applet. They start all three at the same moment. Both movies... -
optimising flash for the web
hi does anyone have any advice on how to optimise for quickest download time? for an entire flash site, is it better to have one swf with... -
RW #2
Re: Optimising FreeBSD
On Sunday 27 February 2005 16:32, Richard Danter wrote:
The easiest way is to use portupgrade>...
> I guess the last step is to recompile the ports I have installed. Is
> there a quick way to rebuild just the ports I have installed or do I
> need to go through them all one by one and 'make install clean' them?
>
portupgrade -fa will work, but I tend to use something like this:
portupgrade -f '<2005-02-27 16:40'
which means force a rebuild of ever port built before the given time. This can
be restarted if a build fails or you need to stop and restart.
RW Guest
-
Subhro #3
RE: Optimising FreeBSD
Make that CPUTYPE=p2 instead of CPUTYPE?=p2. The later is used if you build> -----Original Message-----
> From: [email]owner-freebsd-questions@freebsd.org[/email] [mailto:owner-freebsd-
> [email]questions@freebsd.org[/email]] On Behalf Of Richard Danter
> Sent: Sunday, February 27, 2005 22:03
> To: [email]freebsd-questions@freebsd.org[/email]
> Subject: Optimising FreeBSD
>
> First, I think I need to edit the /etc/make.conf file. This is what I
> think I should have in place:
>
> CPUTYPE ?= p2 # or p3 on my workstation
> CFLAGS = -O -pipe # O2 and above not recommended?
> COPTFLAGS= -O -pipe
for p2 on a different platform. CFLAGS and COPTFLAGS look ok. You can try
-O2 for COPTFLAGS but expect some instabilities.
That's correct>
> I am not sure I understand the difference between CFLAGS and COPTFLAGS.
> Am I right in saying that COPTFLAGS is used for kernel builds and CFLAGS
> is used for everything else?
Go through /usr/local/sys/i386/conf/NOTES. Read through the different>
> Is there anything else I need to set?
processor flags.
Just rebuilding the kernel after modifying make.conf should be enough.>
> Assuming the settings above are right, now I guess I can rebuild my
> kernel again without changing the configuration but I should now have p2
> specific code? Is there anything in the kernel config file I need to
> check? Do I even need to rebuild since I had the I686_CPU setting?
Yeh a rebuild of world is necessary. Well, not necessary but definitely>
> Next I guess I need to re-build the rest of the userland apps. Is it
> simply a case of building world, or do I have to go through the whole
> upgrade procedure as described in the Handbook?
recommended.
RELENG_X means FreeBSD X-STABLE, RELENG_X_Y means FreeBSD X.Y-RELEASE.>
> I want to stick to -RELEASE, does this change (bug/security fixes)? If
> so, how do I update? I can see CVSup config files for -CURRENT and
> -STABLE, but not for -RELEASE.
Read through the "make world" section of the handbook again.
The simplest way I would do is pkg_delete -ad. This would delete *all* the>
> I guess the last step is to recompile the ports I have installed. Is
> there a quick way to rebuild just the ports I have installed or do I
> need to go through them all one by one and 'make install clean' them?
>
> Anything else I have missed?
installed ports. Then selectively rebuild the ports as required.
You don't learn something unless you have the guts to ask, so be proud about> Sorry for so many questions in one go!
it. :-)
Regards,
S.
Indian Institute of Information Technology
Subhro Sankha Kar
Block AQ-13/1, Sector V
Salt Lake City
PIN 700091
India
Subhro Guest



Reply With Quote

