Optimising FreeBSD

From: Richard Danter (richard.danter_at_ntlworld.com)
Date: 02/27/05

  • Next message: Ken Hawkins: "Re: complete rookie sendmail question"
    Date: Sun, 27 Feb 2005 16:32:50 +0000
    To: freebsd-questions@freebsd.org
    
    

    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

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


  • Next message: Ken Hawkins: "Re: complete rookie sendmail question"

    Relevant Pages

    • Re: Pros & Cons for AMD 64b vs. Athlon based Linux box
      ... Athlon 64 machines, a 3400+ laptop and a 3800+ desktop. ... note that I'm using a custom kernel on both. ... Nforce 3 or Nforce 4 systems. ... list the 64 bit version of Mandrake 10.2 will install on a Nforce + SATA ...
      (comp.os.linux.hardware)
    • Re: Best Linux version to port from OpenServer 5.0.5/6
      ... >have technicians drive to each store with a cd every time we ... I build all the FreeBSD machines I maintain from sources remotely. ... new kernel from the newly built object, you never install the ... complete OS binaary until you boot up a working kernel. ...
      (comp.unix.sco.misc)
    • Re: Booting kernel 2.6test9 on redhat 9
      ... :>Not to long ago I installed redhat 9 on one of my machines. ... :>jane install in which I had it install everything. ... :>that is only supported with a 2.6 kernel. ... that looke interesting in regards to an upgrade. ...
      (comp.os.linux.setup)
    • Re: Booting kernel 2.6test9 on redhat 9
      ... :> Not to long ago I installed redhat 9 on one of my machines. ... :> jane install in which I had it install everything. ... :> that is only supported with a 2.6 kernel. ... I had a problem like that as well, when I forgot to compile in support for ...
      (comp.os.linux.setup)
    • RE: fedora-list Digest, Vol 10, Issue 241
      ... > On the windows side everything works just fine from the win XPsp2 machines ... > the Windows XP firewall and then I could share/connect to those. ... Differences between the kernel source in FC2 and the kernel ...
      (Fedora)