FreeBSD on L1N64-SLI WS

2007-10-01 (月) 09:15:58

Server Profile

Special TNX 4 Yo_Nakao

MB:L1N64-SLI WS

http://www.asus.com/products4.aspx?l1=3&l2=136&l3=486&model=1530&modelmenu=1

CPU:AMD Athlon™ 64 FX-74 * 2

http://www.amd.com/jp-ja/Processors/ProductInformation/0,,30_118_9485_9488,00.html

http://www.amd.com/jp-ja/Processors/ProductInformation/

Memory

Corsair TWIN2X2048-6400C4D

HDD

Seagate ST3250620NS 3.AEG x 4

Onboard Raid 0+1

64bit版FreeBSD 6.2のカーネルを作成

32bit版FreeBSD では4Gb以上のメモリーの容量を正しく認識せず、makeworldなどがcrashしたり、カーネルの再構築でエラーするので、 ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/6.2/ などから、amd64用のCDイメージをDLし、インストールする。

また、配布されるamd64のGENERICカーネルのデフォルトではSMPオプションは入っていないので、/usr/src/sys/amd64/conf/GENERIC に

options		SMP

の行があるか確認する。

Sep 21 18:32:20 kernel: FreeBSD 6.2-RELEASE #0: Fri Jan 12 08:32:24 UTC 2007
Sep 21 18:32:20 kernel: root@portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
Sep 21 18:32:20 kernel: Timecounter "i8254" frequency 1193182 Hz quality 0
Sep 21 18:32:20 kernel: CPU: AMD Athlon(tm) 64 FX-74 Processor (3000.14-MHz K8-class CPU)
Sep 21 18:32:20 tfc kernel: Origin = "AuthenticAMD"  Id = 0xc0f13  Stepping = 3
Sep 21 18:32:20 kernel: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
Sep 21 18:32:20 kernel: cpu0 (BSP): APIC ID:  0
Sep 21 18:32:20 kernel: cpu1 (AP): APIC ID:  1
Sep 21 18:32:20 kernel: cpu2 (AP): APIC ID:  2
Sep 21 18:32:20 kernel: cpu3 (AP): APIC ID:  3
Sep 21 18:32:20 kernel: ar0: 476950MB <nVidia MediaShield RAID0+1 (stripe 64 KB)> status: READY
Sep 21 18:32:20 kernel: ar0: disk0 READY (master) using ad4 at ata2-master
Sep 21 18:32:20 kernel: ar0: disk1 READY (master) using ad6 at ata3-master
Sep 21 18:32:20 kernel: ar0: disk2 READY (mirror) using ad8 at ata4-master
Sep 21 18:32:20 kernel: ar0: disk3 READY (mirror) using ad10 at ata5-master

ところが、CSVUPなどでOSを現時点で最新のFreeBSD 6.2-p7 にUPすると、シングルCPUとしてしか認識しないので、SMPを有効にするために、カーネルの再構築をする。

# cd /usr/src/sys/amd64/conf
# cp GENERIC GENERIC.org
# vi GENERIC
  で
ident		GENERICSMP
options 	SMP
を書き加えた後
# config GENERIC
# cd ../compile/GENERIC
# make cleandepend;make depend
# make
# make install ←とすると、まず、build kernel しなさいとエラー

http://www.freebsd.org/doc/ja/books/handbook/kernelconfig-building.html

で、↑を参考に

# cd /usr/src
# make buildkernel KERNCONF=GENERIC
# make installkernel KERNCONF=GENERIC

してrebootし、/var/run/dmesg.boot

FreeBSD 6.2-RELEASE-p7 #1: Sat Sep 22 07:08:08 JST 2007
CPU: AMD Athlon(tm) 64 FX-74 Processor (3000.14-MHz K8-class CPU)
 Origin = "AuthenticAMD"  Id = 0xc0f13  Stepping = 3
 Cores per package: 2
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1
cpu2 (AP): APIC ID:  2
cpu3 (AP): APIC ID:  3

と言うことで、CPU4基認識。

topで見ると、

last pid:  6526;  load averages:  0.00,  0.00,  0.00
up 1+16:46:53  04:43:07
26 processes:  1 running, 25 sleeping
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 12M Active, 178M Inact, 103M Wired, 16K Cache, 214M Buf, 3532M Free
Swap: 4066M Total, 4066M Free

 PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
 739 root        1  96    0  9460K  3672K select 0   0:01  0.00% sendmail
 750 root        1   8    0  3656K  1300K nanslp 3   0:00  0.00% cron
 617 root        1  96    0  3636K  1208K select 1   0:00  0.00% syslogd
3644 root        1  96    0 30680K  4180K select 3   0:00  0.00% sshd
 677 root        1  96    0  2516K  1012K select 0   0:00  0.00% usbd
 743 smmsp       1  20    0  9328K  3408K pause  2   0:00  0.00% sendmail
6526 root        1  96    0  6844K  2036K CPU0   0   0:00  0.00% top

の様に「STATE C TIME」と「C」のカラムが出現し、CPUのどのコアで処理中かがでてきます。


さて、数日連続運転の後、高負荷をかけてテストした後、サーバユースのためのアプリケーションを投入してゆきます。

postfix MTAをデフォルトの逐次配送型Sendmailから同時複数配送型Postfixへ変更します。

pflogsum Postfix配送ログ解析プログラムを入れておく

Apache MailmanのGUIな操作や掲示板、WebMailなどのために使用します。

Mailman Mailing List Program GUIな操作も可能。添付書類やマルチパートをプレーンテキスト部分のみ配送する機能を有する。

jman やっぱ母国語がわかりやすい

サーバー用ウイルス・スパムスキャナ を導入する


Tips

以前のkernelで起動したい場合
起動画面にて6(Escape to loader prompt) を選択し、

OK unloadと入力。その後

OK boot kernel.old

http://www.osstech.co.jp/dell/faq-freebsd1

http://www.google.co.jp/search?hl=ja&q=amd64+SMP+FreeBSD+6.2&lr=lang_ja

FreeBSDで、CPU関連の情報を見るコマンド

# sysctl -d hw.model
hw.model: Machine model
# sysctl hw.model
hw.model: AMD Athlon(tm) 64 FX-74 Processor
# sysctl -d hw.clockrate
hw.clockrate: CPU instruction clock rate
# sysctl hw.clockrate
hw.clockrate: 3000
# sysctl hw.tsc_freq
sysctl: unknown oid 'hw.tsc_freq'
# grep ^CPU /var/run/dmesg.boot
CPU: AMD Athlon(tm) 64 FX-74 Processor (3000.14-MHz K8-class CPU)
# sysctl kern.smp.cpus
kern.smp.cpus: 4
# sysctl -d kern.smp.cpus
kern.smp.cpus: Number of CPUs online

トップ   編集 凍結解除 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2007-10-01 (月) 09:15:58