expose free space histograms in /proc#14013
expose free space histograms in /proc#14013cleverca22 wants to merge 1 commit intoopenzfs:masterfrom
Conversation
ryao
left a comment
There was a problem hiding this comment.
These really should be destroyed in the reverse order that they were initialized, but that is a pre-existing problem that merits its own patch.
ryao
left a comment
There was a problem hiding this comment.
This looks good in my cursory review.
22ddc3a to
fdd6a2c
Compare
|
"fragmentation" seems like an awkward name, to me, for this /proc entry. Maybe something about it being the free space (or the histogram thereof)? |
|
I don't think we need the pool name repeated on every line when it is already known. |
|
@freqlabs It is formatted for prometheus. |
|
I'd prefer a format that is easier to manipulate for anyone not using prometheus. |
|
the pool name was repeated, so it could easily just be dumped right into prometheus but if the prometheus format is being removed, and its just @rincebrain what about just |
removed all of the redundant info, so its just a list of numbers now open to suggestions on renaming the stat files |
ghost
left a comment
There was a problem hiding this comment.
I missed it because the checkstyle workflow didn't run and it's hard to judge whitespace on github, but this doesn't pass cstyle. Generally try to match the style of the existing code, make cstyle will be more specific.
af89d49 to
fa4f990
Compare
|
fixed the code to agree with cstyle |
|
Please also sign off on the commit with your next update: https://github.com/openzfs/zfs/blob/master/.github/CONTRIBUTING.md#signed-off-by |
fa4f990 to
bcc0cf2
Compare
|
All the commits need to be signed off, and the last two should be squashed into one. |
|
@cleverca22 if you're still interested in pursuing this change please address the outstanding feedback and rebase this PR on the latest master. |
|
i do want to get this merged, i'll take a look at rebasing and addressing the comments when i get some free time i have been running this branch on 3 machines since i made it, and need to update them anyways |
bcc0cf2 to
22ddc3a
Compare
22ddc3a to
309be3a
Compare
|
@cleverca22 great. We can tacklie this in parts if you want to open a new PR with just a singed off version of c0bd9ca. Then this can be squashed rebased on top of that change. |
6460516 to
9a97022
Compare
9a97022 to
a385c10
Compare
c35b37b to
9cf94a0
Compare
|
The checkstyle is unhappy: |
9cf94a0 to
cdea7c1
Compare
cdea7c1 to
84cd207
Compare
behlendorf
left a comment
There was a problem hiding this comment.
One last addition and this should be good. Can you rebase it and force update the PR while making the change.
| case 2: | ||
| return (spa_embedded_log_class(stat->spa)); | ||
| case 3: | ||
| return (spa_special_class(stat->spa)); |
There was a problem hiding this comment.
A 6th metaslab class called spa_special_embedded_log_class was added by be1e991. Please add this one in too.
example output: ``` [root@nixos:~]# cat /proc/spl/kstat/zfs/vm/fragmentation_normal 9 19 10 49 11 24 12 38 13 21 14 17 15 12 16 2 17 2 27 15 ``` this allows graphing `zdb -MM` without any performance costs Signed-off-by: Michael Bishop <cleverca22@gmail.com>
84cd207 to
7fb65f8
Compare
|
@ryan-moeller recently added allocation class metrics as pool properties in #18238. They don't include the free space histograms, but the other key metrics are there including fragmentation. Providing the full histograms in I'd also suggest adding a header to the kstat output. That's easy enough to strip off for tools automatically consuming this output and helpful for us humans. |
Motivation and Context
this allows graphing
zdb -MMwithout any performance costsDescription
adds a new kstat in /proc with free space fragmentation
example output:
How Has This Been Tested?
booting a vm and comparing the output to
zdb -MM vmTypes of changes
Checklist:
Signed-off-by.