Date: Sun, 27 Feb 2005 16:32:50 +0000 From: Richard Danter <richard.danter@ntlworld.com> To: freebsd-questions@freebsd.org Subject: Optimising FreeBSD Message-ID: <4221F632.4060301@ntlworld.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4221F632.4060301>