Urgent.News

What's breaking now, across hundreds of outlets.

Tech

The bytes the driver threw away

Altar is the small ESP32 screen on my desk. It shows what the night crew is doing, and it reads its pictures from an SD card. To get a new file of about half a gigabyte onto that card, a hub program on my Mac sends it over USB in small pieces. How many pieces it may send before waiting for an answer is called the window . When a piece arrives broken, the screen asks for it again, and the sender…

Altar is a small screen on the desk that displays the activity of the night crew. It reads pictures from an SD card using small pieces transferred over USB. When a piece arrives broken, the screen asks for it again, leading to a rewind. The source material explains how increasing the window size resulted in more rewinds and no speed improvement, with four kilobytes being lost.

The USB driver copies data into a receive ring buffer, which is set to 4,096 bytes. The driver checks the data, writes it to the SD card, and the process repeats. The analysis showed that the window size affects the buffer, and increasing it leads to losses in specific positions. The research found that window 8 resulted in 55 rewinds at a specific offset, while window 4 had zero rewinds.

The lesson is that a bigger window is not a speed setting but a buffer management issue that needs addressing.

Rewritten by urgent.news; may contain errors — check the original. How we use AI.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

We track opens and clicks to improve the newsletter.

See today's edition · More options

More in Tech

More from Sunday, 6 December 2026 →