와이파이 다이렉트 네트워크 성능 측정

2017년 10월 3일 코코넛냠냠


결과

  1. 장소나 때에 따라 전송속도의 차이가 큽니다.
  2. 휴대전화에서 PC로 패킷을 전송하는 경우보다 PC에서 휴대전화로 패킷을 전송할 때 시간당 전송량이 더 많습니다.
  3. TCP로 전송할 때 UDP보다 시간당 더 많은 패킷을 전송합니다.
  4. TCP 윈도우 크기나 UDP 버퍼 크기는 전송속도에 큰 영향을 주지는 않습니다.
  5. (휴대전화 -> PC) 장소가 나쁜 경우에 대략 평균 초당 100KB의 패킷을 전송합니다. 측정 대역폭은 1Mbps 내외입니다.
  6. (휴대전화 -> PC) 장소가 좋다면 3Mbps 이상의 대역폭으로 평균 초당 3MB의 패킷을 전송합니다.
  7. (PC -> 휴대전화) 장소가 좋은 경우에 5Mbps 이상의 대역폭으로 초당 500KB~1MB의 패킷을 전송합니다.
  8. (휴대전화 -> PC) UDP로 전송할 때 약 20% 내외의 패킷 손실이 있습니다.
  9. (PC -> 휴대전화) UDP 패킷을 전송할 때 약 7%의 패킷 손실이 있습니다.


실험 환경

  1. 와이파이 다이렉트 장비 간 네트워크 성능 확인을 위해서 iperf라는 툴을 사용했습니다. iperf는 IP 네트워크 상에서 TCP/UDP 서버와 클라이언트 사이의 최대 전송 속도를 측정하는 프로그램(어플리케이션)입니다.
  2. 와이파이 다이렉트로 리눅스 PC와 안드로이드 단말기가 서로 연결하면 각각 IP주소가 할당됩니다.

    장치

    IP주소

    주소 할당 방식

    역할

    리눅스 PC

    192.168.1.2

    정적 할당 (static)

    DHCP 서버 / GO

    안드로이드 휴대폰

    192.168.1.123

    동적 할당 (DHCP)

    클라이언트

    PC는 서버 역할을 합니다. 서버의 IP주소는 192.168.1.2인데 편의상 임의로 그렇게 정한 것입니다. 휴대폰은 PC에 클라이언트로 접속하여 주소를 동적으로 할당 받습니다. (DHCP 서버의 설정에 의해서 항상 192.168.1.123을 할당 받습니다.)
  3. 사용한 장비 등 물리적 환경
    - PC: 가상머신(VMware Workstation 12), Linux(ubuntu 16.04 LTS 64-bit)
    - 무선랜: TP-LINK TL-WN722N (V1.0)
    - 모바일 단말기: LG K10
    - 통신장치 사이 거리: 1미터 이내
  4. 두 장소에서 테스트했습니다. 또한 PC에서 안드로이드 쪽으로 패킷을 전송하는 경우와 안드로이드에서 PC로 패킷을 보내는 경우로 나누어서 시험했습니다. 소켓의 버퍼 크기를 바꾸어 시험했습니다.


수행로그


전송속도가 좋지 않음 (안드로이드->리눅스)


nanite@ubuntu:~$ iperf -s -i 10 -w 200k

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

Server listening on TCP port 5001

TCP window size:  400 KByte (WARNING: requested  200 KByte)

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

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56325

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  1.21 MBytes  1.02 Mbits/sec

[  4] 10.0-20.0 sec  1017 KBytes   833 Kbits/sec

[  4] 20.0-30.0 sec  1.15 MBytes   965 Kbits/sec

[  4] 30.0-40.0 sec  1.08 MBytes   904 Kbits/sec

[  4] 40.0-50.0 sec  1.15 MBytes   966 Kbits/sec

[  4] 50.0-60.0 sec  1004 KBytes   822 Kbits/sec

[  4]  0.0-62.9 sec  6.88 MBytes   917 Kbits/sec


nanite@ubuntu:~$ iperf -s -i 10 -w 10k

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

Server listening on TCP port 5001

TCP window size: 20.0 KByte (WARNING: requested 10.0 KByte)

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

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56326

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  1.29 MBytes  1.09 Mbits/sec

[  4] 10.0-20.0 sec   990 KBytes   811 Kbits/sec

[  4] 20.0-30.0 sec  1.09 MBytes   916 Kbits/sec

[  4] 30.0-40.0 sec  1.14 MBytes   955 Kbits/sec

[  4] 40.0-50.0 sec   926 KBytes   759 Kbits/sec

[  4] 50.0-60.0 sec  1.05 MBytes   878 Kbits/sec

[  4]  0.0-62.4 sec  6.75 MBytes   908 Kbits/sec


nanite@ubuntu:~$ iperf -s -i 10

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

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

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

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56327

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  1.28 MBytes  1.07 Mbits/sec

[  4] 10.0-20.0 sec  1.06 MBytes   885 Kbits/sec

[  4] 20.0-30.0 sec  1.18 MBytes   987 Kbits/sec

[  4] 30.0-40.0 sec  1.01 MBytes   846 Kbits/sec

[  4] 40.0-50.0 sec  1.24 MBytes  1.04 Mbits/sec

[  4] 50.0-60.0 sec  1.18 MBytes   988 Kbits/sec

[  4]  0.0-62.5 sec  7.25 MBytes   974 Kbits/sec


nanite@ubuntu:~$ iperf -s -u -i 10

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

Server listening on UDP port 5001

Receiving 1470 byte datagrams

UDP buffer size:  208 KByte (default)

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

[  3] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 52904

[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams

[  3]  0.0-10.0 sec   893 KBytes   731 Kbits/sec   8.005 ms  156/  778 (20%)

[  3] 10.0-20.0 sec  1.03 MBytes   863 Kbits/sec   7.607 ms  102/  836 (12%)

[  3] 20.0-30.0 sec   917 KBytes   751 Kbits/sec  10.883 ms   76/  715 (11%)

[  3] 30.0-40.0 sec  1.11 MBytes   933 Kbits/sec  11.158 ms  120/  913 (13%)

[  3] 40.0-50.0 sec  1018 KBytes   834 Kbits/sec  11.821 ms  192/  901 (21%)

[  3] 50.0-60.0 sec  1022 KBytes   837 Kbits/sec  11.397 ms  196/  908 (22%)

[  3]  0.0-60.8 sec  5.90 MBytes   814 Kbits/sec  51.299 ms  854/ 5064 (17%)

read failed: Connection refused

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 45457

[  4]  0.0-10.0 sec  1.36 MBytes  1.14 Mbits/sec  17.475 ms  101/ 1073 (9.4%)

[  4] 10.0-20.0 sec   902 KBytes   739 Kbits/sec   8.557 ms   96/  724 (13%)

[  4] 20.0-30.0 sec  1.08 MBytes   902 Kbits/sec  11.205 ms  167/  934 (18%)

[  4] 30.0-40.0 sec  1019 KBytes   835 Kbits/sec  14.589 ms  201/  911 (22%)

[  4] 40.0-50.0 sec   991 KBytes   811 Kbits/sec   3.486 ms  205/  895 (23%)

[  4]  0.0-57.0 sec  5.88 MBytes   866 Kbits/sec  49.565 ms  924/ 5121 (18%)

[  3] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 47568

[  3]  0.0-10.0 sec  1.28 MBytes  1.07 Mbits/sec  12.306 ms  183/ 1093 (17%)

[  3] 10.0-20.0 sec   940 KBytes   770 Kbits/sec   8.913 ms  113/  768 (15%)

[  3] 20.0-30.0 sec   794 KBytes   650 Kbits/sec  19.639 ms   88/  641 (14%)

[  3] 30.0-40.0 sec   854 KBytes   700 Kbits/sec  17.498 ms  355/  950 (37%)

[  3] 40.0-50.0 sec  1.06 MBytes   893 Kbits/sec   6.231 ms  189/  948 (20%)

[  3]  0.0-57.0 sec  5.54 MBytes   815 Kbits/sec  14.164 ms 1082/ 5034 (21%)

read failed: Connection refused


nanite@ubuntu:~$ iperf -s -i 1

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

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

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

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56307

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0- 1.0 sec   318 KBytes  2.61 Mbits/sec

[  4]  1.0- 2.0 sec  7.07 KBytes  57.9 Kbits/sec

[  4]  2.0- 3.0 sec   233 KBytes  1.91 Mbits/sec

[  4]  3.0- 4.0 sec  8.48 KBytes  69.5 Kbits/sec

[  4]  4.0- 5.0 sec   337 KBytes  2.76 Mbits/sec

[  4]  5.0- 6.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  6.0- 7.0 sec   232 KBytes  1.90 Mbits/sec

[  4]  7.0- 8.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  8.0- 9.0 sec   342 KBytes  2.80 Mbits/sec

[  4]  9.0-10.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  0.0-10.9 sec  1.75 MBytes  1.34 Mbits/sec

[  5] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56309

[  5]  0.0- 1.0 sec  8.48 KBytes  69.5 Kbits/sec

[  5]  1.0- 2.0 sec   334 KBytes  2.73 Mbits/sec

[  5]  2.0- 3.0 sec  25.5 KBytes   209 Kbits/sec

[  5]  3.0- 4.0 sec  0.00 Bytes  0.00 bits/sec

[  5]  4.0- 5.0 sec  0.00 Bytes  0.00 bits/sec

[  5]  5.0- 6.0 sec   263 KBytes  2.15 Mbits/sec

[  5]  6.0- 7.0 sec  62.2 KBytes   510 Kbits/sec

[  5]  7.0- 8.0 sec   195 KBytes  1.60 Mbits/sec

[  5]  8.0- 9.0 sec  4.24 KBytes  34.8 Kbits/sec

[  5]  9.0-10.0 sec   215 KBytes  1.76 Mbits/sec

[  5] 10.0-11.0 sec  53.7 KBytes   440 Kbits/sec

[  5] 11.0-12.0 sec  0.00 Bytes  0.00 bits/sec

[  5] 12.0-13.0 sec  0.00 Bytes  0.00 bits/sec

[  5] 13.0-14.0 sec  26.9 KBytes   220 Kbits/sec

[  5] 14.0-15.0 sec  0.00 Bytes  0.00 bits/sec

[  5] 15.0-16.0 sec   185 KBytes  1.52 Mbits/sec

[  5]  0.0-16.1 sec  1.38 MBytes   718 Kbits/sec

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56310

[  4]  0.0- 1.0 sec   223 KBytes  1.83 Mbits/sec

[  4]  1.0- 2.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  2.0- 3.0 sec   358 KBytes  2.93 Mbits/sec

[  4]  3.0- 4.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  4.0- 5.0 sec   279 KBytes  2.28 Mbits/sec

[  4]  5.0- 6.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  6.0- 7.0 sec   296 KBytes  2.42 Mbits/sec

[  4]  7.0- 8.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  8.0- 9.0 sec   420 KBytes  3.44 Mbits/sec

[  4]  9.0-10.0 sec  0.00 Bytes  0.00 bits/sec

[  4] 10.0-11.0 sec   199 KBytes  1.63 Mbits/sec

[  4] 11.0-12.0 sec  0.00 Bytes  0.00 bits/sec

[  4]  0.0-12.6 sec  1.88 MBytes  1.25 Mbits/sec

[  5] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 56312

[  5]  0.0- 1.0 sec   274 KBytes  2.25 Mbits/sec

[  5]  1.0- 2.0 sec  63.6 KBytes   521 Kbits/sec

[  5]  2.0- 3.0 sec   184 KBytes  1.51 Mbits/sec

[  5]  3.0- 4.0 sec  74.9 KBytes   614 Kbits/sec

[  5]  4.0- 5.0 sec   293 KBytes  2.40 Mbits/sec

[  5]  5.0- 6.0 sec  0.00 Bytes  0.00 bits/sec

[  5]  6.0- 7.0 sec   165 KBytes  1.36 Mbits/sec

[  5]  7.0- 8.0 sec  0.00 Bytes  0.00 bits/sec

[  5]  8.0- 9.0 sec   208 KBytes  1.70 Mbits/sec

[  5]  9.0-10.0 sec  79.2 KBytes   649 Kbits/sec

[  5] 10.0-11.0 sec   288 KBytes  2.36 Mbits/sec

[  5] 11.0-12.0 sec  29.7 KBytes   243 Kbits/sec

[  5]  0.0-12.0 sec  1.62 MBytes  1.13 Mbits/sec



전송속도가 좋은 경우 (휴대전화 -> PC)


^Cnanite@ubuntu:~$ iperf -s -i 10

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

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

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

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 37740

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  2.77 MBytes  2.32 Mbits/sec

[  4] 10.0-20.0 sec  2.52 MBytes  2.11 Mbits/sec

[  4] 20.0-30.0 sec  1.61 MBytes  1.35 Mbits/sec

[  4] 30.0-40.0 sec  9.28 MBytes  7.79 Mbits/sec

[  4] 40.0-50.0 sec  1.69 MBytes  1.42 Mbits/sec

[  4] 50.0-60.0 sec  5.47 MBytes  4.59 Mbits/sec

[  4]  0.0-60.7 sec  23.8 MBytes  3.28 Mbits/sec

[  5] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 37741

[  5]  0.0-10.0 sec  3.13 MBytes  2.63 Mbits/sec

[  5] 10.0-20.0 sec  1.25 MBytes  1.05 Mbits/sec

[  5] 20.0-30.0 sec  2.45 MBytes  2.06 Mbits/sec

[  5] 30.0-40.0 sec  1.72 MBytes  1.44 Mbits/sec

[  5] 40.0-50.0 sec  4.48 MBytes  3.76 Mbits/sec

[  5] 50.0-60.0 sec  4.39 MBytes  3.68 Mbits/sec

[  5]  0.0-61.1 sec  17.8 MBytes  2.44 Mbits/sec

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 37742

[  4]  0.0-10.0 sec  4.81 MBytes  4.03 Mbits/sec

[  4] 10.0-20.0 sec  3.06 MBytes  2.57 Mbits/sec

[  4] 20.0-30.0 sec  1.52 MBytes  1.28 Mbits/sec

[  4] 30.0-40.0 sec  4.48 MBytes  3.75 Mbits/sec

[  4] 40.0-50.0 sec  1.17 MBytes   979 Kbits/sec

[  4] 50.0-60.0 sec  2.48 MBytes  2.08 Mbits/sec

[  4]  0.0-62.2 sec  17.9 MBytes  2.41 Mbits/sec


nanite@ubuntu:~$ iperf -s -u -i 10

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

Server listening on UDP port 5001

Receiving 1470 byte datagrams

UDP buffer size:  208 KByte (default)

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

[  3] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 57107

[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams

[  3]  0.0-10.0 sec   985 KBytes   807 Kbits/sec   1.789 ms  206/  892 (23%)

[  3] 10.0-20.0 sec   978 KBytes   801 Kbits/sec   2.864 ms  210/  891 (24%)

[  3] 20.0-30.0 sec   993 KBytes   814 Kbits/sec   4.488 ms  200/  892 (22%)

[  3] 30.0-40.0 sec   976 KBytes   800 Kbits/sec   2.180 ms  211/  891 (24%)

[  3] 40.0-50.0 sec   993 KBytes   814 Kbits/sec   1.599 ms  200/  892 (22%)

[  3] 50.0-60.0 sec   980 KBytes   803 Kbits/sec   2.895 ms  209/  892 (23%)

[  3]  0.0-60.0 sec  5.77 MBytes   806 Kbits/sec   2.720 ms 1236/ 5351 (23%)


^Cnanite@ubuntu:~$ iperf -s -i 10

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

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

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

[  4] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 37746

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  3.67 MBytes  3.08 Mbits/sec

[  4] 10.0-20.0 sec  4.49 MBytes  3.77 Mbits/sec

[  4] 20.0-30.0 sec  2.38 MBytes  2.00 Mbits/sec

[  4] 30.0-40.0 sec  3.45 MBytes  2.89 Mbits/sec

[  4] 40.0-50.0 sec  3.11 MBytes  2.61 Mbits/sec

[  4] 50.0-60.0 sec  2.10 MBytes  1.76 Mbits/sec

[  4]  0.0-64.8 sec  19.6 MBytes  2.54 Mbits/sec

[  5] local 192.168.1.2 port 5001 connected with 192.168.1.123 port 37748

[  5]  0.0-10.0 sec  2.05 MBytes  1.72 Mbits/sec

[  5] 10.0-20.0 sec  2.02 MBytes  1.70 Mbits/sec

[  5] 20.0-30.0 sec  1.96 MBytes  1.64 Mbits/sec

[  5] 30.0-40.0 sec  2.29 MBytes  1.92 Mbits/sec

[  5] 40.0-50.0 sec  2.90 MBytes  2.44 Mbits/sec

[  5] 50.0-60.0 sec  2.23 MBytes  1.87 Mbits/sec

[  5]  0.0-61.0 sec  13.8 MBytes  1.89 Mbits/sec


패킷을 PC에서 휴대전화로 전송하는 경우


nanite@ubuntu:~$ 

nanite@ubuntu:~$ iperf -c 192.168.1.123 -t 60

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

Client connecting to 192.168.1.123, TCP port 5001

TCP window size: 85.0 KByte (default)

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

[  3] local 192.168.1.2 port 47516 connected with 192.168.1.123 port 5001

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0-62.3 sec  22.5 MBytes  3.03 Mbits/sec


nanite@ubuntu:~$ iperf -c 192.168.1.123 -t 60

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

Client connecting to 192.168.1.123, TCP port 5001

TCP window size: 85.0 KByte (default)

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

[  3] local 192.168.1.2 port 47518 connected with 192.168.1.123 port 5001

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0-60.6 sec  38.4 MBytes  5.31 Mbits/sec


nanite@ubuntu:~$ iperf -u -c 192.168.1.123 -t 60

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

Client connecting to 192.168.1.123, UDP port 5001

Sending 1470 byte datagrams

UDP buffer size:  208 KByte (default)

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

[  3] local 192.168.1.2 port 48365 connected with 192.168.1.123 port 5001

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0-60.0 sec  7.50 MBytes  1.05 Mbits/sec

[  3] Sent 5348 datagrams

[  3] Server Report:

[  3]  0.0-61.4 sec  6.95 MBytes   949 Kbits/sec  16.642 ms  392/ 5348 (7.3%)

Server listening on TCP port 5001

TCP window size: 2.00 MByte (default)

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

[  4] local 192.168.1.123 port 5001 connected with 192.168.1.2 port 47516

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  3.39 MBytes  2.85 Mbits/sec

[  4] 10.0-20.0 sec  4.04 MBytes  3.39 Mbits/sec

[  4] 20.0-30.0 sec  2.88 MBytes  2.41 Mbits/sec

[  4] 30.0-40.0 sec  5.06 MBytes  4.25 Mbits/sec

[  4] 40.0-50.0 sec  3.47 MBytes  2.91 Mbits/sec

[  4] 50.0-60.0 sec  3.44 MBytes  2.88 Mbits/sec

[  4]  0.0-62.5 sec  22.5 MBytes  3.02 Mbits/sec

[  5] local 192.168.1.123 port 5001 connected with 192.168.1.2 port 47518

[  5]  0.0-10.0 sec  7.05 MBytes  5.91 Mbits/sec

[  5] 10.0-20.0 sec  4.70 MBytes  3.94 Mbits/sec

[  5] 20.0-30.0 sec  4.56 MBytes  3.83 Mbits/sec

[  5] 30.0-40.0 sec  7.08 MBytes  5.94 Mbits/sec

[  5] 40.0-50.0 sec  7.77 MBytes  6.52 Mbits/sec

[  5] 50.0-60.0 sec  6.85 MBytes  5.74 Mbits/sec

[  5]  0.0-60.5 sec  38.4 MBytes  5.32 Mbits/sec


Server listening on UDP port 5001

Receiving 1470 byte datagrams

UDP buffer size:  160 KByte (default)

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

[  3] local 192.168.1.123 port 5001 connected with 192.168.1.2 port 48365

[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams

[  3]  0.0-10.0 sec  1.17 MBytes   985 Kbits/sec   5.210 ms   61/  899 (6.8%)

[  3] 10.0-20.0 sec   982 KBytes   804 Kbits/sec   6.564 ms   64/  748 (8.6%)

[  3] 20.0-30.0 sec  1.24 MBytes  1.04 Mbits/sec   1.505 ms   94/  976 (9.6%)

[  3] 30.0-40.0 sec  1.21 MBytes  1.01 Mbits/sec   1.130 ms   59/  919 (6.4%)

[  3] 40.0-50.0 sec  1.19 MBytes  1000 Kbits/sec   1.966 ms   56/  906 (6.2%)

[  3] 50.0-60.0 sec  1.11 MBytes   930 Kbits/sec   6.114 ms   58/  849 (6.8%)

[  3]  0.0-61.4 sec  6.95 MBytes   949 Kbits/sec  16.642 ms  392/ 5348 (7.3%)

read failed: Connection refused





블로그에서 종종 와이파이 다이렉트 언급이 있어서 찾아보다가 예전에 작성한 문서가 눈에 띄어서 게시해 봤습니다. 개인이 단말기로 간이 측정한 것이기 때문에 신뢰도는 낮지만 참고할 수 있는 자료 정도는 될 듯합니다.


Top