You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a knob for the btrfs-specific `bdi/read_ahead_kb`. If my
understanding is correct, this value is the upper limit of the btrfs
read-ahead of the _underlying file_.
Confusingly, this option is not related to
`/sys/block/sdX/queue/read_ahead_kb`, which is what controls the
read-ahead of the block device (regardless of what's in there). The
current `read_ahead_kb` "special" mount option configures the value of
the block device.
The default `bdi/read_ahead_kb` is 4MiB (on all the systems I've
checked). Ext4 does not have this option and relies on the block-device
specific readahead, which is 128KiB (again, on all the systems I've
checked). After migrating to btrfs we have experienced a notable write
amplification and tracked to this setting. Once we changed
`bdi/read_ahead_kb` to 128, our IO utilization (and the properties of
the underlying workload) became very similar to the one of ext4.
Now that we have 3 btrfs-specific "special" mount options, I refactored
the code and tests to make it less repetitive.
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,12 +98,13 @@ Controller-level and node-level deployments will both have priorityClassName set
98
98
As noted in [GCP PD documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/gce-pd-csi-driver), `ext4` and `xfs` are officially supported. `btrfs` support is experimental:
99
99
- As of writing, Ubuntu VM images support btrfs, but [COS does not](https://cloud.google.com/container-optimized-os/docs/concepts/supported-filesystems).
100
100
101
-
`btrfs` filesystem accepts two "special" mount options:
101
+
`btrfs` filesystem accepts the following "special" mount options and the sysfs paths they target:
Which writes to `/sys/fs/btrfs/FS-UUID/allocation/{,meta}data/bg_reclaim_threshold`, as documented[in btrfs docs](https://btrfs.readthedocs.io/en/latest/ch-sysfs.html#uuid-allocations-data-metadata-system).
107
+
See more in the[in btrfs docs](https://btrfs.readthedocs.io/en/latest/ch-sysfs.html#uuid-allocations-data-metadata-system).
0 commit comments