1 reply [Last post]
Bill Haynes
Bill Haynes's picture
User offline. Last seen 1 day 2 hours ago. Offline
Joined: 03/25/2009

I've decided to build a new server and of course I'm going with my favorite server Operating System - FreeBSD, and currently FreeBSD is at version 7.2. In doing this I will be doing as much as possible to optimize the utility of this machine including compiling most of my multi-user applications from the ports tree. Before I do this I am going to edit the make.conf file found in /etc/make.conf so that everything built on the machine will be as optimized as possible. Once I do this I will also rebuild the kernel. Throughout this post I will post all of the things I've done for other to see and comment on, feel free to add your two cents.

Server Specs:

AMD Athlon XP 2800+ @ 2 Ghz
2GB DDR 400
80GB Hard Drive

Share/Save
Bill Haynes
Bill Haynes's picture
User offline. Last seen 1 day 2 hours ago. Offline
Joined: 03/25/2009
I won't go too into depth

I won't go too into depth here, as I don't want to insult anyone by considering them an idiot - but just to check out and verify processor specs on a given machine you can run a couple of things to check the specs and features of the processor.

sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'

which gives the output:

hw.machine: i386
hw.model: AMD Athlon(tm) XP 2800+
hw.ncpu: 1
hw.machine_arch: i386

grep -i cpu /var/run/dmesg.boot

which gives the output:
CPU: AMD Athlon(tm) XP 2800+ (2080.62-MHz 686-class CPU)
cpu0: on acpi0

Now once you have researched the flags, options, etc. that you want to set in make.conf for your processor which we researched above, we need to copy the example make.conf from /usr/share/examples/etc/make.conf to /etc/make.conf. Now we can edit this to suit our needs. Remember, once you modify this from the stock machine, you will not be able to copy binaries from this machine to another unless it's an identical processor setup, and there could be some serious issues if you make a mistake, or I do an you copy from this so ymmv: you were warned :-D.

These are the lines I've added to the make.conf

CPUTYPE?=athlon-xp
CFLAGS= -O2 -pipe
COPTFLAGS= -O -pipe

You can add plenty more but I would rather get as much speed increase as I can while risking as little breakage as necessary. This is what I've chosen, and I left -funroll-loops out on purpose just because once in a bit it causes breaks and it's just not worth the risk for one extra register, JMHO.

Recent activity