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 metrics for scan_stats scanned and scan_stats issued #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RaptahJezus
Copy link

Hello,

ZFS On Linux 0.80 implemented sequential scrub and resilvers. SSDs may scan its metadata at 2.5+ GB/sec, and complete in a matter of seconds, while the subsequent scrub I/O may take many times longer. This was resulting in innaccurate ETAs for completion, as well as inaccurate stats about how fast the scrub was running.

Some metrics have been renamed to clarify them as "scan", and additional metrics have been added for the "issue" phase.

@RaptahJezus RaptahJezus changed the title Add metrics for stat scanned and stat issued Add metrics for scan_stats scanned and scan_stats issued Mar 29, 2020
@richardelling
Copy link
Owner

richardelling commented Mar 29, 2020

Hi @RaptahJezus thanks for the PR! I'd like to have this code also compile for previous versions
of ZFS, so we'll need some way to determine at compile time that those struct entries exist.
Since C doesn't have reflection and it doesn't seem that the original PR for "Sequential scrub and
resilver" as a new feature #define, we'll need to find something that can be easily checked.
Can you look for such a #define?

@RaptahJezus
Copy link
Author

RaptahJezus commented Mar 30, 2020

Sure, one that sticks out is the addition of SSD TRIM in ZFS 0.80 RC-5. The following definitions were added in include/sys/fs/zfs.h

  • ZPOOL_TRIM_COMMAND
  • ZPOOL_TRIM_VDEVS
  • ZPOOL_TRIM_RATE
  • ZPOOL_TRIM_SECURE

How do you feel about those?

@richardelling
Copy link
Owner

@RaptahJezus I don't see anything else that would correlate better. Let's go with ZPOOL_TRIM_COMMAND and put a comment that explains why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants