Weihnachtszeit, Zeit mit Infiniband zu spielen. Diesmal hab ich neue Infiniband Karten besorgt.

HP Mellanox ConnectX-2

Das sind HP Mellanox ConnectX-2 mit nur einem 10Gbit SFP+ Port, die tatsächlich ein bisschen unterstützt werden. Die kosten derzeit 25€. Zum Verbinden konnte ich ein 5m SFP+ Kupfer Kabel für 7€ bei ebay ersteigern.

Als Betriebssystem kommt diesmal FreeBSD 11 zum Einsatz. Leider funktioniert das Ganze noch nicht out of the Box aber ich hatte es nach 2 Stunden inkl. Einbau der Karten und Installieren des OS am laufen.

Also hier die Anleitung:

Wir installieren FreeBSD 11.0 mit den Sourcen.

Ich hatte es ohne die Sourcen installiert, aber die kann man schnell mit folgenden Befehlen nach installieren.

fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/11.0-RELEASE/src.txz
tar -C / -xzvf src.txz

Dann gibt es im FreeBSD Wiki ein nützliches Script, das die notwendigen Kernelmodule baut, aber leider den Ethernet Treiber vergisst. Also habe ich es um mlxen erweitert:

#!/bin/sh -e

cd /usr/src/sys/modules
for module in mlx4 ibcore mlx4ib ipoib mlxen; do
    cd $module
    make
    make install
    sync
    kldload $module || true
    printf "${module}_load=\"YES\"\n" >> /boot/loader.conf
    cd ..
done
kldstat

Das führt man dann einmal aus und wartet bis alles fertig ist. Am Ende gibt es eine Liste der geladenen Module aus.

Danach sollte man auch schon das Interface sehen:

root@server:~ # ifconfig
[...]
mlxen0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=6d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	ether 00:02:c9:58:44:7c
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (autoselect <full-duplex,rxpause,txpause>)
	status: active

Jetzt nur noch schnell IP Adressen vergeben und fertig ist die Laube.

root@server:~ # ifconfig mlxen0 inet 10.0.0.2 netmask 255.255.255.0
root@server:~ # ifconfig mlxen0
mlxen0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=6d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
	ether 00:02:c9:58:44:7c
	inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: Ethernet autoselect (10Gbase-SR <full-duplex,rxpause,txpause>)
	status: active
root@server:~ # ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.119 ms
^C
--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.119/0.119/0.119/0.000 ms

Yay!

Dann mal iperf testen... :)

root@server:~ # pkg install iperf
[...]
root@server:~ # iperf -c 10.0.0.1
------------------------------------------------------------
Client connecting to 10.0.0.1, TCP port 5001
TCP window size: 32.8 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.2 port 33516 connected with 10.0.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  9.57 GBytes  8.21 Gbits/sec

Das sieht doch schonmal gut aus!

Der UDP Test gibt eine Bandbreite von gerade mal einem Mbit/s aus, da scheint etwas nicht zu stimmen. Mit 4 parallelen Clients konnte ich 8.66 Gbit/s erreichen. Ich nehme mal an, dass hier der HP MicroServer der limitierende Faktor ist. Evtl. kann man da aber noch etwas optimieren. Nach Weihnachten gibts evtl. einen Teil 2.