Network Trunking機構(PM/Ethernet)のシステム管理者ガイド


Index

  1. はじめに
  2. ハードウェア環境の構築
    1. 必要なハードウェアの仕様
    2. ハードウェアの設定
  3. インストール手順
    1. pm-ethernet.conf ファイルの作成
    2. scorehosts.db ファイルの更新
    3. /etc/rc.d/init.d/pm_ethernetファイルの更新
    4. PM/Ethernetとscoreboradの再起動
  4. 単一ネットワークでの試験手順
  5. 複数ネットワークでの試験手順
    1. rpmtestを用いた試験
    2. rcstestを用いた試験
  6. 性能のチューニング

1. はじめに

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.confetherpmctlで指定されるunit番号 により管理しています。そして、ノード上の同じunit番号を持つNICだけがお互 いに通信を行なうことができます。更に、PM/Ethernetでは直接EthernetのMACアドレス が使われますので、同じUNIT番号を持つEthernet NICは同じEtherneネットワークに 接続されなければ行けません。しかしながら、"Beowulf Channel Bonding"機構のようにすべてのEthernet NICを同じEthernetネットワークに接続する 必要はありません。つまり、異なるUNIT番号をもつEthernetネットワークは、 例えば、Ethernetスイッチを独立に設けてEthernetネットワークを分けても構いません。

2. ハードウェア環境の構築

  1. 要求されるハードウェア仕様

    ネットワークインターフェイスカード(NIC):

    もし、システムが1台のPCに2枚のNICを搭載する場合は、例えばtulipと eepro100といったNICの組合せは可能である。しかし、2枚を越えるNICを搭載す る場合は同じNICハードウェアを推奨します。下に示すリストはNetwork Trunkingで 動作確認したNICのリストです。

    NICの数動作確認済みNIC
    2 NICsDEC Tulip, Intel EEPRO100, 3Com 3C905B, VIA VT86C100 Rhine NICs
    3 NICsDEC Tulip, Intel EEPRO100, 3Com 3C905B
    4 NICsDEC Tulip, Intel EEPRO100
    Comments: VIAのチップセットを用いたNICは2枚以上ではハードウェアエラーのため 動作しませんでした。3Com 3C905B NICは4枚でも動作しましたが性能は3枚の時より 悪くなりました。

    Ethernetスイッチ:

    もし、8ノードのクラスタで3枚のNICを使いたい場合は、3台の8ポートスイッチ (あるいは、1台の16ポートスイッチと1台の8ポートスイッチ)が必要です。そ れぞれのEthernetスイッチ間は接続する必要はありません。もし、クラスタ以外 に他のネットワークに接続する場合は8ポートより多いポート数が必要です。

  2. ハードウェアの設定

    もし、Network Trunkingを用いて新しいクラスタを構築する場合は同じマザーボー ドを推奨します。なぜなら、eth0, eth1といったEthernetのデバイス番号の割り 当て同じ位置のスロットに搭載してもマザーボードにより異なるからです。もし、 異なるマザーボードを利用する場合はEthernetのデバイス番号の割り当てに注意 して下さい。

3. インストール手順

Network Trunkingに必要なファイルはそれぞれのEthernet ネットワーク毎の pm-ethernet.conf です。 このドキュメントでは4枚のEthernet NICを搭載した4ノードクラスタ上での設定 手順を示します。

  1. 以下は、本クラスタでのノードリストです。

    Compute hosts
    comp0.pccluster.org
    comp1.pccluster.org
    comp2.pccluster.org
    comp3.pccluster.org

  2. PM/UDP(Agent)用の設定ファイルを作成します。

    # Configuration file for PM/UDP(Agent)
    0 comp0.pccluster.org
    1 comp1.pccluster.org
    2 comp2.pccluster.org
    3 comp3.pccluster.org

  3. pm-ethernet.conf設定ファイルの作成
    1. eth0用のPM/Ethernet設定ファイル(pm-ethernet-0.conf)を次のコマンドを 使って生成します。もし、あなたが、EITを用いてSCoreをインストールした場合 はこのファイルは/opt/score/etc/pm-ethernet.confと同じになります。
      # mkpmethernetconf -unit 0 -speed 100 -device eth0 pm-udp.conf pm-ethernet-0.conf
      # cat pm-ethernet-0.conf
      unit 0
      maxnsend 8
      0 00:90:CC:0F:B9:A0 comp0.pccluster.org
      1 00:90:CC:0F:B9:A3 comp1.pccluster.org
      2 00:20:18:58:AC:DA comp2.pccluster.org
      3 00:20:18:58:BC:00 comp3.pccluster.org

    2. eth1用のPM/Ethernet設定ファイル(pm-ethernet-1.conf)を次のコマンドを 使って生成します。
      # mkpmethernetconf -unit 1 -speed 100 -device eth1 pm-udp.conf pm-ethernet-1.conf
      # cat pm-ethernet-1.conf
      unit 1
      maxnsend 8
      0 00:90:CC:0F:B8:03 comp0.pccluster.org
      1 00:90:CC:0F:B9:A9 comp1.pccluster.org
      2 00:20:18:58:AC:EE comp2.pccluster.org
      3 00:20:18:58:AE:61 comp3.pccluster.org

    3. eth2用のPM/Ethernet設定ファイル(pm-ethernet-2.conf)を次のコマンドを 使って生成します。
      # mkpmethernetconf -unit 2 -speed 100 -device eth2 pm-udp.conf pm-ethernet-2.conf
      # cat pm-ethernet-2.conf
      unit 2
      maxnsend 8
      0 00:90:CC:0F:B8:25 comp0.pccluster.org
      1 00:90:CC:0F:B9:C1 comp1.pccluster.org
      2 00:20:18:58:AC:3E comp2.pccluster.org
      3 00:20:18:58:AC:8B comp3.pccluster.org

    4. eth3用のPM/Ethernet設定ファイル(pm-ethernet-3.conf)を次のコマンドを 使って生成します。
      # mkpmethernetconf -unit 3 -speed 100 -device eth3 pm-udp.conf pm-ethernet-3.conf
      # cat pm-ethernet-3.conf
      unit 3
      maxnsend 8
      0 00:90:CC:0F:B8:06 comp0.pccluster.org
      1 00:90:CC:0F:B9:AD comp1.pccluster.org
      2 00:20:18:58:AC:3C comp2.pccluster.org
      3 00:20:18:58:AC:EC comp3.pccluster.org

  4. 設定ファイル (pm-ethernet-[0123].conf) を/opt/score/etcにコピーします

    # cp pm-ethernet-[0123] /opt/score/etc

  5. scorehosts.dbファイルの変更
    次のエントリを/opt/score/etc/scorehosts.dbに追加し、同じく scorehosts.dbの各ノードのnetworkエントリに (ethernet-0,ethernet-1,ethernet-2,ethernet-3,ethernet-x2,ethernet-x3,ethernet-x4)を追加します。

    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マルチユーザ環境にて問題が発生します。
    

  6. /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
    

  7. PM/Ethernetとscoreboradの再起動

    scoreboardとPM/Ethernetを再起動するために以下のコマンドを実行します。
    #/etc/rc.d/init.d/scoreboard restart
    #/etc/rc.d/init.d/pm_ethernet restart

4. 単体ネットワークの試験手順

  1. rpmtestを用いたeth1, eth2, eth3の単体ネットワークを試験手順

    PM/Ethernet試験手順にあるethernetネットワークの記述をそれぞれethernet-1、 ethernet-2、ethernet-3に変更して行ないます。

  2. rcstestを用いたeth0ネットワーク試験
    eth0ネットワークをrcstestを用いて試験します。

    # /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)

    試験を終了する時にはk Ctrl-Cを利用します。

  3. rcstestを用いたeth1ネットワーク試験

    # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-1 -v

  4. rcstestを用いたeth2ネットワーク試験

    # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-2 -v

  5. rcstestを用いたeth3ネットワーク試験

    # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-3 -v

5. Test Procedure of Multiple Network

  1. rcstestを用いた2つのネットワークを用いた試験

    # /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)

    試験を終了する時にはk Ctrl-Cを利用します。

  2. rcstestを用いた3つのネットワークを用いた試験

    # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-x3 -v

  3. rcstestを用いた4つのネットワークを用いた試験

    # /opt/score/sbin/rcstest comp0.pccluster.org ethernet-x4 -v

6. 性能チューニング

  1. pm-ethernet.confに ある、maxnsendとbackoffオプションを変更することによりNetwork Trunkingの 性能のチューニングが可能です。

PCCC logo PCクラスタコンソーシアム

CREDIT
This document is a part of the SCore cluster system software developed at PC Cluster Consortium, Japan. Copyright (C) 2003 PC Cluster Consortium.