Skip to content

Add metrics for scan_stats scanned and scan_stats issued#7

Open
RaptahJezus wants to merge 2 commits intorichardelling:masterfrom
RaptahJezus:master
Open

Add metrics for scan_stats scanned and scan_stats issued#7
RaptahJezus wants to merge 2 commits intorichardelling:masterfrom
RaptahJezus:master

Conversation

@RaptahJezus
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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