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: record a metric of effective compaction concurrency #1934

Closed
jbowens opened this issue Aug 30, 2022 · 1 comment · Fixed by #2436
Closed

db: record a metric of effective compaction concurrency #1934

jbowens opened this issue Aug 30, 2022 · 1 comment · Fixed by #2436

Comments

@jbowens
Copy link
Collaborator

jbowens commented Aug 30, 2022

Record an 'effective compaction concurrency' that records the number of compactions running at a time, integrated over an interval. This can be useful for determining whether compaction concurrency is the limiting bottleneck, and when making decisions to lower temporarily increased concurrency values back down (eg, SREOPS-5039).

This new metric can be added to the existing InternalItervalMetrics. It should record the total time spent in compactions during the interval over the interval duration. For example, if the engine consistently has 3 compactions running over the course of the interval, the effective compaction concurrency is 3.

@jbowens jbowens changed the title db: record a metric of 'effective compaction concurrency' db: record a metric of effective compaction concurrency Aug 30, 2022
@jbowens

This comment was marked as outdated.

@jbowens jbowens self-assigned this Aug 31, 2022
@jbowens jbowens removed their assignment Nov 1, 2022
jbowens added a commit to jbowens/pebble that referenced this issue Apr 6, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (cockroachdb#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit to jbowens/pebble that referenced this issue Apr 14, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (cockroachdb#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit to jbowens/pebble that referenced this issue Apr 14, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (cockroachdb#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit to jbowens/pebble that referenced this issue May 8, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (cockroachdb#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit to jbowens/pebble that referenced this issue May 16, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (cockroachdb#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit to jbowens/pebble that referenced this issue May 16, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (cockroachdb#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit that referenced this issue May 16, 2023
Add a new Compact.Duration metric that measures the cumulative time spent in
compactions since Open. This may be used in combination with Metrics.Uptime to
compute the effective compaction concurrency (#1934). Callers may compute
effective compaction concurrency over an interval by measuring both Uptime and
Compact.Duration at the beginning and end of the interval and subtracting.
jbowens added a commit to jbowens/cockroach that referenced this issue May 19, 2023
Add a new storage.compactions.duration metric that describes the cumulative
time spent in compactions since process start. This may be used to calculate
the effective compaction concurrency over an interval. See
cockroachdb/pebble#1934.

Epic: none
Release note (ops change): exposes a new metric `storage.compactions.duration`
computed by the storage engine that provides the cumulative time the storage
engine has spent in compactions. This duration may exceed time elapsed, because
of concurrent compactions and may be useful in monitoring compaction
concurrency.
craig bot pushed a commit to cockroachdb/cockroach that referenced this issue May 19, 2023
103670: kvserver: add storage.compactions.duration timeseries metric r=RaduBerinde a=jbowens

Add a new `storage.compactions.duration` metric that describes the cumulative time spent in compactions since process start. This may be used to calculate the effective compaction concurrency over an interval. See cockroachdb/pebble#1934.

Epic: none
Release note (ops change): exposes a new metric `storage.compactions.duration` computed by the storage engine that provides the cumulative time the storage engine has spent in compactions. This duration may exceed time elapsed, because of concurrent compactions and may be useful in monitoring compaction concurrency.

Co-authored-by: Jackson Owens <[email protected]>
@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
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant