From owner-freebsd-questions@FreeBSD.ORG Sun Feb 27 16:32:55 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 068F616A4CE for ; Sun, 27 Feb 2005 16:32:55 +0000 (GMT) Received: from mta08-winn.mailhost.ntl.com (smtpout16.mailhost.ntl.com [212.250.162.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89C4543D3F for ; Sun, 27 Feb 2005 16:32:53 +0000 (GMT) (envelope-from richard.danter@ntlworld.com) Received: from aamta01-winn.mailhost.ntl.com ([212.250.162.8]) by mta08-winn.mailhost.ntl.com with ESMTP <20050227163252.FGYT8887.mta08-winn.mailhost.ntl.com@aamta01-winn.mailhost.ntl.com> for ; Sun, 27 Feb 2005 16:32:52 +0000 Received: from ntlworld.com ([82.4.184.52]) by aamta01-winn.mailhost.ntl.com with ESMTP <20050227163252.WXPL1187.aamta01-winn.mailhost.ntl.com@ntlworld.com> for ; Sun, 27 Feb 2005 16:32:52 +0000 Message-ID: <4221F632.4060301@ntlworld.com> Date: Sun, 27 Feb 2005 16:32:50 +0000 From: Richard Danter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Optimising FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2005 16:32:55 -0000 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