espressif / esp-mdf

Espressif Mesh Development Framework, limited maintain, recommend to use https://github.com/espressif/esp-mesh-lite
Other
774 stars 253 forks source link

关于mesh节点间吞吐量的询问。About throughput between mesh nodes。 #301

Open FPOOOOOOO opened 2 years ago

FPOOOOOOO commented 2 years ago

Environment

Problem Description

我目前的需求是在没有路由器的情况下,固定根节点,然后有16个节点通过mesh连接到根节点,每个节点往根节点有1Mbit的吞吐量,也就是根节点需要有16Mbit的吞吐量。我融合了esp-mdf/examples/function_demo/mwifi/console_testesp-mdf/examples/function_demo/mwifi/no_router,经过测试根节点当server还是client,都只有8M左右的吞吐量。mesh的底层也是wifi发送,但是在esp-idf/examples/wifi/iperf中,wifi的速度能够到30M,请问一下这是为什么?有什么办法提高吞吐量到16M?

Now what I want to do is fixing root node without a router, let 16 other non-root node connected to the root node via mesh network. Every non-root node could have a throughput at 1Mbit/s, that is to say the root node could have throughput at 16Mbit/s. I combine two example together to get non-router mesh throughput test——esp-mdf/examples/function_demo/mwifi/console_test AND esp-mdf/examples/function_demo/mwifi/no_router. But whether the root node is server or client, it only has 8M throughput. As I have known, mesh's bottom layer code is wifi, in the esp-idf/examples/wifi/iperfexample ,wifi's throughput could up to 30M, I want to know why mesh's throughput is such low? Is there any method to do to improve the throughput up to 16M?

Debug Logs

15:23:36:077]Tx→⦁mesh_iperf -c c0:49:ef:4b:23:34 -i 1 -l 1000 -t 10
[15:23:36:124]Rx←⦁mesh_iperf -c c0:49:ef:4b:23:34 -i 1 -l 1000 -t 10

[15:23:36:444]Rx←⦁I (1308541) [mwifi_test, 673]: ------------------------------------------------------------
I (1308542) [mwifi_test, 674]: client c4:de:e2:c0:0a:d4 send to c0:49:ef:4b:23:34
I (1308553) [mwifi_test, 675]: ESP-WIFI-MESH layer:
[15:23:36:492]Rx←⦁ 1
I (1308553) [mwifi_test, 676]: ------------------------------------------------------------
I (1308564) [mwifi_test, 679]: time: 60, interval: 1, len: 1000
I (1308575) [mwifi_test, 414]: [    Server MAC   ] Interval       Transfer     Bandwidth
mdf> 

[15:23:36:804]Rx←⦁mdf> 
[15:23:37:479]Rx←⦁I (1309575) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   0- 1 sec  0.75 MBytes  5.98 Mbits/sec

[15:23:38:480]Rx←⦁I (1310576) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   1- 2 sec  1.05 MBytes  8.37 Mbits/sec

[15:23:39:481]Rx←⦁I (1311577) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   2- 3 sec  1.06 MBytes  8.46 Mbits/sec

[15:23:40:483]Rx←⦁I (1312579) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   3- 4 sec  1.04 MBytes  8.29 Mbits/sec

[15:23:41:484]Rx←⦁I (1313580) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   4- 5 sec  1.05 MBytes  8.43 Mbits/sec

[15:23:42:485]Rx←⦁I (1314581) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   5- 6 sec  1.07 MBytes  8.59 Mbits/sec

[15:23:43:486]Rx←⦁I (1315582) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   6- 7 sec  1.05 MBytes  8.38 Mbits/sec

[15:23:44:487]Rx←⦁I (1316583) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   7- 8 sec  1.08 MBytes  8.61 Mbits/sec

[15:23:45:488]Rx←⦁I (1317584) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   8- 9 sec  1.10 MBytes  8.78 Mbits/sec

[15:23:46:491]Rx←⦁I (1318587) [mwifi_test, 429]: [c0:49:ef:4b:23:34]   9-10 sec  1.09 MBytes  8.72 Mbits/sec

[15:23:47:493]Rx←⦁I (1319589) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  10-11 sec  1.09 MBytes  8.74 Mbits/sec

[15:23:48:494]Rx←⦁I (1320590) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  11-12 sec  1.05 MBytes  8.38 Mbits/sec

[15:23:49:495]Rx←⦁I (1321591) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  12-13 sec  1.08 MBytes  8.67 Mbits/sec

[15:23:50:496]Rx←⦁I (1322592) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  13-14 sec  1.06 MBytes  8.52 Mbits/sec

[15:23:51:500]Rx←⦁I (1323594) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  14-15 sec  1.06 MBytes  8.47 Mbits/sec

[15:23:52:499]Rx←⦁I (1324595) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  15-16 sec  1.05 MBytes  8.39 Mbits/sec

[15:23:53:500]Rx←⦁I (1325596) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  16-17 sec  1.05 MBytes  8.44 Mbits/sec

[15:23:54:501]Rx←⦁I (1326597) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  17-18 sec  1.05 MBytes  8.37 Mbits/sec

[15:23:55:502]Rx←⦁I (1327598) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  18-19 sec  1.05 MBytes  8.42 Mbits/sec

[15:23:56:503]Rx←⦁I (1328599) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  19-20 sec  1.07 MBytes  8.57 Mbits/sec

[15:23:57:525]Rx←⦁I (1329601) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  20-21 sec  1.05 MBytes  8.42 Mbits/sec

[15:23:58:506]Rx←⦁I (1330602) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  21-22 sec  1.00 MBytes  8.03 Mbits/sec

[15:23:59:506]Rx←⦁I (1331603) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  22-23 sec  1.00 MBytes  7.99 Mbits/sec

[15:24:0:531]Rx←⦁I (1332607) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  23-24 sec  1.03 MBytes  8.22 Mbits/sec

[15:24:1:511]Rx←⦁I (1333608) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  24-25 sec  0.99 MBytes  7.94 Mbits/sec

[15:24:2:512]Rx←⦁I (1334609) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  25-26 sec  0.94 MBytes  7.52 Mbits/sec

[15:24:3:534]Rx←⦁I (1335610) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  26-27 sec  0.91 MBytes  7.25 Mbits/sec

[15:24:4:515]Rx←⦁I (1336611) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  27-28 sec  0.97 MBytes  7.74 Mbits/sec

[15:24:5:516]Rx←⦁I (1337612) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  28-29 sec  0.98 MBytes  7.82 Mbits/sec

[15:24:6:541]Rx←⦁I (1338614) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  29-30 sec  0.96 MBytes  7.66 Mbits/sec

[15:24:7:518]Rx←⦁I (1339615) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  30-31 sec  0.98 MBytes  7.82 Mbits/sec

[15:24:8:521]Rx←⦁I (1340617) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  31-32 sec  0.97 MBytes  7.80 Mbits/sec

[15:24:9:544]Rx←⦁I (1341618) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  32-33 sec  0.98 MBytes  7.82 Mbits/sec

[15:24:10:523]Rx←⦁I (1342619) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  33-34 sec  0.98 MBytes  7.84 Mbits/sec

[15:24:11:523]Rx←⦁I (1343620) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  34-35 sec  0.96 MBytes  7.66 Mbits/sec

[15:24:12:548]Rx←⦁I (1344621) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  35-36 sec  1.00 MBytes  7.98 Mbits/sec

[15:24:13:525]Rx←⦁I (1345622) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  36-37 sec  0.98 MBytes  7.85 Mbits/sec

[15:24:14:527]Rx←⦁I (1346623) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  37-38 sec  1.00 MBytes  7.99 Mbits/sec

[15:24:15:551]Rx←⦁I (1347624) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  38-39 sec  1.00 MBytes  8.04 Mbits/sec

[15:24:16:529]Rx←⦁I (1348625) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  39-40 sec  0.99 MBytes  7.89 Mbits/sec

[15:24:17:529]Rx←⦁I (1349626) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  40-41 sec  0.98 MBytes  7.86 Mbits/sec

[15:24:18:554]Rx←⦁I (1350627) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  41-42 sec  0.93 MBytes  7.44 Mbits/sec

[15:24:19:532]Rx←⦁I (1351628) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  42-43 sec  0.94 MBytes  7.50 Mbits/sec

[15:24:20:533]Rx←⦁I (1352629) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  43-44 sec  0.92 MBytes  7.34 Mbits/sec

[15:24:21:551]Rx←⦁I (1353630) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  44-45 sec  0.94 MBytes  7.50 Mbits/sec

[15:24:22:535]Rx←⦁I (1354631) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  45-46 sec  0.95 MBytes  7.58 Mbits/sec

[15:24:23:536]Rx←⦁I (1355633) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  46-47 sec  0.95 MBytes  7.57 Mbits/sec

[15:24:24:557]Rx←⦁I (1356634) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  47-48 sec  0.97 MBytes  7.77 Mbits/sec

[15:24:25:543]Rx←⦁I (1357640) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  48-49 sec  0.95 MBytes  7.61 Mbits/sec

[15:24:26:545]Rx←⦁I (1358641) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  49-50 sec  0.95 MBytes  7.60 Mbits/sec

[15:24:27:565]Rx←⦁I (1359642) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  50-51 sec  0.98 MBytes  7.81 Mbits/sec

[15:24:28:547]Rx←⦁I (1360643) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  51-52 sec  0.96 MBytes  7.70 Mbits/sec

[15:24:29:547]Rx←⦁I (1361644) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  52-53 sec  0.95 MBytes  7.60 Mbits/sec

[15:24:30:571]Rx←⦁I (1362645) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  53-54 sec  0.97 MBytes  7.75 Mbits/sec

[15:24:31:549]Rx←⦁I (1363646) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  54-55 sec  0.95 MBytes  7.62 Mbits/sec

[15:24:32:551]Rx←⦁I (1364647) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  55-56 sec  1.02 MBytes  8.14 Mbits/sec

[15:24:33:577]Rx←⦁I (1365648) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  56-57 sec  0.96 MBytes  7.70 Mbits/sec

[15:24:34:556]Rx←⦁I (1366652) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  57-58 sec  0.95 MBytes  7.57 Mbits/sec

[15:24:35:557]Rx←⦁I (1367654) [mwifi_test, 429]: [c0:49:ef:4b:23:34]  58-59 sec  0.97 MBytes  7.78 Mbits/sec

[15:24:36:518]Rx←⦁I (1368592) [mwifi_test, 457]: client Report:
I (1368592) [mwifi_test, 458]: [ ID] Interval      Transfer       Bandwidth      Jitter   Lost/Total Datagrams
I (1368603) [mwifi_test, 461]: [000]  0-60 sec    59.71 MBytes    7.96 Mbits/sec    1 ms    0/59706 (0%)

Other items if possible

我注意到mesh 非根节点的上行速率是限制的,从测试结果来看目前上行速率是能达到1Mbit/s的。如果我要测试根节点下行速率能否达到16M,我得知道非根节点接受速率能否达到16M?不然我没法知道是根节点发不出16M,还是非根节点收不到16M。请问一下有没有好办法知道根节点下行速率能否达到16M?

I notice that mesh non-root node up-stream throughput has a flow control. As the result is above, the non-root up-stream throughput could be 1M. So the problem comes to test whether the root node down-stream throughput could be 16M, to do that I have to know whether the non-root node receive throughput could be 16M? If not, I am not sure it's the root node Tx throughput is not sufficient or the non-root node Rx throughput not sufficient? Please, if you have any idea to test the root node down-stream throughput to be 16M or not, inform me.

@EspHuifeng @zhanzhaocheng

mmrein commented 2 years ago

HI, I did at some point manage to have 13-16 Mbps througput on root, but takes some fiddling around. Your 8M is a good start. Some non-exhaustive list of notes you can try: