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

[Bug] Subscriber callback appears to be limited at 100Hz with ESP32 #712

Closed
patrickelectric opened this issue Oct 7, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@patrickelectric
Copy link
Contributor

Describe the bug

When ping-ponging bytes around between a computer and a esp32, the subscriber side in the ESP32 appears to be limited at 100Hz.

To reproduce

Run the following code:
https://gist.github.com/patrickelectric/0bd8315894fec32cdaa69f8119de1da8

System info

ESP32-c3 and:

                   -`                 
                  .o+`                 patrick@pichau
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: x86_64 Linux 6.9.7-arch1-1
               `+oooooo:               Uptime: 5d 23h 29m
               -+oooooo+:              Packages: 2949
             `/:-:++oooo+:             Shell: zsh 5.9
            `/++++/+++++++:            Resolution: 7680x2160
           `/++++++++++++++:           DE: KDE
          `/+++ooooooooooooo/`         WM: KWin
         ./ooosssso++osssssso+`        GTK Theme: 
        .oossssso-````/ossssss+`       Disk: 803G / 911G (93%)
       -osssssso.      :ssssssso.      CPU: AMD Ryzen 7 2700 Eight-Core @ 16x 3.2GHz
      :osssssss/        osssso+++.     GPU: NVIDIA GeForce RTX 4060 Ti
     /ossssssss/        +ssssooo/-     RAM: 43960MiB / 64250MiB
   `/ossssso+/:-        -:/+osssso+-  
  `+sso+:-`                 `.-/+oso: 
 `++:.                           `-/+/
 .`                                 `/
@patrickelectric patrickelectric added the bug Something isn't working label Oct 7, 2024
@jean-roland
Copy link
Contributor

I did some latency measurements on the esp32 and for payloads <1kB latency, it hovers around 9-11ms. Seems it's pretty good for esp32 and wifi. I tried the same pico setup on PC to PC and I get 4-6ms, I get similar results by cutting pico and using ICMP pings. So the issue here seems to be wifi latency performance.

I don't know if it's applicable or not for you usecase, but now we have introduced message batching, allowing you to queue multiple data before sending a packet on the network.

The exact setup I used was PC(wifi) ->(ping) esp32(wifi) ->(pong) PC(wifi) on a wifi network as quiet as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants