Network Trunkingは複数のEthernet NIC(特に100BaseT Ethernet)を束ねて通信バンド幅性能を向上させる技術です。 Network Trunkingを用いた通信を実現するためには、1台のPCに複数のEthernet NICと 複数のEthernet NICを接続するEthernetスイッチ、それぞれのEthernet NIC用の PM/Ethernetの設定ファイルを準備する必要があります。
PM/Ethernetは複数のEthernet NICをpm-ethernet.confとetherpmctlで指定されるunit番号 により管理しています。そして、ノード上の同じunit番号を持つNICだけがお互 いに通信を行なうことができます。更に、PM/Ethernetでは直接EthernetのMACアドレス が使われますので、同じUNIT番号を持つEthernet NICは同じEtherneネットワークに 接続されなければ行けません。しかしながら、"Beowulf Channel Bonding"機構のようにすべてのEthernet NICを同じEthernetネットワークに接続する 必要はありません。つまり、異なるUNIT番号をもつEthernetネットワークは、 例えば、Ethernetスイッチを独立に設けてEthernetネットワークを分けても構いません。
ネットワークインターフェイスカード(NIC):
もし、システムが1台のPCに2枚のNICを搭載する場合は、例えばtulipと eepro100といったNICの組合せは可能である。しかし、2枚を越えるNICを搭載す る場合は同じNICハードウェアを推奨します。下に示すリストはNetwork Trunkingで 動作確認したNICのリストです。
| NICの数 | 動作確認済みNIC |
| 2 NICs | DEC Tulip, Intel EEPRO100, 3Com 3C905B, VIA VT86C100 Rhine NICs |
| 3 NICs | DEC Tulip, Intel EEPRO100, 3Com 3C905B |
| 4 NICs | DEC Tulip, Intel EEPRO100 |
Ethernetスイッチ:
もし、8ノードのクラスタで3枚のNICを使いたい場合は、3台の8ポートスイッチ (あるいは、1台の16ポートスイッチと1台の8ポートスイッチ)が必要です。そ れぞれのEthernetスイッチ間は接続する必要はありません。もし、クラスタ以外 に他のネットワークに接続する場合は8ポートより多いポート数が必要です。
もし、Network Trunkingを用いて新しいクラスタを構築する場合は同じマザーボー ドを推奨します。なぜなら、eth0, eth1といったEthernetのデバイス番号の割り 当て同じ位置のスロットに搭載してもマザーボードにより異なるからです。もし、 異なるマザーボードを利用する場合はEthernetのデバイス番号の割り当てに注意 して下さい。
Network Trunkingに必要なファイルはそれぞれのEthernet ネットワーク毎の pm-ethernet.conf です。 このドキュメントでは4枚のEthernet NICを搭載した4ノードクラスタ上での設定 手順を示します。
Compute hosts
comp0.pccluster.orgcomp1.pccluster.orgcomp2.pccluster.orgcomp3.pccluster.org
|
# Configuration file for PM/UDP(Agent)0 comp0.pccluster.org1 comp1.pccluster.org2 comp2.pccluster.org3 comp3.pccluster.org
|
pm-ethernet.conf設定ファイルの作成
|
# mkpmethernetconf -unit 0 -speed 100 -device eth0 pm-udp.conf pm-ethernet-0.conf # cat pm-ethernet-0.conf unit 0maxnsend 80 00:90:CC:0F:B9:A0 comp0.pccluster.org1 00:90:CC:0F:B9:A3 comp1.pccluster.org2 00:20:18:58:AC:DA comp2.pccluster.org3 00:20:18:58:BC:00 comp3.pccluster.org
|
|
# mkpmethernetconf -unit 1 -speed 100 -device eth1 pm-udp.conf pm-ethernet-1.conf # cat pm-ethernet-1.conf unit 1maxnsend 80 00:90:CC:0F:B8:03 comp0.pccluster.org1 00:90:CC:0F:B9:A9 comp1.pccluster.org2 00:20:18:58:AC:EE comp2.pccluster.org3 00:20:18:58:AE:61 comp3.pccluster.org
|
|
# mkpmethernetconf -unit 2 -speed 100 -device eth2 pm-udp.conf pm-ethernet-2.conf # cat pm-ethernet-2.conf unit 2maxnsend 80 00:90:CC:0F:B8:25 comp0.pccluster.org1 00:90:CC:0F:B9:C1 comp1.pccluster.org2 00:20:18:58:AC:3E comp2.pccluster.org3 00:20:18:58:AC:8B comp3.pccluster.org
|
|
# mkpmethernetconf -unit 3 -speed 100 -device eth3 pm-udp.conf pm-ethernet-3.conf # cat pm-ethernet-3.conf unit 3maxnsend 80 00:90:CC:0F:B8:06 comp0.pccluster.org1 00:90:CC:0F:B9:AD comp1.pccluster.org2 00:20:18:58:AC:3C comp2.pccluster.org3 00:20:18:58:AC:EC comp3.pccluster.org
|
|
# cp pm-ethernet-[0123] /opt/score/etc |
scorehosts.dbファイルの変更
ethernet-0 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-0.conf ethernet-1 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-1.conf ethernet-2 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-2.conf ethernet-3 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-3.conf ethernet-x2 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-1.conf \ -trunk0:file=/opt/score/etc/pm-ethernet-2.conf ethernet-x3 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-2.conf \ -trunk0:file=/opt/score/etc/pm-ethernet-1.conf \ -trunk1:file=/opt/score/etc/pm-ethernet-0.conf ethernet-x4 type=ethernet \ -config:file=/opt/score/etc/pm-ethernet-3.conf \ -trunk0:file=/opt/score/etc/pm-ethernet-0.conf \ -trunk1:file=/opt/score/etc/pm-ethernet-1.conf \ -trunk2:file=/opt/score/etc/pm-ethernet-2.conf |
# cat /opt/score/etc/scorehosts.db
/* PM/Ethernet */
ethernet type=ethernet \
-config:file=/opt/score/etc/pm-ethernet.conf
ethernet-0 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-0.conf
ethernet-1 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-1.conf
ethernet-2 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-2.conf
ethernet-3 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-3.conf
ethernet-x2 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-1.conf \
-trunk0:file=/opt/score/etc/pm-ethernet-2.conf
ethernet-x3 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-2.conf \
-trunk0:file=/opt/score/etc/pm-ethernet-1.conf \
-trunk1:file=/opt/score/etc/pm-ethernet-0.conf
ethernet-x4 type=ethernet \
-config:file=/opt/score/etc/pm-ethernet-3.conf \
-trunk0:file=/opt/score/etc/pm-ethernet-0.conf \
-trunk1:file=/opt/score/etc/pm-ethernet-1.conf \
-trunk2:file=/opt/score/etc/pm-ethernet-2.conf
#include "/opt/score/etc/ndconf/0"
#include "/opt/score/etc/ndconf/1"
#include "/opt/score/etc/ndconf/2"
#include "/opt/score/etc/ndconf/3"
#define MSGBSERV msgbserv=(server.pccluster.org:8764)
comp0.pccluster.org NODE_0 \
network=ethernet,ethernet-0,ethernet-1,ethernet-2,ethernet-3,ethernet-x2,ethernet-x3,ethernet-x4 group=_scoreall_,pccall smp=1 MSGBSERV
comp1.pccluster.org NODE_1 \
network=ethernet,ethernet-0,ethernet-1,ethernet-2,ethernet-3,ethernet-x2,ethernet-x3,ethernet-x4 group=_scoreall_,pccall smp=1 MSGBSERV
comp2.pccluster.org NODE_2 \
network=ethernet,ethernet-0,ethernet-1,ethernet-2,ethernet-3,ethernet-x2,ethernet-x3,ethernet-x4 group=_scoreall_,pccall smp=1 MSGBSERV
comp3.pccluster.org NODE_3 \
network=ethernet,ethernet-0,ethernet-1,ethernet-2,ethernet-3,ethernet-x2,ethernet-x3,ethernet-x4 group=_scoreall_,pccall smp=1 MSGBSERV
|
このファイル中 ethernet-0, ethernet-1, ethernet-2 および ethernet-3のネッ トワークは試験用のみでの利用で、試験の終了後、利用しないネットワークは削 除する必要があります。同じunit番号を含むネットワークが複数指定されている とSCore-Dマルチユーザ環境にて問題が発生します。 |
/etc/rc.d/init.d/pm_ethernetファイルの更新
/etc/rc.d/init.d/pm_ethernetのサンプルを以下に示します。
#
# pm_ethernet: Starts the PM Ethernet driver
#
# Version: @(#) /etc/rc.d/init.d/pm_ethernet 1.00
#
# Author: Shinji Sumimoto (Real World Computing Partnership)
# chkconfig: 345 90 18
# description: PM Ethernet driver
# probe: true
IF=eth0
UNIT=0
INTERRUPT_REAPING=on
# Source function library.
. /etc/rc.d/init.d/functions
# check module
module=`modprobe -l pm_ethernet_dev.o`
# See how we were called.
case "$1" in
start)
echo
if [ x$module != x ]; then
modprobe pm_ethernet_dev
fi
ifconfig eth1 up # this depends on your environment
ifconfig eth2 up # this depends on your environment
ifconfig eth3 up # this depends on your environment
/sbin/etherpmctl $IF -pm on -ir $INTERRUPT_REAPING -unit $UNIT
/sbin/etherpmctl eth1 -pm on -ir $INTERRUPT_REAPING -unit 1
/sbin/etherpmctl eth2 -pm on -ir $INTERRUPT_REAPING -unit 2
/sbin/etherpmctl eth3 -pm on -ir $INTERRUPT_REAPING -unit 3
touch /var/lock/subsys/pm_ethernet
;;
stop)
echo -n "Stopping PM/Ethernet: "
if [ x$module != x ]; then
rmmod pm_ethernet_dev
fi
/sbin/etherpmctl $IF -pm off
/sbin/etherpmctl eth1 -pm off
/sbin/etherpmctl eth2 -pm off
/sbin/etherpmctl eth3 -pm off
ifconfig eth1 down # this depends on your environment
ifconfig eth2 down # this depends on your environment
ifconfig eth3 down # this depends on your environment
echo
rm -f /var/lock/subsys/pm_ethernet
;;
status)
if [ x$module != x ]; then
/sbin/lsmod
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
esac
|
scoreboardとPM/Ethernetを再起動するために以下のコマンドを実行します。
|
#/etc/rc.d/init.d/scoreboard restart #/etc/rc.d/init.d/pm_ethernet restart |
PM/Ethernet試験手順にあるethernetネットワークの記述をそれぞれethernet-1、 ethernet-2、ethernet-3に変更して行ないます。
|
# /opt/score/sbin/rcstest comp0.pccluster.org ethernet-0 -v starting master 0 : pe=4 starting slave: 2 3 1. testing*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* .*.*.*.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* .*.**.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*. *.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*.*.* .*.*.*.*.*.*.*.*.*.*.*comp3( 3) Signal: Interrupted system call(4) comp0( 0) Signal: Interrupted system call(4) comp1( 1) Signal: Interrupted system call(4) comp2( 2) Signal: Interrupted system call(4) |
| # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-1 -v |
| # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-2 -v |
| # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-3 -v |
|
# /opt/score/sbin/rcstest comp0.pccluster.org ethernet-x2 -v starting master 0 : pe=4 starting slave: 2 3 1. testing*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* .*.*.*.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* .*.**.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*. *.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.* *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.**.*.*.*.*.*.*.*.*.*.*.*.*.* .*.*.*.*.*.*.*.*.*.*.*comp3( 3) Signal: Interrupted system call(4) comp0( 0) Signal: Interrupted system call(4) comp1( 1) Signal: Interrupted system call(4) comp2( 2) Signal: Interrupted system call(4) |
| # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-x3 -v |
| # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-x4 -v |
![]() |
PCクラスタコンソーシアム |