https://docs.kernel.org/admin-guide/sysctl/vm.html#dirty-bac...
The values are crazy high by default (on modern hardware anyway): 10% of memory for dirty_background_bytes and 20% for dirty_bytes. I wonder why no distro touches these.
https://docs.kernel.org/admin-guide/sysctl/vm.html#dirty-bac...
The values are crazy high by default (on modern hardware anyway): 10% of memory for dirty_background_bytes and 20% for dirty_bytes. I wonder why no distro touches these.
I wish I could configure Windows the same way: whenever it can use RAM to avoid an extra disk write/read - it should.
Another set of people also complain Linux takes too long to safely unplug USB drives.
I've lost data as a side effect of a simple file transfer timing out.
There's no one-size-fits-all answer, which is why it's a tunable.
On my desktop with 32GB ram, I can even get audio to skip when ripping DVD's to disk. That's because practically the entire movie fits into ram before Linux decides to start the writeback process, and that writeback process will hog the disk for almost a minute. Or it used to, until I reduced the buffer size by a full order of magnitude.
This is just another sad example of buffer bloat: the inability to tune data buffers to the capacity of the underlying stream.
It's a real problem.
That's exactly what happens. The server ACKs data until it fills its write buffer, and then stalls unresponsive until the entire buffer is flushed to disk. If it takes longer to flush the buffer to disk than the client's timeout, it gives up.
I have personally watched this happen via wireshark where the server doesn't ACK for more than 10 minutes.
About 4-5 years ago, i was working on a project, and part of that was copying big amounts of data to a system via nfs. At 30 minutes exactly, nfs would croak, transfer fails.
I think this buffer fill and empty flow was fucking killing it. Its a shame i dont work there anymore, id definitely wanna try tweaking these settings and see if i could solve it
And it's the vm.dirty* settings to change to fix it as described here: https://lonesysadmin.net/2013/12/22/better-linux-disk-cachin...
You can confirm by watching /proc/meminfo and watching the Dirty and Writeback numbers.
Changing up the vm.dirty* settings can help as described here:
https://lonesysadmin.net/2013/12/22/better-linux-disk-cachin...
Yeah, I/O blocks drive me mad every time. They are more noticeable on Windows though. Perhaps that's because Windows doesn't RAM-cache enough and I do a lot of USB I/O (USB NIC, USB drives).
> Another set of people also complain Linux takes too long to safely unplug USB drives.
If only it had an APIs to see how much RAM of a specific device is RAM-cached rigth now and visualize the progress of flushing that cache... Unvisualized long I/O (incl. caching) operations, let alone those freezing the UI, indeed feel bad and are a UX bug.
One of the key reasons I prefer Linux over Windows is Linux is much more rare to freeze, no matter the workload.
This is a typo, should have been "If only it had an APIs to see how much of a specific device is RAM-cached right now".