3流プログラマのメモ書き

元開発職→社内SE→派遣で営業支援の三流プログラマのIT技術メモ書き。 このメモが忘れっぽい自分とググってきた技術者の役に立ってくれれば幸いです。(jehupc.exblog.jpから移転中)

MS Hyper-V 2.0にLinux(CentOS)とLinux Integration Services 2.1を入れてみた

以前に、MS Hyper-V RC1にLinux(CentOS)とLinux統合コンポーネントRC0を入れてみたHyper-V 1.0 (RC1) に Linux(CentOS) と Linux統合コンポーネントRC0 をインストールする手順を書きました。

社内で新規に Windows Server 2008 R2 上の HyperV 2.0 で、CentOS を動かすことになったので、調査したら Linux統合コンポーネント(Linux Integration Services 旧:Linux Integration Component)もいつの間にやら結構バージョンアップしてたんですね。

つい最近 2.1 がリリースされたということが、下記ニュースサイトに掲載されてました。マルチプロセッサ対応や時刻同期、シャットダウン連携機能が追加されたようです。

Microsoft、「Linux Integration Services 2.1」をリリース-ITmedia エンタープライズ

ということで導入手順です。

まず、Linux Integration Services v2.1 for Windows Server 2008 Hyper-V R2 をダウンロードします。

Exeを解凍すると、ISOファイルと、英語の導入マニュアルPDFがでてきます。ISOをHyper-V光学ドライブに割り当てます。

後は、マニュアルの「Linux Integration Services v2.1 for Windows Server 2008 Hyper-V R2」に従って作業すればいいだけです。といっても英語が読むのは苦手なので一応メモメモ。

途中でコンパイル作業があるので、Linux上の「Software Development」をインストールしておく必要があるようです。

下記コマンドで、ISO内のデータをコピーします。

# mkdir /mnt/cdrom

# mount /dev/cdrom /mnt/cdrom

# cp -R /mnt/cdrom/* /opt/linux_ic_v21_rtm

ドライバをコンパイルしインストールします。インストール後は再起動します。

# cd /opt/linux_ic_v21_rtm/

# make

# make install

# reboot

64bitのRedHatの場合は、下記コマンドも必要なようです。

# rpm -ivh /mnt/cdrom/Server/adjtimex-1.20-2.1.x86_64.rpm

マニュアルにはLinuxコンポーネントのアップデート方法も載せられており参考になります。

Linux Integration Services(Linux IS)v2.1のインストール前と後でディスクアクセスとネットワークのベンチマークを行いました。

まずディスクアクセスのテストです。

Linux ISのインストール前が下記になります。

[root@localhost ~]# hdparm -ft /dev/hda

/dev/hda:

Timing buffered disk reads: 180 MB in 3.04 seconds = 59.20 MB/sec

Linux ISのインストール後が下記になります。

[root@centos01 ~]# hdparm -ft /dev/hda

/dev/hda:

Timing buffered disk reads: 506 MB in 3.00 seconds = 168.62 MB/sec

圧倒的にパフォーマンスが違いますね。おおよそ2.8倍ほど違います。

次にネットワークのテストです。iperfを使いました。

Linux ISのインストール前が下記になります。

bin/iperf.exe -c 10.0.0.1 -P 1 -i 1 -p 5001 -f k -t 10

------------------------------------------------------------

Client connecting to 10.0.0.1, TCP port 5001

TCP window size: 63.0 KByte (default)

------------------------------------------------------------

[1904] local 10.0.0.2 port 4777 connected with 10.0.0.1 port 5001

[ ID] Interval Transfer Bandwidth

[1904] 0.0- 1.0 sec 5368 KBytes 43975 Kbits/sec

[1904] 1.0- 2.0 sec 6376 KBytes 52232 Kbits/sec

[1904] 2.0- 3.0 sec 6568 KBytes 53805 Kbits/sec

[1904] 3.0- 4.0 sec 6520 KBytes 53412 Kbits/sec

[1904] 4.0- 5.0 sec 6504 KBytes 53281 Kbits/sec

[1904] 5.0- 6.0 sec 6200 KBytes 50790 Kbits/sec

[1904] 6.0- 7.0 sec 6312 KBytes 51708 Kbits/sec

[1904] 7.0- 8.0 sec 6536 KBytes 53543 Kbits/sec

[1904] 8.0- 9.0 sec 6496 KBytes 53215 Kbits/sec

[1904] 9.0-10.0 sec 6432 KBytes 52691 Kbits/sec

[1904] 0.0-10.0 sec 63320 KBytes 51870 Kbits/sec

Done.

おおよそ50Mbps程度ですね。

Linux ISのインストール後が下記になります。

bin/iperf.exe -c 10.0.0.1 -P 1 -i 1 -p 5001 -f k -t 10

------------------------------------------------------------

Client connecting to 10.0.0.1, TCP port 5001

TCP window size: 63.0 KByte (default)

------------------------------------------------------------

[1904] local 10.0.0.2 port 2087 connected with 10.0.0.1 port 5001

[ ID] Interval Transfer Bandwidth

[1904] 0.0- 1.0 sec 11384 KBytes 93258 Kbits/sec

[1904] 1.0- 2.0 sec 11536 KBytes 94503 Kbits/sec

[1904] 2.0- 3.0 sec 11512 KBytes 94306 Kbits/sec

[1904] 3.0- 4.0 sec 11528 KBytes 94437 Kbits/sec

[1904] 4.0- 5.0 sec 11512 KBytes 94306 Kbits/sec

[1904] 5.0- 6.0 sec 11416 KBytes 93520 Kbits/sec

[1904] 6.0- 7.0 sec 10720 KBytes 87818 Kbits/sec

[1904] 7.0- 8.0 sec 11568 KBytes 94765 Kbits/sec

[1904] 8.0- 9.0 sec 11472 KBytes 93979 Kbits/sec

[1904] 9.0-10.0 sec 11336 KBytes 92865 Kbits/sec

[1904] 0.0-10.0 sec 113992 KBytes 93234 Kbits/sec

Done.

100MbpsのLANなんですが、やはり限界近くまで高速になってます。