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

feat(sink): add sink throughput( mb/s) metrics #19587

Merged
merged 5 commits into from
Dec 10, 2024
Merged

feat(sink): add sink throughput( mb/s) metrics #19587

merged 5 commits into from
Dec 10, 2024

Conversation

xxhZs
Copy link
Contributor

@xxhZs xxhZs commented Nov 27, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Fix #19290.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@@ -200,6 +200,7 @@ impl<F: LogStoreFactory> SinkExecutor<F> {
let input = input.inspect_ok(move |msg| {
if let Message::Chunk(c) = msg {
metrics.sink_input_row_count.inc_by(c.capacity() as u64);
metrics.sink_input_size.inc_by(c.estimated_size() as u64);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the metrics here will be inaccurate when sink decoupling is on because the metrics here is measuring the throughput of the input channel. When sink decoupling is on, the input will be polled and written to log store regardless of the external sink.

We need to add a metric for log store reader throughput:

.inc_by(chunk.cardinality() as _);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the metric here is log_store_read_rows, which doesn't match the sink_input_row_count we defined earlier. Should we merge the two or add another log_store_read_rows(mb/s)

@stdrc stdrc self-requested a review November 28, 2024 07:47
grafana/risingwave-dev-dashboard.dashboard.py Outdated Show resolved Hide resolved
risedev.yml Outdated Show resolved Hide resolved
src/stream/src/executor/monitor/streaming_stats.rs Outdated Show resolved Hide resolved
@stdrc
Copy link
Member

stdrc commented Dec 4, 2024

Any updates?

@xxhZs
Copy link
Contributor Author

xxhZs commented Dec 6, 2024

Any updates?

can review again

Copy link
Member

@stdrc stdrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stdrc stdrc enabled auto-merge December 10, 2024 10:04
@stdrc stdrc added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit 2b819a3 Dec 10, 2024
28 of 29 checks passed
@stdrc stdrc deleted the xxh/add-sink-metr branch December 10, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add MB/s metrics for Sink Throughput
3 participants