When writing content to removable devices on Linux (USB sticks/HDDs, SD cards, etc), I often see incredible write speeds in the first few seconds, sometimes in the order of GB/s (filling of the write buffer) followed by several minutes of quiet (buffer actually being written to the device).
It's misleading. It makes it hard to judge the actual write speed. It's annoying (can't interrupt a program while it's flushing buffers). It can cause FS damage, and at the very least unwritten content when the device is unplugged while it's still being written.
The write buffer appears to be over a GB in my case. Is there a way to control it? I'd like to reduce it to a more sensible value.
Note: This is not about filesystem cache, this effect also appears on raw devices
Note: I do not want to disable write buffers entirely