-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Pico-W: bad network throughput running as a webserver #9837
Comments
See this post: https://forums.raspberrypi.com/viewtopic.php?t=339512 They claim using iperf they see
But this is with the Pico-W running as a client and it is a huge data size for an MCU, so this is not realistic in any way. |
@bablokb Thank you for opening the issue and providing the diagnostic. I was able to easily reproduce the performance glitch. Capturing a trace with WireShark, I can see that TCP PSH/ACK packets from the server are sometimes delayed by up to 500 ms. Interestingly, the delayed packets always arrive on exact 500 ms offsets from the start of the trace, i.e., +4.620 ms, +5.120 ms, and so on. This tells me that ACKs from the client aren't always causing an IRQ or the IRQ is getting ignored. The reason we're beating at 500 ms is that a periodic timer in CircuitPython (or less likely the CYW43) is causing a poll of pending interrupts to occur. |
I ported iperf to CircuitPython: https://github.com/bablokb/circuitpython-iperf. Might be useful for anybody tweaking network code. Still needs some polishing and it is currently only tested with a Pico-W. The results reproduce what we already know:
The first run is my laptop sending data, the second run (with the |
CircuitPython version
Code/REPL
Behavior
see below
Description
The example scenario runs a webserver. The main page sources a number of js and css-files. This triggers multiple parallel requests from the browser to the server. Total download size is about 140KB, throughputs (measured as total download time from within the browser development tools) are as follows:
Additional information
This issue is opened on request of @eightycc, see #9826 (comment)
Searching the web for throughput figures for the Pico-W does not turn up many results. Some tests use iperf, but this is an artificial tool and does not test the given scenario. But maybe iperf could help to track down the cause. It seems there is a Python/MicroPython version available, so it might be worth a look.
The text was updated successfully, but these errors were encountered: