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

Add kstats tracking gang allocations #17003

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pcd1193182
Copy link
Contributor

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.

Motivation and Context

Gang blocks have a significant impact on the long and short term performance of a zpool, but there is not a lot of observability into whether they're being used.

Description

This change adds gang-specific kstats to ZFS, to better allow users to see whether ganging is happening. There are only two kstats in this version; number of gang fallbacks, and number of multi-level gang fallbacks. If people have suggestions for other stats, they can be added.

How Has This Been Tested?

Forced ganging on for small block sizes, checked that stats increased appropriately.

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)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

module/zfs/zio.c Outdated Show resolved Hide resolved
Copy link
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few thoughts to think:

  • Names like ziostat.normal_fallbacks are not exactly hint that it is about allocation.
  • We also have another allocation path for ZIL.
  • And I see we have a few more allocation-related counters inside metaslab.
  • There are some style errors.

@amotin amotin added the Status: Code Review Needed Ready for review and testing label Jan 29, 2025
@pcd1193182 pcd1193182 force-pushed the gang_kstats branch 2 times, most recently from e7a07af to 0477f3d Compare February 4, 2025 21:06
@amotin
Copy link
Member

amotin commented Feb 5, 2025

@pcd1193182 "error: commit message body contains line over 72 characters"

Gang blocks have a significant impact on the long and short term
performance of a zpool, but there is not a lot of observability into
whether they're being used.  This change adds gang-specific kstats to
ZFS, to better allow users to see whether ganging is happening.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Paul Dagnelie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Code Review Needed Ready for review and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants