Open AllKind opened 1 year ago
This looks right to me. I might be completely wrong, but from what I've seen, ZFS will use up as much space as it can until a drive reaches 80% or so, and then it slowly drips in more data.
Depending on the ZFS version, one of the devs was saying it would add data based on the speed it could write that data, so faster drives got priority. He also said that as a drive fills up, it slows down, so drives with more capacity would start being utilized more, and you'd have this uneven, but fast distribution of data.
I don't have any sources. I remember hearing it in an OpenZFS talk.
@Sawtaytoes Thank you for your answer. After I created this post, I read in another issue here a comment from amotin, confirming the priority for faster drivers. Which in my case are the scsi-WHATEVER named drives. I didn't know about the 80% threshold. Would be nice if a developer could confirm that.
@Sawtaytoes Thank you for your answer. After I created this post, I read in another issue here a comment from amotin, confirming the priority for faster drivers. Which in my case are the scsi-WHATEVER named drives. I didn't know about the 80% threshold. Would be nice if a developer could confirm that.
I second this - I'd be very interested to see some official documentation explaining how zfs writes to virtual devices (especially unbalanced virtual devices), rather than word of mouth.
I wish I had a source. I got this from watching an OpenZFS talk, and I have no memory of the same.
All my zpools use the same types of drives, so I can't verify. It's a rarer scenario to have HDD and SSD mixed as data vdevs.
I bet there are some tuning parameters you can tweak though.
I'm using raidz2 with 7 14TB drives, and 7 16TB drives - the 14TB vdev is at 90% capacity, the 16TB vdev is at 50% capacity. Writing 157 GB of data (after compression), 83% went to the 16TB vdev and 13% went to the 14TB vdev.
The 14TB drives were operating at 98% utilisation, the 16TB drives were operating at 60% utilisation.
@AlistairMcCutcheonIAS How about rotation speed? Same, or different for the 14T and 16T drives?
My smaller vdev drivers rotate at 5400, the bigger ones at 7200. It would be nice to have some tunable(s) there. Something like: prefer-fast-drives = on|off, balance-distribution-threshold = XX% (percent), prefer-vdev-with-more-space = XX% (percent). Just ideas...
Wish to Santa: Bring us Block Pointer Rewrite! ;-)
System information
Describe the problem you're observing
Short summary: I have one pool containing two raidz2 vdevs. One vdev has 8 x 8TB hdds, the other 8 x 14TB hdds. Now the problem is, that I observe data distribution is not equally balanced between the two vdevs.
This is my pool layout:
I'm just a "regular user" and I store mostly video content on my pool. Originally I had only the 8 x 8TB WDC drives (internal). When space was getting short, I bought an external enclosure (connected over Thunderbolt 3) and the 8 x 14TB Seagate drives. With the help of people in zfsonlinux.topicbox.com/groups/zfs-discuss I migrated the data into this new pool with the following procedure: 1: copy all data to a new pool on the new enclosure. 2: delete the old pool and create a new vdev on the new pool.
From what I've read and was told at zfs-discuss, zfs should balance distribution of the data. But for a while now I observe the gap growing. It looks to me there is more data written to the bigger vdev (raidz2-0), which actually has less free space left. This is the output of
zpool list -v
taken 3 times over the last couple of weeks:So if it's true, that new data should be distributed equally, meaning balancing the available space on each vdev to an approximately equal value, then I would tend to call the observed behavior a bug. If not, then I'm sorry for creating a bug report. But still I would like to ask for help on how to get the data/free space balanced across my vdevs?
For completeness: The pool was created with zfs v.0.8x and I did not yet run a feature upgrade on it. The output of
zpool get all
:The output of
zfs list -o space,compression,compressratio,encryption,recordsize,mountpoint,mounted -t filesystem
:Thank you very much in advance for your help (and of course a big thank you to all developers and contributors)!