[btrfs] support dynamic_reclaim#2164
Conversation
|
Hi @motiejus. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Currently btrfs offers 3 methods to balance the filesystem:
1. beginning of time: `btrfs filesystem balance`.
2. kernel v5.19+: `/sys/fs/btrfs/UUID/allocation/{meta,}data/bg_reclaim_threshold`.
3. kernel v6.11+: `/sys/fs/btrfs/UUID/allocation/{meta,}data/dynamic_reclaim`.
(3) is most robust out of the 3, and best documented in the kernel commit
[f5ff64ccf7bb7274ed66b0d835b2f6ae10af5d7a](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f5ff64ccf7bb7274ed66b0d835b2f6ae10af5d7a).
Once GKE rolls up to the kernel v6.11, this will be the recommended
option to set.
1f0771e to
dbaa4ae
Compare
| - `btrfs-data-bg_reclaim_threshold`: `/sys/fs/btrfs/FS-UUID/allocation/data/bg_reclaim_threshold`. Supported on Linux v5.19+. | ||
| - `btrfs-metadata-bg_reclaim_thresho: `/sys/fs/btrfs/FS-UUID/allocation/metadata/bg_reclaim_threshold`. Supported on Linux v5.19+. | ||
| - `btrfs-data-dynamic_reclaim`: `/sys/fs/btrfs/FS-UUID/allocation/data/dynamic_reclaim`. Supported on Linux v6.11+. | ||
| - `btrfs-metadata-bg_reclaim_thresho: `/sys/fs/btrfs/FS-UUID/allocation/metadata/bg_reclaim_threshold`. Supported on Linux v6.11+. |
| - `btrfs-data-bg_reclaim_threshold`: `/sys/fs/btrfs/FS-UUID/allocation/data/bg_reclaim_threshold`. | ||
| - `btrfs-metadata-bg_reclaim_thresho: `/sys/fs/btrfs/FS-UUID/allocation/metadata/bg_reclaim_threshold`. | ||
| - `btrfs-data-bg_reclaim_threshold`: `/sys/fs/btrfs/FS-UUID/allocation/data/bg_reclaim_threshold`. Supported on Linux v5.19+. | ||
| - `btrfs-metadata-bg_reclaim_thresho: `/sys/fs/btrfs/FS-UUID/allocation/metadata/bg_reclaim_threshold`. Supported on Linux v5.19+. |
|
|
||
| - `btrfs-data-bg_reclaim_threshold`: `/sys/fs/btrfs/FS-UUID/allocation/data/bg_reclaim_threshold`. | ||
| - `btrfs-metadata-bg_reclaim_thresho: `/sys/fs/btrfs/FS-UUID/allocation/metadata/bg_reclaim_threshold`. | ||
| - `btrfs-data-bg_reclaim_threshold`: `/sys/fs/btrfs/FS-UUID/allocation/data/bg_reclaim_threshold`. Supported on Linux v5.19+. |
There was a problem hiding this comment.
Might be nice in these docs to put the values supported; eg it wasn't obvious to me that dynamic_reclaim took 0/1.
|
@mattcary upon closer inspection I found that I got the setting names wrong in the first place! I converted it to a table now, added value ranges and a bit of explanation for each setting. |
|
/ok-to-test |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattcary, motiejus The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@motiejus: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently btrfs offers 3 methods to balance the filesystem:
btrfs filesystem balance./sys/fs/btrfs/UUID/allocation/{meta,}data/bg_reclaim_threshold./sys/fs/btrfs/UUID/allocation/{meta,}data/dynamic_reclaim.(3) is most robust out of the 3, and best documented in the kernel commit f5ff64ccf7bb7274ed66b0d835b2f6ae10af5d7a. Once GKE rolls up to the kernel v6.11, this seems to be the best/recommended option to set.
Fixes #2163
Special notes for your reviewer:
So far we have landed all btrfs-specific options we use today. However, it's quite certain we will move from
bg_reclaim_thresholdtodynamic_reclaimwhen we catch up on the kernel.Does this PR introduce a user-facing change?: yes.