On 2023/1/5 06:17, Anand Jain wrote:
On 1/4/23 16:21, Qu Wenruo wrote:
We introduced scrub speed throttle in commit eb3b50536642 ("btrfs: scrub:
per-device bandwidth control"), but it is not that well documented
(e.g. what's the unit of the sysfs interface), nor tested by any test
This patch will add a test case for this functionality.
The test case itself is pretty straightforward:
- Fill the fs with 2G file as scrub workload
- Set scrub speed limit to 50MiB/s
- Scrub and compare the reported rate against above 50MiB/s throttle
However the test case has an assumption that the underlying disk must be
faster than our 50MiB/s, which should be pretty common in
But for cloud environment it's not ensured 100%, thus the test case is
not included in auto group to avoid false alerts.
Why not scrub the data twice: first to determine the speed, and then to
check if it can be throttled to ~50%?