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

kv: add observability for number of accurate- vs. approximate-stats splits #119516

Closed
miraradeva opened this issue Feb 22, 2024 · 0 comments
Closed
Assignees
Labels
A-kv Anything in KV that doesn't belong in a more specific category. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects

Comments

@miraradeva
Copy link
Contributor

miraradeva commented Feb 22, 2024

As a followup to #119499, we should add some metrics around the stats estimates produced by the split.

  • kv.split.post-pre-split-diff-<stat>: for each stat in the MVCCStats, the difference between the value of the stat at the time of the split (in splitTrigger) and before the split (in AdminSplit). Not sure if this will be useful/needed for all stats; maybe export some as metrics and log the rest. These will help keep track of drift in specific metrics and allow us to correlate that with other instabilities during investigations.
  • kv.split.fallback-accurate-stats: the number of splits that fall back to accurate splits computation because of a large discrepancy in the stats (batcheval: use a threshold on stats discrepancy to fall back to accurate-stats split #119503).

We already log the delta that the consistency checker queue corrects. We expect these deltas to be larger after #119499.

Jira issue: CRDB-36263

Epic CRDB-34215

@miraradeva miraradeva added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-kv Anything in KV that doesn't belong in a more specific category. T-kv KV Team labels Feb 22, 2024
@miraradeva miraradeva self-assigned this Feb 22, 2024
@blathers-crl blathers-crl bot added this to Incoming in KV Feb 22, 2024
miraradeva added a commit to miraradeva/cockroach that referenced this issue Mar 6, 2024
This patch adds logging and two new metrics to track estimated MVCC
stats computed during splits.

`kv.split.estimated_stats`: the number of splits that computed estimated
MVCC stats, as opposed to 100% accurate ones.

`kv.split.total_bytes_estimates`: the number of total bytes of estimates
introduced by splits. These are calculated as the difference between
the pre-computed stats before the split and the stored stats during the
split (while holding latches).

Fixes: cockroachdb#119516

Release note: None
miraradeva added a commit to miraradeva/cockroach that referenced this issue Mar 11, 2024
This patch adds logging and two new metrics to track estimated MVCC
stats computed during splits.

`kv.split.estimated_stats`: the number of splits that computed estimated
MVCC stats, as opposed to 100% accurate ones.

`kv.split.total_bytes_estimates`: the number of total bytes of estimates
introduced by splits. These are calculated as the difference between
the pre-computed stats before the split and the stored stats during the
split (while holding latches).

Fixes: cockroachdb#119516

Release note (ops-change): Two new metrics (kv.split.estimated_stats and
kv.split.total_bytes_estimates) added to track the number of splits
that produce MVCC stats estimates, and the total bytes of estimates
produced.
miraradeva added a commit to miraradeva/cockroach that referenced this issue Mar 14, 2024
This patch adds logging and two new metrics to track estimated MVCC
stats computed during splits.

`kv.split.estimated_stats`: the number of splits that computed estimated
MVCC stats, as opposed to 100% accurate ones.

`kv.split.total_bytes_estimates`: the number of total bytes of estimates
introduced by splits. These are calculated as the difference between
the pre-computed stats before the split and the stored stats during the
split (while holding latches).

Fixes: cockroachdb#119516

Release note (ops change): Two new metrics (kv.split.estimated_stats and
kv.split.total_bytes_estimates) added to track the number of splits
that produce MVCC stats estimates, and the total bytes of estimates
produced.
@craig craig bot closed this as completed in af328f4 Mar 21, 2024
KV automation moved this from Incoming to Closed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv Anything in KV that doesn't belong in a more specific category. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
KV
Closed
Development

No branches or pull requests

1 participant