-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Allow opt-in of zvol blocks in special class #14876
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for extending this!
tests/zfs-tests/tests/functional/alloc_class/alloc_class_016_pos.ksh
Outdated
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/alloc_class/alloc_class_016_pos.ksh
Outdated
Show resolved
Hide resolved
d3dd86a
to
c04bd08
Compare
I might wonder if we would want a tunable defaulted to 0 like (Really, I'd like a pool property for it, not a global, but I don't know how backward compatible those are...) |
@rincebrain Ah, interesting point! I somehow missed that |
I think a new property would be a good option too, given the very different constraints involved, though the semantics might be weird because people will be annoyed if it can't be inherited and they have to manually set it, but setting a noop property on filesystems just so it's inherited on volumes is also unfortunate... |
Does this also respect the metadata reserve % tunable? |
yes |
Note that the other volume-specific properties are not inheritable. If you want all your zvols to have the same |
Zvols don't have children, so there is nothing to inherit. |
Yes, zvols can't have children. But unlike, say, volblocksize or refreservation, where the values don't make sense to inherit and are zvol specific, whether you store it on the special vdev might make sense to inherit, but just reusing Idea: A novel property on zvols, |
what is the current status of this? will it be included in the next release? |
Are there any plans for this MR? |
@don-brady Can you may rebase this and ask the maintainers whats left to get it integrated? Much thanks in any case! |
Hello @don-brady, can I politely ask for rebasing? Looking forward to this feature. Much thanks in advance. |
@behlendorf It is possible to get this into 2.3? |
This is something we could consider for 2.3 if @don-brady has the cycles to wrap up the lose ends and get it rebased. |
this would indeed be phantastic. I would contribute if I could, but I am still trying to get started at all. 😂 |
Can I may politely ask @don-brady one last time to finish this up to getting it ready for 2.3 ? Much thanks. |
@don-brady Any idea if you ever will have the time to finish this? |
Hi, I would really benefit from this feature, here's my usecase: Without this patch:
With this patch:
This patch is quite simple, I could rebase it on current master if needed. However I have zero experience with zfs source code and will not be able to modify the implementation according to the discussion in this thread. As a side note: please do give feedback on my proposed setup, it would help a lot prevent mistakes, thanks :) |
Option 4 is basically how I run all my data. |
Thank you! :) |
Please do the rebase and try to merge it! also considering your other questions. I would also do option 4. |
Got it, however for my home setup I have only one node so migration is not an issue. Thanks! |
there you go, rebased :) |
Maybe tag him in the correct PR (yours) instead of here. |
That being said @amotin this might be of interest for iX-Systems to finish off as well: In previous iterations of TrueNAS, we could use raw-backed VM disks to "force" small blocks to go to special vdevs. Considering the "barely any" hours needed to patch this up, this might be of interest of your employer as well. |
c04bd08
to
5c8df4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've rebased the branch. Lets see what CI tell.
Signed-off-by: Don Brady <[email protected]>
5c8df4d
to
60f04ac
Compare
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes openzfs#14876
Motivation and Context
The zfs
special_small_blocks
property allows a dataset to opt-in to using the special vdev class for small block allocations. This property is currently considered valid for filesystems but invalid for volumes. This distinction is somewhat arbitrary for an opt-in policy. In some situations, a small volume (relative to the size of the special class) might benefit from using the special class.Description
Allow setting
special_small_blocks
property for volumes. This is effectively a policy change and not tied to a feature flag (other thanfeature@allocation_classes
).Note: there are no guardrails in place when setting this property and it is possible to oversubscribe the special class with more blocks than could possibly fit. This is not fatal but might be less than ideal from a performance perspective.
How Has This Been Tested?
Manually tested adding a zvol with
special_small_blocks
set and confirmed allocations went to the special class.Added new ZTS test to confirm it works:
functional/alloc_class/alloc_class_016_pos
Also imported pool with
special_small_blocks
set on a zvol using an older zfs kernel module.Types of changes
Checklist:
Signed-off-by
.