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.

To enable compiler optimizations, you should add the following line or a similarline, depending on your preferences, to the kernel configuration file:Chapter 6makeoptionsCOPTFLAGS="-O2 -pipe -funroll-loops -ffast-math"Always use these types of modifications with caution, as it may render your systemunstable. It is advised that you don't use the -O3 flag, as it has proven to result in anunstable binary output.SMPIf you are using a multi-processor (SMP) hardware, you should know that the SMPfeatures are optional in the FreeBSD 7 stock kernel. However, as the SMP is enabled(by default) in the GENERIC kernel, you need to always ensure that you have thefollowing lines in your kernel configuration when building a new kernel:optionsdeviceSMPapicOnce you have compiled and rebooted with a new kernel, you would see multipleprocessors being detected during boot time. Alternatively, you can read thedmesg(8) output:# dmesg | grep -i cpuCPU: Intel(R) Xeon(TM) CPU 3.20GHz (3200.14-MHz 686-class CPU)Logical CPUs per core: 2FreeBSD/SMP: Multiprocessor System Detected: 4 CPUscpu0 (BSP): APIC ID: 0cpu1 (AP): APIC ID: 1cpu2 (AP): APIC ID: 6cpu3 (AP): APIC ID: 7cpu0: on acpi0cpu1: on acpi0cpu2: on acpi0cpu3: on acpi0SMP: AP CPU #2 Launched!SMP: AP CPU #1 Launched!SMP: AP CPU #3 Launched!You can also take advantage of SMP, while building world from the source. Themake(1) utility lets you run multiple simultaneous jobs. Using this feature will savetons of time while rebuilding world. For example in a quad-processor environmentyou may use:# make –j4 buildworld[ 91 ]

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

Saved successfully!

Ooh no, something went wrong!