-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add tunable to allow changing micro ZAP's max size #14292
Conversation
a8c4045
to
1fd3e1a
Compare
I forced push to fix the author of the commit (it should be @tsoome first of all) and to resolve a merge conflict in man/man4/zfs.4. |
For sizes >= 512KB it may worth to investigate increase the last argument of zfs_btree_create_custom() a bit to avoid additional level in the B-tree. It is a balance between memory usage for small directories, insert/remove cost and search cost. And I think shrinking of the micro ZAP should be quite easy to implement and good for performance. The bigger you set the maximum size, the more you start wasting memory and CPU without ability to shrink it back. |
This change turns `MZAP_MAX_BLKSZ` into a `ZFS_MODULE_PARAM()` called `zap_micro_max_size`. As a result, we can experiment with different micro ZAP sizes to improve directory size scaling. Co-authored-by: Mateusz Piotrowski <[email protected]> Signed-off-by: Mateusz Piotrowski <[email protected]> Sponsored-by: Wasabi Technology, Inc.
1fd3e1a
to
fce7916
Compare
Rebased and fixed a checkstyle issue ( |
Thanks! |
This change turns `MZAP_MAX_BLKSZ` into a `ZFS_MODULE_PARAM()` called `zap_micro_max_size`. As a result, we can experiment with different micro ZAP sizes to improve directory size scaling. Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Mateusz Piotrowski <[email protected]> Co-authored-by: Toomas Soome <[email protected]> Signed-off-by: Mateusz Piotrowski <[email protected]> Sponsored-by: Wasabi Technology, Inc. Closes openzfs#14292
This change turns `MZAP_MAX_BLKSZ` into a `ZFS_MODULE_PARAM()` called `zap_micro_max_size`. As a result, we can experiment with different micro ZAP sizes to improve directory size scaling. Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Mateusz Piotrowski <[email protected]> Co-authored-by: Toomas Soome <[email protected]> Signed-off-by: Mateusz Piotrowski <[email protected]> Sponsored-by: Wasabi Technology, Inc. Closes openzfs#14292 (cherry picked from commit a4b21ea)
This change turns
MZAP_MAX_BLKSZ
into aZFS_MODULE_PARAM()
calledzap_micro_max_size
. As a result, we can experiment with different micro ZAP sizes to improve directory size scaling.Co-authored-by: Mateusz Piotrowski [email protected]
Signed-off-by: Mateusz Piotrowski [email protected]
Sponsored-by: Wasabi Technology, Inc.
Motivation and Context
Having those additional tunables enables users to experiment with different micro ZAP sizes to improve directory size scaling.
Description
The patch introduces a variable in place of the
MZAP_MAX_BLKSZ
constant. Additionally, the new variable can be set as a ZFS module parameter (viaZFS_MODULE_PARAM
).How Has This Been Tested?
We've run this patch during some of Klara's recent benchmarks.
gmake cstyle
is OK.Types of changes
Checklist:
Signed-off-by
.