openzfs-docs icon indicating copy to clipboard operation
openzfs-docs copied to clipboard

Clarification of write throttling module parameter documentation

Open LiSongMWO opened this issue 3 years ago • 2 comments

System information

https://openzfs.github.io/openzfs-docs/

Describe the problem you're observing

When reading openzfs-docs/zfs-dirty-data-max (and related pages) the phrase

zfs_dirty_data_max takes precedence over zfs_dirty_data_max_percent.

could be more useful. What action must the user take to specify zfs_dirty_data_max_percent and have the intended effect? I think we should clarify the wording as I'm not sure which one of these are correct:

  • Not setting zfs_dirty_data_max in the modprobe config? Well the module parameter has a default value set anyway so this doesn't seem correct?
  • Set zfs_dirty_data_max to zero? That could just as well disable the dirty data buffer...
  • Specify zfs_dirty_data_max_percent after zfs_dirty_data_max? It's not clear if the order of statements matter in the modprobe conf file, and "takes precedence" kind of implies that order shouldn't matter.

Describe how to reproduce the problem

Read the manual sections mentioned above :)

Include any warning/errors/backtraces from the system logs

N/A

LiSongMWO avatar Apr 08 '22 16:04 LiSongMWO

Perhaps we can be more clear in that if zfs_dirty_data_max is set, then zfs_dirty_data_max_percent is ignored.

There are several other similar max vs percent precedents.

richardelling avatar Apr 11 '22 21:04 richardelling

So to clarify, if I set zfs_dirty_data_max_percent and do not set zfs_dirty_data_max it should work?

As a side note, setting zfs_dirty_data_max=0 will permanently freeze all IO the pool until you reboot. Even if you set it higher afterwards. Not sure if this is considered a bug or holding it wrong (I was confused because that's the way vm.dirty_bytes/ratio works). Let me know if you want me to file another bug for it.

LiSongMWO avatar Apr 12 '22 17:04 LiSongMWO