iperf 라는 심플한 툴을 이용하여 노드간의 네트워크 성능을 측정할 수 있습니다.
1. 양 서버에 iperf 설치
아래 내용에 따라 A,B 두 서버에 iperf를 설치합니다. 서버로 사용할 A서버와 클라이언트로 사용할 B서버 모두 동일한 패키지를 설치합니다.
2. 파일 다운로드
http://sourceforge.net/projects/iperf/files/
3. iperf 컴파일 하기
#tar xzvf iperf-VERSION.tar.gz
#cd iperf-VERSION
#./configure --prefix=/usr/local/iperf
#make && make install
4. 설치시 필요한 패키지
gcc
gcc-c++
5. SERVER 에서 SERVER 모드로 iperf 시작
[root@20-VM bin]# ./iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 10.10.10.20 port 5001 connected with 10.10.10.10 port 46414
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 2.06 GBytes 1.77 Gbits/sec
6. CLIENT 에서 CLIENT 모드로 SERVER 접속 및 측정
[root@10-VM bin]# ./iperf -c 10.10.10.20
------------------------------------------------------------
Client connecting to 10.10.10.20, TCP port 5001
TCP window size: 19.3 KByte (default)
------------------------------------------------------------
[ 3] local 10.10.10.10 port 46414 connected with 10.10.10.20 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 2.06 GBytes 1.77 Gbits/sec
서버모드로 실행한 A서버는 계속 Client를 기다리고 있습니다. Ctrl+c로 나올 수 있습니다.
-s 서버 모드
-c <server ip or domain> 클라이언트 모드
-u UDP 사용 (기본 TCP)
-p port (기본포트는 5001)
-w TCP Window 크기(socket buffer 사이즈)(ex -w 10M, -w 10K)
-t 측정시간(초)