1

I have a slow device and I want to limit file system write cache for that device. Therefore I have already changed setting /sys/devices/virtual/bdi/x:y/max_ratio

However that limit is only effective if half of vm.dirty_ratio+vm.dirty_background_ratio is in use already. So it will still fill half of the dirty pages when writing large amounts of data. I want max_ratio to be effective always. I found out there is another setting "strictlimit", but I can't find out how to toggle that option. The file /sys/devices/virtual/bdi/x:y/strictlimit which is mentioned on some places is missing on my system (Debian 8).

How do I set option "strictlimit" to active?

  • If a file in /sys or /proc is "missing", that typically means that it's not supported by your running kernel (since those file systems are synthesized by the kernel and basically mirror kernel data structures) or that hardware support is missing. A simple way to test this could be to boot into something more recent (Debian isn't exactly renowned for its bleeding edge versions of packaged software), maybe Debian Unstable or Fedora or even the latest Ubuntu release, and look to see if it's there. If it is, it's likely just a matter of your ordinary system not having a recent enough kernel. – a CVn Jun 17 '18 at 6:35
0

There is not such a setting in sysfs. The patch was not accepted into mainline. You would need a kernel with the patch applied.

https://lore.kernel.org/lkml/20131122154505.3e686fcfc584534d555399e5@linux-foundation.org/

Well the patch is certainly simple and straightforward enough and seems like it will be useful. The main (and large!) downside is that it adds to the user interface so we'll have to maintain this feature and its functionality for ever.

Given this, my concern is that while potentially useful, the feature might not be sufficiently useful to justify its inclusion. So we'll end up addressing these issues by other means, then we're left maintaining this obsolete legacy feature.

So I'm thinking that unless someone can show that this is good and complete and sufficient for a "large enough" set of issues, I'll take a pass on the patch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.