Caveats of rebuilding the kernel on FreeBSD AMD64

by kkikta 1. February 2008 02:43
I my previous post I talked about rebuilding the kernel on a AMD64 machine with dual processors, what I didn't know at the time is the default installed kernel enables SMP but the GENERIC kernel profile does not. Enabling SMP in the FreeBSD kernel is quite easy all thats necessary is to add the SMP option prior to rebuilding the kernel.
options         SMP                     # Enable SMP kernel
Once this is done just follow the same steps I have described in previous posts. After you have completed the kernel install you can verify that the operating system sees all the processors by running one of the following commands.
[root@test] [/root]> cat /var/log/messages | grep cpu
Jan 30 10:33:11
test kernel: cpu0: <ACPI CPU> on acpi0
Jan 31 07:48:42
test kernel: cpu0 (BSP): APIC ID: 0
Jan 31 07:48:42
test kernel: cpu1 (AP): APIC ID: 1
Jan 31 07:48:42
test kernel: cpu0: <ACPI CPU> on acpi0
Jan 31 07:48:42
test kernel: cpu1: <ACPI CPU> on acpi0

[root@test] [/root]> ps -aux | grep cpu
root 10 99.0 0.0 0 16 ?? RL 7:48AM 783:07.85 [idle: cpu1]
root 11 99.0 0.0 0 16 ?? RL 7:48AM 781:42.93 [idle: cpu0]
root 42 0.0 0.0 0 16 ?? DL 7:48AM 0:00.60 [schedcpu]
kkikta 16847 0.0 0.1 5920 1256 p0 S+ 8:52PM 0:00.00 grep cpu

[root@test] [/root]> top -n
last pid: 16900; load averages: 0.00, 0.00, 0.00 up 0+13:05:43 20:53:44
27 processes: 1 running, 26 sleeping

Mem: 12M Active, 13M Inact, 31M Wired, 20M Buf, 1912M Free
Swap: 512M Total, 512M Free


PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
635 pgsql 1 8 0 53580K 5776K nanslp 0 0:02 0.00% postgres
624 pgsql 1 96 0 53580K 5480K select 1 0:02 0.00% postgres
As you probably noticed I colored the text in red that distinguishes between processors.

Tags:

FreeBSD

Add comment



  Country flag
biuquote
  • Comment
  • Preview
Loading


Month List

Page List