Skip to content
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

Disable user space reference tracking #10189

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

The memory and cpu cost of reference count tracking with the current
implementation is significant. For this reason it has always been
disabled by default for the kmods. Apply this same default to user
space so ztest doesn't always incur this performance penalty.

Our intention is to reenable this by default for ztest once the code
has been optimized. Since we expect to at some point provide a FUSE
implementation we wouldn't want this enabled by default for libzpool.

Note: There's some reason to believe this may eliminate / reduce a
class of ztest failures observed by the CI but not in local testing.

Description

By default disable user space reference tracking.

How Has This Been Tested?

Locally compiled and ran zloop.sh.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

The memory and cpu cost of reference count tracking with the current
implementation is significant.  For this reason it has always been
disabled by default for the kmods.  Apply this same default to user
space so ztest doesn't always incur this performance penalty.

Our intention is to reenable this by default for ztest once the code
has been optimized.  Since we expect to at some point provide a FUSE
implementation we wouldn't want this enabled by default for libzpool.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Apr 9, 2020
@codecov-io
Copy link

codecov-io commented Apr 10, 2020

Codecov Report

Merging #10189 into master will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10189      +/-   ##
==========================================
- Coverage   79.40%   79.33%   -0.07%     
==========================================
  Files         385      385              
  Lines      122603   122603              
==========================================
- Hits        97350    97271      -79     
- Misses      25253    25332      +79     
Flag Coverage Δ
#kernel 79.75% <ø> (+0.13%) ⬆️
#user 66.11% <ø> (-0.44%) ⬇️
Impacted Files Coverage Δ
module/zfs/refcount.c 84.72% <ø> (-6.95%) ⬇️
module/zfs/vdev_indirect.c 73.50% <0.00%> (-10.67%) ⬇️
cmd/zvol_id/zvol_id_main.c 76.31% <0.00%> (-5.27%) ⬇️
module/lua/lmem.c 83.33% <0.00%> (-4.17%) ⬇️
module/icp/api/kcf_mac.c 37.71% <0.00%> (-2.29%) ⬇️
module/zfs/zil.c 91.17% <0.00%> (-2.19%) ⬇️
module/zfs/arc.c 82.16% <0.00%> (-1.96%) ⬇️
module/zfs/btree.c 81.85% <0.00%> (-1.64%) ⬇️
module/zfs/metaslab.c 94.33% <0.00%> (-1.44%) ⬇️
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36a6e23...8a97b09. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 13, 2020
@behlendorf behlendorf merged commit 791e480 into openzfs:master Apr 13, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
The memory and cpu cost of reference count tracking with the current
implementation is significant.  For this reason it has always been
disabled by default for the kmods.  Apply this same default to user
space so ztest doesn't always incur this performance penalty.

Our intention is to re-enable this by default for ztest once the code
has been optimized.  Since we expect to at some point provide a FUSE
implementation we wouldn't want this enabled by default for libzpool.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#10189
@behlendorf behlendorf deleted the refcount-disable branch April 19, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants