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

[v23.2.x] kafka: Add fetch plan and execute latency metric #15129

Merged

Conversation

StephanDollberg
Copy link
Member

@StephanDollberg StephanDollberg commented Nov 24, 2023

Backport of PR #13485

Fixes #14826

Adds a histogram metric to measure the time it takes to create the fetch
plan and execute it - aka a single fetch poll.

It's an approximation for the time it takes to process the data in a
fetch request once it is available.

I have separated two series one which is tracking empty fetches and one
that isn't.

Further the count of the histogram can be used to calculate the ratio of
fetch requests to polls like so:

```
sum(irate(vectorized_kafka_handler_requests_completed_total{...,
handler="fetch"}[$__rate_interval])) by ($aggr_criteria) /
sum(irate(vectorized_fetch_stats_plan_and_execute_latency_us_count{...}[$__rate_interval])) by
($aggr_criteria)
```

Looking at some scenarios we get the following values:

 - 500MB/s, 4P/4C, 288P, ~110k batch, 1ms debounce: ~0.37
 - 500MB/s, 4P/4C, 288P, ~110k batch, 10ms debounce: ~0.66
 - 125MB/s, 8kP/8kC, 40k partitions, 1ms debounce: ~0.012
 - 125MB/s, 8kP/8kC, 40k partitions, 10ms debounce: ~0.035
 - 125MB/s, 8kP/8kC, 40k partitions, 100ms debounce: ~0.24

(cherry picked from commit 220b11e)
@StephanDollberg StephanDollberg added the kind/backport PRs targeting a stable branch label Nov 24, 2023
@StephanDollberg StephanDollberg marked this pull request as ready for review November 27, 2023 09:29
@StephanDollberg
Copy link
Member Author

@piyushredpanda piyushredpanda merged commit af939c3 into v23.2.x Nov 27, 2023
31 of 33 checks passed
@piyushredpanda piyushredpanda deleted the stephan/v232-backport-fetch-plan-execute-metric branch November 27, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants