OpenWrt Forum Archive

Topic: 80% UDP datagrams lost on a wrt54g with openwrt with iperf

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

on wrt54g v1.1 with a barebone openwrt +
libpthread_0.1_mipsel.ipk
libstdc++_5.0.5_mipsel.ipk
iperf_1.7.0-wrt1_mipsel.ipk

(package from www.wildcatwireless.net)

on the wrt :

/etc/init.d # iperf -s -f m -l 1470 -i 1 -p 5001 -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 0.03 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 42551
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  1.02 MBytes  8.57 Mbits/sec  1.223 ms 3007/ 3736 (80%)
[  3]  1.0- 2.0 sec  1.06 MBytes  8.93 Mbits/sec  1.817 ms 3265/ 4024 (81%)
[  3]  2.0- 3.0 sec  1.08 MBytes  9.07 Mbits/sec  1.448 ms 3164/ 3935 (80%)
[  3]  3.0- 4.0 sec  1.03 MBytes  8.67 Mbits/sec  1.258 ms 3163/ 3900 (81%)
[  3]  4.0- 5.0 sec  1.03 MBytes  8.67 Mbits/sec  1.172 ms 3251/ 3988 (82%)
[  3]  5.0- 6.0 sec  1.00 MBytes  8.37 Mbits/sec  1.243 ms 3181/ 3893 (82%)
[  3]  6.0- 7.0 sec  1.04 MBytes  8.73 Mbits/sec  1.024 ms 3162/ 3904 (81%)
[  3]  7.0- 8.0 sec  1.06 MBytes  8.87 Mbits/sec  1.194 ms 3099/ 3853 (80%)
[  3]  8.0- 9.0 sec  1.06 MBytes  8.93 Mbits/sec  0.883 ms 3168/ 3927 (81%)
[  3]  9.0-10.0 sec  1.09 MBytes  9.13 Mbits/sec  1.590 ms 3113/ 3889 (80%)
[  3]  0.0-10.2 sec  10.5 MBytes  8.59 Mbits/sec  15.529 ms 31638/39115 (81%)

on a debian 2.6.8 :

vaio:/home/vaio/wrt54g/packages-backup/www.wildcatwireless.net/wrt54g# iperf -c 192.168.1.1 -T 32 -i 1 -l 1470 -t 10 -p 5001 -f m -u -b54m
------------------------------------------------------------
Client connecting to 192.168.1.1, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.11 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.2 port 42551 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3] -0.0- 1.0 sec  5.43 MBytes  45.5 Mbits/sec
[  3]  1.0- 2.0 sec  5.51 MBytes  46.2 Mbits/sec
[  3]  2.0- 3.0 sec  5.48 MBytes  46.0 Mbits/sec
[  3]  3.0- 4.0 sec  5.52 MBytes  46.3 Mbits/sec
[  3]  4.0- 5.0 sec  5.51 MBytes  46.3 Mbits/sec
[  3]  5.0- 6.0 sec  5.47 MBytes  45.9 Mbits/sec
[  3]  6.0- 7.0 sec  5.46 MBytes  45.8 Mbits/sec
[  3]  7.0- 8.0 sec  5.46 MBytes  45.8 Mbits/sec
[  3]  8.0- 9.0 sec  5.49 MBytes  46.0 Mbits/sec
[  3]  9.0-10.0 sec  5.51 MBytes  46.2 Mbits/sec
[  3]  0.0-10.0 sec  54.8 MBytes  46.0 Mbits/sec
[  3] Server Report:
[  3]  0.0-10.2 sec  10.5 MBytes  8.59 Mbits/sec  15.528 ms 31638/39115 (81%)
[  3] Sent 39115 datagrams

wrt proc utilisation :

/etc/init.d # ps aux
  PID  Uid     VmSize Stat Command
    1 0           380 S   init
    2 0               SW  [keventd]
    3 0               SWN [ksoftirqd_CPU0]
    4 0               SW  [kswapd]
    5 0               SW  [bdflush]
    6 0               SW  [kupdated]
    7 0               SW  [mtdblockd]
   16 0               SWN [jffs2_gcd_mtd4]
   30 0           344 S   syslogd -C 16
  553 0           376 S   /usr/sbin/dnsmasq
  558 0           376 S   /usr/sbin/httpd -p 80 -h /www -r WRT54G Router
  563 0           308 S   /usr/sbin/telnetd -l /bin/sh
  571 0           544 S   /bin/sh
 2550 0           356 R   ps aux
/etc/init.d #

lot of packet lost
more test needed

A - LAN connection (bridge activated br0=eth0+eth2)
192.168.1.1=wrt54g
192.168.1.2=debian 2.6.8

1- pc=>wrt
on the pc side (client=sender)

vaio:/home/vaio# iperf -c 192.168.1.1 -T 32 -i 1 -l 1470 -t 10 -p 5001 -f m -u -b54m
------------------------------------------------------------
Client connecting to 192.168.1.1, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.11 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.2 port 32831 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3] -0.0- 1.0 sec  6.29 MBytes  52.8 Mbits/sec

[  3]  1.0- 2.0 sec  6.28 MBytes  52.7 Mbits/sec
[  3]  2.0- 3.0 sec  6.28 MBytes  52.7 Mbits/sec
[  3]  3.0- 4.0 sec  6.27 MBytes  52.6 Mbits/sec
[  3]  4.0- 5.0 sec  6.39 MBytes  53.6 Mbits/sec
[  3]  5.0- 6.0 sec  6.39 MBytes  53.6 Mbits/sec
[  3]  6.0- 7.0 sec  6.25 MBytes  52.4 Mbits/sec
[  3]  7.0- 8.0 sec  6.36 MBytes  53.4 Mbits/sec
[  3]  8.0- 9.0 sec  6.36 MBytes  53.4 Mbits/sec
[  3]  9.0-10.0 sec  6.36 MBytes  53.4 Mbits/sec
[  3]  0.0-10.0 sec  63.2 MBytes  53.0 Mbits/sec
[  3] Server Report:
[  3]  0.0-10.2 sec  14.1 MBytes  11.5 Mbits/sec  14.490 ms 35079/45107 (78%)
[  3] Sent 45

on the wrt side (server=receiver)

/etc # iperf -s -f m -l 1470 -i 1 -p 5001 -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 0.03 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 32831
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  1.45 MBytes  12.2 Mbits/sec  1.424 ms 3444/ 4480 (77%)
[  3]  1.0- 2.0 sec  1.44 MBytes  12.1 Mbits/sec  1.371 ms 3459/ 4486 (77%)
[  3]  2.0- 3.0 sec  1.39 MBytes  11.7 Mbits/sec  1.224 ms 3454/ 4446 (78%)
[  3]  3.0- 4.0 sec  1.44 MBytes  12.1 Mbits/sec  1.447 ms 3491/ 4518 (77%)
[  3]  4.0- 5.0 sec  1.38 MBytes  11.6 Mbits/sec  0.651 ms 3513/ 4496 (78%)
[  3]  5.0- 6.0 sec  1.38 MBytes  11.6 Mbits/sec  1.136 ms 3607/ 4591 (79%)
[  3]  6.0- 7.0 sec  1.40 MBytes  11.7 Mbits/sec  2.081 ms 3485/ 4482 (78%)
[  3]  7.0- 8.0 sec  1.43 MBytes  12.0 Mbits/sec  0.823 ms 3505/ 4528 (77%)
[  3]  8.0- 9.0 sec  1.37 MBytes  11.5 Mbits/sec  0.617 ms 3572/ 4546 (79%)
[  3]  9.0-10.0 sec  1.38 MBytes  11.6 Mbits/sec  0.594 ms 3474/ 4458 (78%)
[  3]  0.0-10.2 sec  14.1 MBytes  11.5 Mbits/sec  14.491 ms 35079/45107 (78%)
107 datagrams

2 - wrt=>pc
on the wrt side (client)

/etc #  iperf -c 192.168.1.2 -T 32 -i 1 -l 1470 -t 10 -p 5001 -f m -u -b54m
------------------------------------------------------------
Client connecting to 192.168.1.2, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.03 MByte (default)
------------------------------------------------------------
[  5] local 192.168.1.1 port 2049 connected with 192.168.1.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5] -0.0- 1.0 sec  2.12 MBytes  17.7 Mbits/sec
[  5]  1.0- 2.0 sec  2.15 MBytes  18.0 Mbits/sec
[  5]  2.0- 3.0 sec  2.13 MBytes  17.9 Mbits/sec
[  5]  3.0- 4.0 sec  2.11 MBytes  17.7 Mbits/sec
[  5]  4.0- 5.0 sec  2.13 MBytes  17.9 Mbits/sec
[  5]  5.0- 6.0 sec  2.14 MBytes  17.9 Mbits/sec
[  5]  6.0- 7.0 sec  2.13 MBytes  17.9 Mbits/sec
[  5]  7.0- 8.0 sec  2.12 MBytes  17.8 Mbits/sec
[  5]  8.0- 9.0 sec  2.12 MBytes  17.8 Mbits/sec
[  5]  9.0-10.0 sec  2.11 MBytes  17.7 Mbits/sec
[  5]  0.0-10.0 sec  21.3 MBytes  17.8 Mbits/sec
[  5] Server Report:
[  5]  0.0-10.0 sec  21.1 MBytes  17.7 Mbits/sec  1.606 ms   76/15162 (0.5%)
[  5] Sent 15162 datagrams

on the pc side (server)

vaio:/home/vaio# iperf -s -f m -l 1470 -i 1 -p 5001 -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 0.11 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.2 port 5001 connected with 192.168.1.1 port 2049
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  2.09 MBytes  17.5 Mbits/sec  0.043 ms   17/ 1509 (1.1%)
[  3]  1.0- 2.0 sec  2.14 MBytes  17.9 Mbits/sec  0.027 ms    9/ 1534 (0.59%)
[  3]  2.0- 3.0 sec  2.13 MBytes  17.9 Mbits/sec  0.036 ms    0/ 1520 (0%)
[  3]  3.0- 4.0 sec  2.11 MBytes  17.7 Mbits/sec  0.013 ms    0/ 1503 (0%)
[  3]  4.0- 5.0 sec  2.13 MBytes  17.9 Mbits/sec  0.042 ms    0/ 1522 (0%)
[  3]  5.0- 6.0 sec  2.14 MBytes  17.9 Mbits/sec  0.015 ms    0/ 1523 (0%)
[  3]  6.0- 7.0 sec  2.13 MBytes  17.9 Mbits/sec  0.110 ms    0/ 1519 (0%)
[  3]  7.0- 8.0 sec  2.09 MBytes  17.5 Mbits/sec  0.013 ms   27/ 1515 (1.8%)
[  3]  8.0- 9.0 sec  2.09 MBytes  17.5 Mbits/sec  0.013 ms   23/ 1514 (1.5%)
[  3]  9.0-10.0 sec  2.11 MBytes  17.7 Mbits/sec  0.011 ms    0/ 1502 (0%)
[  3]  0.0-10.0 sec  21.1 MBytes  17.7 Mbits/sec  1.607 ms   76/15162 (0.5%)

B - WLAN connection (bridge activated br0=eth0+eth2)
192.168.1.1=wrt54g
192.168.1.224=debian 2.6.8

1- pc=>wrt

on the pc side (client)

vaio:/home/vaio# iperf -c 192.168.1.1 -T 32 -i 1 -l 1470 -t 10 -p 5001 -f m -u -b54m
------------------------------------------------------------
Client connecting to 192.168.1.1, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.11 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.224 port 32831 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3] -0.0- 1.0 sec  3.16 MBytes  26.5 Mbits/sec
[  3]  1.0- 2.0 sec  3.29 MBytes  27.6 Mbits/sec
[  3]  2.0- 3.0 sec  3.21 MBytes  27.0 Mbits/sec
[  3]  3.0- 4.0 sec  3.27 MBytes  27.4 Mbits/sec
[  3]  4.0- 5.0 sec  3.25 MBytes  27.2 Mbits/sec
[  3]  5.0- 6.0 sec  3.28 MBytes  27.5 Mbits/sec
[  3]  6.0- 7.0 sec  3.22 MBytes  27.0 Mbits/sec
[  3]  7.0- 8.0 sec  3.28 MBytes  27.5 Mbits/sec
[  3]  8.0- 9.0 sec  3.22 MBytes  27.0 Mbits/sec
[  3]  9.0-10.0 sec  3.23 MBytes  27.1 Mbits/sec
[  3]  0.0-10.0 sec  32.4 MBytes  27.2 Mbits/sec
[  3] Server Report:
[  3]  0.0-10.2 sec  12.8 MBytes  10.5 Mbits/sec  12.091 ms 13998/23122 (61%)
[  3]  0.0-10.2 sec  2 datagrams received out-of-order
[  3] Sent 23122 datagrams

on the wrt side (server)

/ # iperf -s -f m -l 1470 -i 1 -p 5001 -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 0.03 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.1 port 5001 connected with 192.168.1.224 port 32831
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  1.28 MBytes  10.7 Mbits/sec  2.311 ms 1221/ 2135 (57%)
[  3]  0.0- 1.0 sec  1 datagrams received out-of-order
[  3]  1.0- 2.0 sec  1.26 MBytes  10.5 Mbits/sec  1.905 ms 1436/ 2332 (62%)
[  3]  2.0- 3.0 sec  1.28 MBytes  10.8 Mbits/sec  2.009 ms 1398/ 2313 (60%)
[  3]  3.0- 4.0 sec  1.29 MBytes  10.8 Mbits/sec  1.656 ms 1417/ 2337 (61%)
[  3]  4.0- 5.0 sec  1.28 MBytes  10.8 Mbits/sec  1.580 ms 1383/ 2298 (60%)
[  3]  5.0- 6.0 sec  1.27 MBytes  10.6 Mbits/sec  1.436 ms 1438/ 2342 (61%)
[  3]  5.0- 6.0 sec  1 datagrams received out-of-order
[  3]  6.0- 7.0 sec  1.27 MBytes  10.7 Mbits/sec  1.223 ms 1408/ 2315 (61%)
[  3]  7.0- 8.0 sec  1.27 MBytes  10.7 Mbits/sec  1.805 ms 1407/ 2316 (61%)
[  3]  8.0- 9.0 sec  1.28 MBytes  10.7 Mbits/sec  2.291 ms 1401/ 2314 (61%)
[  3]  9.0-10.0 sec  1.28 MBytes  10.7 Mbits/sec  1.708 ms 1415/ 2328 (61%)
[  3]  0.0-10.2 sec  12.8 MBytes  10.5 Mbits/sec  12.091 ms 13998/23122 (61%)
[  3]  0.0-10.2 sec  2 datagrams received out-of-order

2- wrt=>pc
on the wrt side (client)

/ # iperf -c 192.168.1.224 -T 32 -i 1 -l 1470 -t 10 -p 5001 -f m -u -b54m
------------------------------------------------------------
Client connecting to 192.168.1.224, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.03 MByte (default)
------------------------------------------------------------
[  5] local 192.168.1.1 port 2049 connected with 192.168.1.224 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5] -0.0- 1.0 sec  1.90 MBytes  16.0 Mbits/sec
[  5]  1.0- 2.0 sec  1.89 MBytes  15.8 Mbits/sec
[  5]  2.0- 3.0 sec  1.89 MBytes  15.9 Mbits/sec
[  5]  3.0- 4.0 sec  1.89 MBytes  15.9 Mbits/sec
[  5]  4.0- 5.0 sec  1.90 MBytes  15.9 Mbits/sec
[  5]  5.0- 6.0 sec  1.90 MBytes  15.9 Mbits/sec
[  5]  6.0- 7.0 sec  1.90 MBytes  15.9 Mbits/sec
[  5]  7.0- 8.0 sec  1.86 MBytes  15.6 Mbits/sec
[  5]  8.0- 9.0 sec  1.90 MBytes  15.9 Mbits/sec
[  5]  9.0-10.0 sec  1.89 MBytes  15.9 Mbits/sec
[  5]  0.0-10.0 sec  18.9 MBytes  15.9 Mbits/sec
[  5] Server Report:
[  5]  0.0-10.0 sec  18.6 MBytes  15.6 Mbits/sec  2.131 ms  238/13500 (1.8%)
[  5]  0.0-10.0 sec  6 datagrams received out-of-order
[  5] Sent 13500 datagrams

on the pc side (server)

vaio:/home/vaio# iperf -s -f m -l 1470 -i 1 -p 5001 -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 0.11 MByte (default)
------------------------------------------------------------
[  3] local 192.168.1.224 port 5001 connected with 192.168.1.1 port 2049
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  1.76 MBytes  14.7 Mbits/sec  0.320 ms  105/ 1357 (7.7%)
[  3]  1.0- 2.0 sec  1.88 MBytes  15.8 Mbits/sec  0.039 ms    4/ 1347 (0.3%)
[  3]  2.0- 3.0 sec  1.86 MBytes  15.6 Mbits/sec  0.166 ms   19/ 1349 (1.4%)
[  3]  2.0- 3.0 sec  1 datagrams received out-of-order
[  3]  3.0- 4.0 sec  1.87 MBytes  15.7 Mbits/sec  0.027 ms   19/ 1351 (1.4%)
[  3]  4.0- 5.0 sec  1.89 MBytes  15.8 Mbits/sec  0.023 ms    8/ 1353 (0.59%)
[  3]  4.0- 5.0 sec  2 datagrams received out-of-order
[  3]  5.0- 6.0 sec  1.88 MBytes  15.7 Mbits/sec  0.124 ms   17/ 1355 (1.3%)
[  3]  5.0- 6.0 sec  1 datagrams received out-of-order
[  3]  6.0- 7.0 sec  1.88 MBytes  15.7 Mbits/sec  0.064 ms   17/ 1356 (1.3%)
[  3]  6.0- 7.0 sec  1 datagrams received out-of-order
[  3]  7.0- 8.0 sec  1.84 MBytes  15.4 Mbits/sec  0.042 ms   18/ 1329 (1.4%)
[  3]  8.0- 9.0 sec  1.86 MBytes  15.6 Mbits/sec  0.035 ms   19/ 1348 (1.4%)
[  3]  9.0-10.0 sec  1.87 MBytes  15.7 Mbits/sec  0.042 ms   12/ 1348 (0.89%)
[  3]  9.0-10.0 sec  1 datagrams received out-of-order
[  3]  0.0-10.0 sec  18.6 MBytes  15.6 Mbits/sec  2.131 ms  238/13500 (1.8%)
[  3]  0.0-10.0 sec  6 datagrams received out-of-order

What appears is the that wrt max out to about 11Mbits/s when receiving(server mode). That explain the high packet loss in both lan/wlan tests because the pc succede in sending at top rate (~54Mbit/s LAN & ~27Mbits/s WLAN)

In client mode(sending) the wrt max out at ~18Mbit/s on LAN test and ~16Mbit/s on WLAN test. There is no packet loss whith LAN connection (PC is potentially capable of receiving ~100Mbit/s) althought the packet  loss become visible on WLAN test (~1%) but seems ok : both side are talking at the same speed.

First conclusions/questions :

The bridge has maybe to be disable in order to get full 100Mbit/s on LAN interface
Why is the wrt maxing out at 11Mbit/s when receiving and 18Mbit/s when sending ? (wl/wl0_gmode=1)

Any hints/linkz/comments/advices ?

Correct me if I am wrong but I think you can not start iperf on WRT because you would get wrong performance results.

Since the iperf program uses the CPU, etc.

sure ! but dropping to a poor ~10Mbit/s for a 100Mbit/s LAN switch is a bit disappointing, even for a 125 MHZ proc doing some measurement : there are surely out there reasons explaning those anomalies

The discussion might have continued from here.