ablog

不器用で落着きのない技術者のメモ

Amazon Linux で iperf を使ってみる

EC2インスタンスを2つ作成して両方に iperf をインストールし、片方でiperf をサーバとして起動し、もう片方から iperf をクライアントとして実行してベンチマークを取る。

インストール

$ sudo yum -y install git gcc
$ git clone https://github.com/esnet/iperf
$ cd iperf
$ ./configure
$ sudo make
$ sudo make install
$ sudo ldconfig

計測

サーバ側
$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
クライアント側
$ iperf3 -c 172.31.30.119 -P 10
Connecting to host 172.31.30.119, port 5201
[  5] local 172.31.31.185 port 23094 connected to 172.31.30.119 port 5201
[  7] local 172.31.31.185 port 23096 connected to 172.31.30.119 port 5201
[  9] local 172.31.31.185 port 23098 connected to 172.31.30.119 port 5201
[ 11] local 172.31.31.185 port 23100 connected to 172.31.30.119 port 5201
[ 13] local 172.31.31.185 port 23102 connected to 172.31.30.119 port 5201
[ 15] local 172.31.31.185 port 23104 connected to 172.31.30.119 port 5201
[ 17] local 172.31.31.185 port 23106 connected to 172.31.30.119 port 5201
[ 19] local 172.31.31.185 port 23108 connected to 172.31.30.119 port 5201
[ 21] local 172.31.31.185 port 23110 connected to 172.31.30.119 port 5201
[ 23] local 172.31.31.185 port 23112 connected to 172.31.30.119 port 5201

(中略)

[SUM]   0.00-10.00  sec  24.5 GBytes  21.0 Gbits/sec   28             sender
[SUM]   0.00-10.03  sec  24.4 GBytes  20.9 Gbits/sec                  receiver

iperf Done.