-
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
zstreamdump: add per-record-type counters and an overhead counter #8432
Conversation
a92e53e
to
ea49825
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this'll be really handy. Just a few suggestions.
I think the summary should have a "total payload size" and "total header overhead", the sum of which would be the "total stream length". The "total payload" seems more relevant than "total WRITE record payload" which is what we have today (I think). |
ea49825
to
92b1624
Compare
Thanks for refreshing this. It looks like several of the rsend tests failed because they parse the output of |
92b1624
to
497ebbe
Compare
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic
497ebbe
to
800ada4
Compare
Codecov Report
@@ Coverage Diff @@
## master #8432 +/- ##
==========================================
+ Coverage 78.51% 78.58% +0.06%
==========================================
Files 382 382
Lines 117840 117858 +18
==========================================
+ Hits 92526 92613 +87
+ Misses 25314 25245 -69
Continue to review full report at Codecov.
|
@@ -683,6 +687,7 @@ main(int argc, char *argv[]) | |||
print_block(buf, | |||
P2ROUNDUP(drrwe->drr_psize, 8)); | |||
} | |||
payload_size = P2ROUNDUP(drrwe->drr_psize, 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you feel like cleaning this up a bit, we could avoid repeating the P2ROUNDUP 3x:
payload_size = ...;
ssread(... payload_size ...);
if (dump)
print_block (... payload_size)
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic Closes openzfs#8432
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic Closes openzfs#8432
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic Closes openzfs#8432
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic Closes openzfs#8432
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic Closes openzfs#8432
Count the bytes of payload for each replication record type Count the bytes of overhead (replication records themselves) Include these counters in the output summary at the end of the run. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Allan Jude <allanjude@freebsd.org> Sponsored-By: Klara Systems and Catalogic Closes #8432
Signed-off-by: Allan Jude allanjude@freebsd.org
Motivation and Context
zstreamdump is a tool used to analyze the contents of ZFS replication streams.
I am using zstreamdump to debug zfs send size estimation, and found it
useful to get a breakdown of the actual size of the replication stream, and
what that size was made up of.
Description
Count the bytes of payload for each replication record type
Count the bytes of overhead (replication records themselves)
Include these counters in the output summary at the end of the run.
Example output:
How Has This Been Tested?
The counters correctly sum up to the total stream length, which matches the actual stream length.
Types of changes
Checklist:
Signed-off-by
.