Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify read performance note #781

Open
calumapplepie opened this issue Apr 25, 2024 · 1 comment
Open

Clarify read performance note #781

calumapplepie opened this issue Apr 25, 2024 · 1 comment
Labels
docs Changes in documentation or help text

Comments

@calumapplepie
Copy link

The btrfs readthedocs, which is sourced from this repository, says the following at this link:

"The simple redundancy RAID levels utilize different mirrors in a way that does not achieve the maximum performance. The logic can be improved so the reads will spread over the mirrors evenly or based on device congestion."

Where is this logic? What can be improved about it? Is this suggesting that, in current kernels, reads on a RAID1 filesystem go directly to the same disk, every time, rather than being distributed between the 2? Is this statement out-of-date?

@Zygo
Copy link

Zygo commented Apr 26, 2024

See find_live_mirror in fs/btrfs/volumes.c. There is a read policy framework which would allow defining better read policies, but to date only one has been implemented: the PID policy, which assigns threads to devices based on PID.

You can read about an earlier attempt from 2021 here and here. The alternative policies were dropped due to various issues.

@kdave kdave added the docs Changes in documentation or help text label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Changes in documentation or help text
Projects
None yet
Development

No branches or pull requests

3 participants