On 11/6/26 20:18, Heinrich Schuchardt wrote:
> U-Boot runs single threaded without interrupts.
>
> Don't the TCP timeouts caused by writing to a block device make this
> streaming highly inefficient?
>
> What throuput do you reach on an embedded device. Not the sandbox.

No timeouts: wget calls altcp_recved() only after the sink returns,
so the TCP window holds the server back while the card is written.
ROCK Pi 4A, SD card: 9.1 MiB/s with a 4 MiB buffer (1862270976 bytes
in 3 min 16 s). Download to RAM (22.5-27.7 MiB/s) plus mmc write
(16.1 MiB/s) would take 174-189 s on the same board.

Compressed input is not in this series, but whatever replaces it
should leave room for it, and there timeouts do matter: a small chunk
can expand into a long write, and the server may drop the connection
on its send timeout. Two ways: reconnect with a Range request from the
received offset (simple), or buffer the input and reopen the window
in small steps while writing (much more complex). We'd prefer the
first.

Igor

Reply via email to