RTT of examples udp_server and udp_client not very good.
Posted: Sun Jul 14, 2019 6:44 am
Hi. I'm using two, ESP32-Wrover-B DevkitC V4. They are sitting on top of my wifi router.
When I compile the esp-idf examples udp_server and udp_client. The RTT varies wildly from 40-200ms
This is not very good.
I have disabled AMPDU, compiled in release mode, set esp32 to 240Mhz.
Anything else I should do to improve this? I do not care about throughput, just latency.
I modified the server code to not print and I modified client to do a breakdown of
send vs receive times using esp_timer_get_time.
From the output below notice how unstable the rtt is
(I'm not in a noisy wifi area and again esp devkits are sitting on top of the router).
That the send alone is not stable and is sometimes taking nearly 2ms is not great either.
I (3219) example: Message sending
I (3429) example: Received 19 bytes from 192.168.86.237, rtt=197355us, send=544us
I (3429) example: Message from ESP32
I (5429) example: Message sending
I (5459) example: Received 19 bytes from 192.168.86.237, rtt=37262us, send=2070us
I (5459) example: Message from ESP32
I (7459) example: Message sending
I (7709) example: Received 19 bytes from 192.168.86.237, rtt=258019us, send=2096us
I (7709) example: Message from ESP32
I (9709) example: Message sending
I (9969) example: Received 19 bytes from 192.168.86.237, rtt=263406us, send=1745us
When I compile the esp-idf examples udp_server and udp_client. The RTT varies wildly from 40-200ms
This is not very good.
I have disabled AMPDU, compiled in release mode, set esp32 to 240Mhz.
Anything else I should do to improve this? I do not care about throughput, just latency.
I modified the server code to not print and I modified client to do a breakdown of
send vs receive times using esp_timer_get_time.
From the output below notice how unstable the rtt is
(I'm not in a noisy wifi area and again esp devkits are sitting on top of the router).
That the send alone is not stable and is sometimes taking nearly 2ms is not great either.
I (3219) example: Message sending
I (3429) example: Received 19 bytes from 192.168.86.237, rtt=197355us, send=544us
I (3429) example: Message from ESP32
I (5429) example: Message sending
I (5459) example: Received 19 bytes from 192.168.86.237, rtt=37262us, send=2070us
I (5459) example: Message from ESP32
I (7459) example: Message sending
I (7709) example: Received 19 bytes from 192.168.86.237, rtt=258019us, send=2096us
I (7709) example: Message from ESP32
I (9709) example: Message sending
I (9969) example: Received 19 bytes from 192.168.86.237, rtt=263406us, send=1745us