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

db: reformat Metrics.String() output #1473

Closed
jbowens opened this issue Jan 25, 2022 · 0 comments · Fixed by #2739
Closed

db: reformat Metrics.String() output #1473

jbowens opened this issue Jan 25, 2022 · 0 comments · Fixed by #2739
Assignees

Comments

@jbowens
Copy link
Collaborator

jbowens commented Jan 25, 2022

The Metrics.String() output is often used in debugging storage issues. As we've accumulated more statistics that are not per-level, each has been appended as an independent line with descriptive annotations like (size == estimated-debt, score = in-progress-bytes, in = num-in-progress).

With a little thought and elbow grease, I think these could be restructured to be a little more legible and avoid the excess vertical height.

//   __level_____count____size___score______in__ingest(sz_cnt)____move(sz_cnt)___write(sz_cnt)____read___w-amp
//       WAL         1    27 B       -    48 B       -       -       -       -   108 B       -       -     2.2
//         0         2   1.6 K    0.50    81 B   825 B       1     0 B       0   2.4 K       3     0 B    30.6
//         1         0     0 B    0.00     0 B     0 B       0     0 B       0     0 B       0     0 B     0.0
//         2         0     0 B    0.00     0 B     0 B       0     0 B       0     0 B       0     0 B     0.0
//         3         0     0 B    0.00     0 B     0 B       0     0 B       0     0 B       0     0 B     0.0
//         4         0     0 B    0.00     0 B     0 B       0     0 B       0     0 B       0     0 B     0.0
//         5         0     0 B    0.00     0 B     0 B       0     0 B       0     0 B       0     0 B     0.0
//         6         1   825 B    0.00   1.6 K     0 B       0     0 B       0   825 B       1   1.6 K     0.5
//     total         3   2.4 K       -   933 B   825 B       1     0 B       0   4.1 K       4   1.6 K     4.5
//     flush         3
//   compact         1   1.6 K     0 B       1          (size == estimated-debt, score = in-progress-bytes, in = num-in-progress)
//     ctype         0       0       0       0       0  (default, delete, elision, move, read)
//    memtbl         1   4.0 M
//   zmemtbl         0     0 B
//      ztbl         0     0 B
//    bcache         4   752 B    7.7%  (score == hit-rate)
//    tcache         0     0 B    0.0%  (score == hit-rate)
//    titers         0
//    filter         -       -    0.0%  (score == utility)
@jbowens jbowens added the flex label Jan 25, 2022
@RaduBerinde RaduBerinde self-assigned this Jul 13, 2023
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 13, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Fixes cockroachdb#1473.
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 15, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Fixes cockroachdb#1473.
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 15, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Fixes cockroachdb#1473.
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 15, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Fixes cockroachdb#1473.
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 15, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Fixes cockroachdb#1473.
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 16, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Fixes cockroachdb#1473.
RaduBerinde added a commit to RaduBerinde/pebble that referenced this issue Jul 18, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Release note: Pebble metrics formatting improvements; tools that parse
these logs might need updating.

Fixes cockroachdb#1473.
RaduBerinde added a commit that referenced this issue Jul 18, 2023
This change improves the formatting of the Pebble metrics:
 - we no longer try to artificially fit non-tabular information in a
   single table
 - all byte figures end in B/KB/MB/etc
 - counts and corresponding sizes are grouped together
 - flushable ingests information moved under ingestions

These metrics are periodically logged and can be obtained through the
db console as well.

Release note: Pebble metrics formatting improvements; tools that parse
these logs might need updating.

Fixes #1473.
@jbowens jbowens moved this to Done in [Deprecated] Storage Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants