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

page_service: don't count time spent flushing towards smgr latency metrics #10042

Merged
merged 10 commits into from
Dec 7, 2024

Conversation

problame
Copy link
Contributor

@problame problame commented Dec 6, 2024

Problem

In #9962 I changed the smgr metrics to include time spent on flush.

It isn't under our (=storage team's) control how long that flush takes because the client can stop reading requests.

Summary of changes

Stop the timer as soon as we've buffered up the response in the pgb_writer.

Track flush time in a separate metric.

@problame problame requested a review from a team as a code owner December 6, 2024 17:28
@problame problame requested review from yliang412 and VladLazar and removed request for yliang412 December 6, 2024 17:28
@problame problame changed the title page_service: don't count flush towards smgr metrics page_service: don't count time spent flushing towards smgr latency metrics Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

7066 tests run: 6747 passed, 0 failed, 319 skipped (full report)


Flaky tests (5)

Postgres 16

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 31.4% (8332 of 26527 functions)
  • lines: 47.7% (65565 of 137349 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
6885e67 at 2024-12-07T09:08:45.651Z :recycle:

pageserver/src/metrics.rs Outdated Show resolved Hide resolved
pageserver/src/metrics.rs Outdated Show resolved Hide resolved
pageserver/src/metrics.rs Show resolved Hide resolved
@problame problame enabled auto-merge December 6, 2024 20:10
@problame problame disabled auto-merge December 7, 2024 07:44
@problame problame enabled auto-merge December 7, 2024 07:47
@problame problame added this pull request to the merge queue Dec 7, 2024
Merged via the queue into main with commit 4d7111f Dec 7, 2024
82 checks passed
@problame problame deleted the problame/smgr-metrics-dont-count-flush-time branch December 7, 2024 08:59
github-merge-queue bot pushed a commit that referenced this pull request Dec 11, 2024
…metrics (#10075)

## Problem

With pipelining enabled, the time a request spends in the batcher stage
counts towards the smgr op latency.

If pipelining is disabled, that time is not accounted for.

In practice, this results in a jump in smgr getpage latencies in various
dashboards and degrades the internal SLO.

## Solution

In a similar vein to #10042 and with a similar rationale, this PR stops
counting the time spent in batcher stage towards smgr op latency.

The smgr op latency metric is reduced to the actual execution time.

Time spent in batcher stage is tracked in a separate histogram.
I expect to remove that histogram after batching rollout is complete,
but it will be helpful in the meantime to reason about the rollout.
VladLazar pushed a commit that referenced this pull request Dec 11, 2024
…metrics (#10075)

## Problem

With pipelining enabled, the time a request spends in the batcher stage
counts towards the smgr op latency.

If pipelining is disabled, that time is not accounted for.

In practice, this results in a jump in smgr getpage latencies in various
dashboards and degrades the internal SLO.

## Solution

In a similar vein to #10042 and with a similar rationale, this PR stops
counting the time spent in batcher stage towards smgr op latency.

The smgr op latency metric is reduced to the actual execution time.

Time spent in batcher stage is tracked in a separate histogram.
I expect to remove that histogram after batching rollout is complete,
but it will be helpful in the meantime to reason about the rollout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants