-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Ensure arc_size_break are filled in arc_summary.py #6770
Conversation
As mentioned in issue #5526 we really should fix this and directly use |
4e3ca53
to
cc8a63c
Compare
Updated to resolve issue #5526. |
cmd/arc_summary/arc_summary.py
Outdated
@@ -241,8 +241,7 @@ def get_arc_summary(Kstat): | |||
'num': fBytes(mfu_size), | |||
} | |||
|
|||
elif arc_size < target_size: | |||
mfu_size = (target_size - mru_size) | |||
else: |
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.
I'd argue that what we really want to report here is the mru/fmu percentages independent of the arc size. In which case the conditional can be removed and this can be calculated as.
mru_per = fPerc(mru_size, mru_size + mfu_size)
mfu_per = fPerc(mfu_size, mru_size + mfu_size)
Use mfu_size and mru_size pulled from the arcstats kstat file to calculate the mfu and mru percentages for arc size breakdown. Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
cc8a63c
to
72f98d0
Compare
Codecov Report
@@ Coverage Diff @@
## master #6770 +/- ##
==========================================
+ Coverage 74.36% 74.51% +0.14%
==========================================
Files 297 297
Lines 94371 94371
==========================================
+ Hits 70181 70317 +136
+ Misses 24190 24054 -136
Continue to review full report at Codecov.
|
@AndCycle @richardelling it'd be great to get your thoughts on this little bit of cleanup. The notion here is to simply update the script to give you an authoritative breakdown of the mru/mfu split. Nothing fancy. |
Agree, let's use the metrics at our disposal. +1 |
LGTM |
Use mfu_size and mru_size pulled from the arcstats kstat file to calculate the mfu and mru percentages for arc size breakdown. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: AndCycle <andcycle@andcycle.idv.tw> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#5526 Closes openzfs#6770
Use mfu_size and mru_size pulled from the arcstats kstat file to calculate the mfu and mru percentages for arc size breakdown. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: AndCycle <andcycle@andcycle.idv.tw> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#5526 Closes openzfs#6770
Use mfu_size and mru_size pulled from the arcstats kstat file to calculate the mfu and mru percentages for arc size breakdown. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: AndCycle <andcycle@andcycle.idv.tw> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#5526 Closes openzfs#6770
Use mfu_size and mru_size pulled from the arcstats kstat file to calculate the mfu and mru percentages for arc size breakdown. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: AndCycle <andcycle@andcycle.idv.tw> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#5526 Closes openzfs#6770
Use mfu_size and mru_size pulled from the arcstats kstat file to calculate the mfu and mru percentages for arc size breakdown. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: AndCycle <andcycle@andcycle.idv.tw> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#5526 Closes openzfs#6770
Description
When printing output in arc_summary, all possible keys
are expected in the output data structure. For the arc
size breakdown, output is conditionally filled and does
not expect arc target size to be equal to the arc size.
Motivation and Context
Just a small bug fix.
How Has This Been Tested?
Locally, on a VM.
Types of changes
Checklist:
Signed-off-by
.