vm.dirty_bytes should be set to something sane

Bug #908279 reported by Daniel Levine
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-lts-backport-oneiric (Ubuntu)
New
Undecided
Unassigned

Bug Description

Linux has developed a reputation for sluggish performance under heavy disk I/O, e.g. during system updates. This seems to be mostly due to its inability to distinguish urgent tasks from I/O hogs, resulting in preferential treatment of hogs (and thus sluggishness under load). This applies even on very high-end computers.

On a server, this (probably) doesn't matter a great deal. On a desktop, it matters a lot, because users will generally not tolerate sluggishness, especially on computers that are supposed to be fast (as a famous company from Redmond discovered when they released a shiny new OS in 2007). Since Ubuntu is primarily a desktop distribution, and currently the most popular, I think it would be a good idea to try and solve this issue.

The only solution that I know to work reliably is to set vm.dirty_bytes (and vm.dirty_background_bytes) to something relatively low. This forces programs to make smaller and more frequent writes to the disk, preventing processes from hogging huge amounts of I/O bandwidth. In my experience, 4 MB (4194304 bytes) is a sane value; it increases responsiveness under load (and even during desktop startup) greatly, while only reducing throughput by a few MB/s on modern computers. Since I care more about latency than throughput, I consider this a decent tradeoff.

The only major issue I can see with this change is that it might increase wear on SSDs; but I'm not sure how much, or if it's worth making an exception for SSDs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.