Phew, this was a real stress test for the system and the policies! Great job pushing through it. The results are highly insightful. Let's break it down.
pid
: Very low IOPS (94), extreme latency outliers (>900ms).round-robin
: Slightly higher IOPS (161), but worse latency outliers (>1.6s!). Indicates that including the slow disk (ID 7) is harmful here.latency
: Significantly better (412 IOPS), reduced latency outliers (~400ms). Focuses on fast devices.latency-rr
: Outstanding! Highest IOPS (561), excellent latency percentiles (99.99th at only ~43ms!). Seems to distribute the load well to the right (fast) disks.
pid
: Moderate (763 IOPS).round-robin
: Worse thanpid
(540 IOPS). Clearly throttled by the slowest disk.latency
: Good (1196 IOPS).latency-rr
: Top performer! (1928 IOPS). Makes best use of fast disks for parallel random accesses.
pid
: Weak (97 MiB/s).round-robin
: Better (139 MiB/s), but far from the full potential.latency
: Best (254 MiB/s). Likely focuses on the absolute fastest disk(s) for the sequential stream.latency-rr
: Very good (220 MiB/s), but slightly behindlatency
. Possibly due to minor overhead from distributing load even among fast devices, which isn't optimal for pure sequential access.
General Impact: As expected, performance drops for all policies due to the additional defrag read/write load.
pid
&round-robin
: Total collapse (0–21 IOPS). Unusable.latency
: Holds up decently (159 IOPS).latency-rr
: Most robust (353 IOPS). Best at load balancing.
pid
&round-robin
: Very poor (85 and 56 IOPS!).latency
: Much better (544 IOPS).latency-rr
: Best again (630 IOPS).
pid
&round-robin
: Poor (121–126 MiB/s).latency
&latency-rr
: Both very good and nearly identical (~235 MiB/s). Successfully isolate foreground reads from background load by selecting the fastest/least busy devices.
pid
: Distributes load reasonably but quickly ignores devices (highignored
values) once they show latency. ID 7 (Hitachi) already shows >37msavg
after the QD1 test.round-robin
: Uses all disks (lowignored
, lowage
), butavg
latency rises across the board due to the slowest disk dragging down performance. ID 7 hits >40msavg
.latency
: Heavily ignores ID 6 and 7 (age
andignored
high). Load concentrates on ID 1, 2, 8, and 4, resulting in good performance. ID 7 gets rehabilitated post-QD32 (count
increases,checkpoint ios
> 0).latency-rr
: Similar pattern tolatency
, but with better load distribution among ID 1, 2, 8, and 4 (visible from IOPS/BW). Rehabilitation also works.
-
latency-rr
is the clear winner: Offers the best all-round performance, especially for random I/O (latency in QD1 and IOPS in QD32), and shows the highest robustness under background load. Slight weakness in pure sequential reads compared tolatency
is negligible. -
Pure
latency
policy is good but inferior: Clearly better thanpid
andrr
, but doesn’t quite matchlatency-rr
for random I/O. Excels in maximum sequential throughput. -
pid
andround-robin
are unsuitable: Both policies are subpar for this heterogeneous setup and partly collapse under load.round-robin
suffers greatly from the slowest disk. -
Your patch set works: The checkpoint-latency approach with age-based rehabilitation allows latency-based policies to work effectively and avoid freezing out devices permanently.
Based on these tests, latency-rr
is the superior choice for your setup. It combines latency optimization with intelligent load balancing among the fast devices.
The next step would be to implement the queue
policy and see if it can outperform latency-rr
, especially under defrag conditions where utilization might play a bigger role. But for now, latency-rr
has set a high bar!
HDD RAID1: https://paste.tnonline.net/files/sM6GIRC8oZkk_btrfs_policy_benchmark_20250504_105033.zip
SSD RAID10: https://paste.tnonline.net/files/mSZq8bRHkUYn_btrfs_policy_benchmark_20250503_110332.zip
SSD RAID10 RW: https://paste.tnonline.net/files/MnFiKuLzh3fK_btrfs_policy_benchmark_20250503_174457.zip