12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System Configuration—Tuning PerformanceThe first is to reduce the size of the kernel by removing any unnecessary stuff.Since the kernel should be completely loaded into the memory during boot process,reducing kernel size will reduce memory usage and consequently more memorywill be available for other processes. This will also result in a faster system boot upprocess.You can remove many unnecessary hardware support entries as well as debuginformation from your kernel to reduce its size.As good practice, you can make a copy of the stock kernel (can be found at /sys/i386/conf/GENERIC) and remove (or comment out) all unnecessary hardwaresupport. Depending on your hardware, this may include unnecessary SCSI, RAID,Network Card, etc.Depending on the hardware architecture you use to run FreeBSD, yourkernel configuration file may be located at a different location such as/sys/sparc64/conf or /sys/amd64/conf.Another important tweak is to remove all debugging options from kernelconfiguration. Kernel configuration file is well documented so that these entries canbe easily spotted:makeoptionsDEBUG=-gAlternatively, if you are tracking the –current CVS tag, you may have these lines inthe kernel configuration file as well:# Debugging for use in -currentoptions KDBoptions DDBoptions GDBoptions INVARIANTSoptions INVARIANT_SUPPORToptions WITNESSoptions WITNESS_SKIPSPINYou may need to edit the kernel configuration file and recompile the kernel to findyour optimized kernel configuration. During optimization, pay special attention tothe comments in the kernel configuration file. There are some modules that cannot beremoved from the kernel.When you recompile the kernel, the system does not use compiler optimizations forvarious reasons. You may want to try compiler optimizations which, in most cases,result in faster binary code. However, depending on which compiler optimizationyou use, the kernel's binary size may also increase.[ 90 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!