TCP connection speed always bellow 13KB/s through Internet, why?

DavidAG
Posts: 1
Joined: Thu May 07, 2020 1:16 am

TCP connection speed always bellow 13KB/s through Internet, why?

Postby DavidAG » Thu May 07, 2020 2:13 am

Hi guys, I'm trying to make a Streaming Radio using a ESP32 (Lolin D32 pro) + VS1053 MP3 decoder.

After a lot of work improving code (full dual core, thread sync, 128K circular double buffer, etc) I noticed that the bottle neckle is the TCP connection speed via Internet. Everything works fine for streaming bitrates bellow 13KByte/s but I need at least 16KB/s to achieve a decent 128kbps of MP3 bitrate.

I spent some time making two "download tests" using TCP (one with WiFiClient (reading by pooling) and other with AsyncTCP (reading by callback)) (emulating HTTP protocol) and I noticed that connecting to my intranet's WebServer I can have up to 750KByte/s, BUT connecting to any Internet hosting webserver, I NEVER can exceed 13KByte/s (however, I measured at least 11MByte/s of speed from these webservers using a TCP client running on Windows, so all webservers were reliable enough).

My question now is, how could I improve the TCP performance? may be the internal TCP protocol configuration (MTU, MSS, etc) is extremely "conservative"? .. so I need to touch SDKCONFIG and recompile core libraries? .. or there is another reason for what i'm seeing.

I'm using Arduino IDE and all ESP32 standard libraries.

I'm new in this forum, so if this subject was already treated here, please let me know.
Thanks in advance.

Who is online

Users browsing this forum: No registered users and 99 guests