one side of mirror not being read

All your general support questions for OpenZFS on OS X.

one side of mirror not being read

Postby scasady » Fri Mar 29, 2024 9:00 am

I have a pool of mirrors. In one of them one of the disks shows 0 reads in zpool iostat. It is written to just as much as its partner
but very rarely read from.
A reboot shows it behaving normally but eventually the reads again got to zero.
Is this a matter for concern, maybe the drive is going to fail? No errors are shown.
scasady
 
Posts: 4
Joined: Thu Mar 26, 2015 11:59 am

Re: one side of mirror not being read

Postby Haravikk » Sun Mar 31, 2024 2:07 am

Are you running zpool iostat with an interval (e.g- "zpool iostat tank 30" for every 30 seconds)? Replacing tank for your pool name.

IIRC if you just run zpool iostat directly, the results you get back are an average over time since the pool was imported, so it may show "0" after rounding if a disk is being used only lightly. You may want to try running with a short interval during different types of load to see what ZFS is actually doing, e.g- run "zpool iostat tank 1" then start playing a big movie file, or copy it somewhere (since this isn't limited by playback speed), to see if it's sending read requests to both disks when the load is higher. You want to let it run the interval a few times, as the first result is the same average you get back when you don't set an interval.

ZFS does do some fancy load-balancing; in general if you do a lot of reading of large files, ZFS should read from both sides of the mirror, however it also takes into account the average latency and speed of each drive somehow, so it will prioritise fetching more data from a faster drive rather than waiting for a slower one, if it thinks sending requests to the same drive will still end up faster. This means that if your workload isn't pushing the faster drive to its limit then ZFS may send most of the reads to the faster of the two drives.

You might also try running "zpool iostat -l tank" to get the average latencies for each drive, this might give you some indication of why ZFS is prioritising one of them; if the less frequently used drive has longer latencies then that could account for why ZFS is seeing it as slow. You can also run "zpool status -s tank" to see if ZFS is identifying it as a slow disk (operations took longer than a threshold amount of time to execute, I forget how long that is but it's several seconds at least).
Haravikk
 
Posts: 83
Joined: Tue Mar 17, 2015 4:52 am


Return to General Help

Who is online

Users browsing this forum: No registered users and 5 guests