adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.12k stars 1.22k forks source link

Pico-W: bad network throughput running as a webserver #9837

Open bablokb opened 15 hours ago

bablokb commented 15 hours ago

CircuitPython version

at least since 8.0.5

Code/REPL

see https://github.com/bablokb/circuitpython-examples/tree/master/webserver

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 https://github.com/adafruit/circuitpython/pull/9826#issuecomment-2500759235

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.

bablokb commented 5 hours ago

See this post: https://forums.raspberrypi.com/viewtopic.php?t=339512

They claim using iperf they see

near 10 Mbits/sec at data size greater than 1 MByte

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.