Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TW#17853] "examples/performance/tcp_perf" and "examples/wifi/iperf" give different results #1515

Closed
abcdcadc opened this issue Jan 18, 2018 · 19 comments

Comments

@abcdcadc
Copy link

while idf/examples/performance/tcp_perf gives speed around 1.8Mbit/sec (I run tcp_perfon esp and on PC side, i send continuously nodelay tcp package), examples/wifi/iperf gives much higher (about 10Mbit/sec) (I did as the manual, server built on PC side by iperf2.06 and client on esp32)

I tried to modify the configuration( in "wifi" and "lwip" of menuconfig) of tcp_perf following the iperf, but still same
is there any else configuration I must do to improve the throughput of tcp_iperf as iperf?

@FayeY FayeY changed the title "examples/performance/tcp_perf" and "examples/wifi/iperf" give different results [TW#17853] "examples/performance/tcp_perf" and "examples/wifi/iperf" give different results Jan 23, 2018
@liuzfesp
Copy link
Contributor

@abcdcadc tcp_perf example has different configuration than iperf example, it's a obsolete example, we will remove it in idf v3.1.

@abcdcadc
Copy link
Author

@liuzfesp thanks for rep,
in version3.1, if I follow configuration of iperf, can I get my expected speed?

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 1, 2018

Absolutely, @abcdcadc

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 1, 2018

@abcdcadc the throughput optimization code is already merged into IDF master branch, it will be ready in 2 days in github IDF master branch. In other words, 2 days later, pull the latest idf master, you can get the stable iperf example.

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 1, 2018

@abcdcadc please pull the latest idf master branch, use iperf example for your test. The throughput optimization commit is: 17f01eb

@abcdcadc
Copy link
Author

abcdcadc commented Feb 2, 2018

@liuzfesp , i did on the newest version of iperf, but the result still is bad
iperf

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 2, 2018

@abcdcadc could you describe the detailed test steps? Test it in the air or shield box?

@heyinling
Copy link
Contributor

@abcdcadc I would also suggest you check the following items (may not directly related to your issue):

  1. use ethernet to connect your PC NIC to AP, make sure the PC to AP side is stable
  2. use native ethernet NIC instead of USB NIC. USB NIC might be the bottle neck
  3. switch off anti-varies SW and windows firewall

@abcdcadc
Copy link
Author

abcdcadc commented Feb 2, 2018

@liuzfesp the procedure follows the "readme.md" in iperf folder:
1/ connect PC to router (via wifi)
2/ connect esp32 to router by (sta ssid password)
3/ create server on PC (using iperf2.09, the newest version of iperf 3.0 doesnt work by error: reset by peer???)
4/connect esp32 to server (as readme.md)
esp32 chip is in air
@heyinling 1/ you mean connect directly PC to router using cable RJ45? ( now my PC is connecting via wifi)
3/ definitely no firewall and anti virsus

@heyinling
Copy link
Contributor

yes, use RJ45 interface. this will make sure PC to router side can reach 100M.

And need to make ESP32 not too far away form router (use ESP32 to scan router, RSSI larger than -50).

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 2, 2018

@abcdcadc, in the air, the throughput is much lower than in the shieldbox, but your result looks abnormal. Could you double check you IDF master is newest and have run the "git submodule update" to update the submodules?

@abcdcadc
Copy link
Author

abcdcadc commented Feb 2, 2018

@heyinling , for simplification, i will turn the PC into AP and make esp32 join that AP, is it ok?
@liuzfesp , i just git clone this morning, it seems no updated until now
could you tell me what is shieldbox, is it possible to buy and equip one for my esp32?

@heyinling
Copy link
Contributor

you may try this first. I suppose with this config you should at least get result improved to Mbps.

But if you use USB wifi NIC, or your WIFI NIC don't support 11g, or HT40, it could still be the bottle neck for the test.

shield box is a box that you put your ESP32 and AP inside it. then it will shield all the RF signals outside. If you don't have one, I would suggest you run test on a relative clean environment (don't have a lot WIFI AP / STAs).

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 2, 2018

@abcdcadc if no shield box, you can also test it in carport.

@abcdcadc
Copy link
Author

abcdcadc commented Feb 2, 2018

@liuzfesp that was my mistake because esp32 was far from router, I moved it nearer (20cm) and got as below:
iperf_near
quite better and stable but still very lower document 10Mbit/sec
@heyinling I also tried to use RJ45 cable with the above distance and got:
iperf_cable
it even is worse than using wireless!!!

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 2, 2018

Correct one of my previous reply message, "if no shield box, you can also test it in carport." should be "if no shield box, you can also test it in a garage with walls".

@abcdcadc
Copy link
Author

abcdcadc commented Feb 2, 2018

@liuzfesp , you mean wifi performance is strongly affected by environment, i will lose more than 10 Mbit/sec if i am at a clutter environment, right?

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 2, 2018

@abcdcadc could you replace esp32 with your another PC (let's say PC2), PC2 connects to the router with wireless. And run the test case again to check whether is because the test environment is not good.

@liuzfesp
Copy link
Contributor

liuzfesp commented Feb 2, 2018

@abcdcadc you are right, the performance is greatly affected by environment

igrr pushed a commit that referenced this issue Mar 2, 2018
Remove performance example since we have iperf example
close github issue: #1515
@FayeY FayeY closed this as completed Mar 5, 2018
dschaefer pushed a commit to dschaefer/esp-idf that referenced this issue Mar 17, 2018
Remove performance example since we have iperf example
close github issue: espressif#1515
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
* fix sdmmc config

* Fix warnings in EEPROM

from @Curclamas

* remove leftover TAG in EEPROM

* Initial add of @stickbreaker i2c

* Add log_n

* fix warnings when log is off

* i2c code clean up and reorganization

* add flags to interrupt allocator

* fix sdmmc config

* Fix warnings in EEPROM

from @Curclamas

* remove leftover TAG in EEPROM

* fix errors with latest IDF

* fix debug optimization (espressif#1365)

incorrect optimization for debugging tick markers.

* Fix some missing BT header

* Change BTSerial log calls

* Update BLE lib

* Arduino-ESP32 release management scripted (espressif#1515)

* Calculate an absolute path for a custom partitions table (espressif#1452)

* * Arduino-ESP32 release management scripted
(ready-to-merge)

* * secure env for espressif/arduino-esp32

* * build tests enabled
* gitter webhook enabled

* * gitter room link fixed
* better comment

* * filepaths fixed

* BT Serial adjustments

* * don't run sketch builds & tests for tagged builds

* Return false from WiFi.hostByName() if hostname is not resolved

* Free BT Memory when BT is not used

* WIFI_MODE_NULL is not supported anymore

* Select some key examples to build with PlatformIO to save some time

* Update BLE lib

* Fixed BLE lib

* Major WiFi overhaul

- auto reconnect on connection loss now works
- moved to event groups
- some code clean up and procedure optimizations
- new methods to get a more elaborate system ststus

* Add cmake tests to travis

* Add initial AsyncUDP

* Add NetBIOS lib and fix CMake includes

* Add Initial WebServer

* Fix WebServer and examples

* travis not quiting on build fail

* Try different travis build

* Update IDF to aaf1239

* Fix WPS Example

* fix script permission and add some fail tests to sketch builder

* Add missing space in WiFiClient::write(Stream &stream)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants