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

Generic throttling metrics namespace and BigtableIO write throttling counter #31924

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

Abacn
Copy link
Contributor

@Abacn Abacn commented Jul 17, 2024

Fix #19632

Introduce a namepace named "beam-throttling-metrics", put under java core's Metrics.java, and use this namespace for Dataflow worker

Currently, Dataflow worker only considers several "known" namespace for throttling metrics, including bigquery streaming inserts, etc. After this change, "beam-throttling-metrics" is added to known namespace for batch Dataflow worker; and streaming dataflow worker will react on all counters named "throttliing-msecs"

  • Introduce a generic throttling namespace and counter

  • Dataflow accumulates throttling time from generic throttling counter

  • Apply throttling counter to BigtableIO write

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@Abacn
Copy link
Contributor Author

Abacn commented Jul 18, 2024

before - agressively scale up until get completely stuck, then no longer scale up because average CPU usage below 5%, until get cancelled

image

after - multiple scale down event

image

though there are some caveat

  • once throttling signal relieved, autoscaler tends to scale up again, causing bouncing between throttling-relieved

  • the last batch seems stuck to flush indefinitely. This is a known issue for BigtableIO: fix: have a timeout on the wait when closing BigtableIO#Writer #29548 introduced attemptedTimeout config to force the future expire in finite time to mitigate the issue, but the underlying issue always present

* Introduce a generic throttling namespace and counter

* Dataflow accumulates throttling time from generic throttling counter

* Apply throttling counter to BigtableIO write
@Abacn Abacn marked this pull request as ready for review July 18, 2024 15:17
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@Abacn
Copy link
Contributor Author

Abacn commented Jul 18, 2024

Java PreCommit failed twice different tests failing, not related to this PR

run#1

testIsAvailableAlwaysWakenUp (org.apache.beam.runners.flink.translation.wrappers.streaming.io.source.unbounded.FlinkUnboundedSourceReaderTest) failed

testLatencyAttributionToCommittingState[0: [streamingEngine=false]] (org.apache.beam.runners.dataflow.worker.StreamingDataflowWorkerTest) failed

run#2

testMultipleClientsFailingIsHandledGracefullyByServer (org.apache.beam.runners.fnexecution.logging.GrpcLoggingServiceTest) failed

@Abacn
Copy link
Contributor Author

Abacn commented Jul 18, 2024

R: @igorbernstein2 @ahmedabu98

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

Copy link
Contributor

@ahmedabu98 ahmedabu98 left a comment

Choose a reason for hiding this comment

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

Few questions but overall LGTM

@Abacn Abacn merged commit 74f1f70 into apache:master Jul 24, 2024
30 checks passed
@Abacn Abacn deleted the genericthrott branch July 24, 2024 17:31
Abacn added a commit to Abacn/beam that referenced this pull request Sep 16, 2024
Abacn added a commit that referenced this pull request Sep 20, 2024
* Revert BigtableIO change in #31924

* Exclude fixes not related to throttling counter change

* issue warning for removed configs
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.

Update throttling counters to use generic throttling-msecs metric and dedicated namespace
2 participants