Skip to content

Comments

Use num cores to determine balancerComputeThreads#14902

Merged
kfaraz merged 3 commits intoapache:masterfrom
kfaraz:fix_balancer_threads
Aug 25, 2023
Merged

Use num cores to determine balancerComputeThreads#14902
kfaraz merged 3 commits intoapache:masterfrom
kfaraz:fix_balancer_threads

Conversation

@kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Aug 24, 2023

Changes

  • Determine the default value of balancerComputeThreads based on number of coordinator cpus rather than number of segments. Even if the number of segments is low and we create more balancer threads, it doesn't hurt the system as threads would mostly be idle.
  • Remove unused field from SegmentLoadQueueManager

Expected values

  • Clusters with ~1M segments typically work with Coordinators having 16 cores or more. This would give us 8 balancer threads, which is the same as the current maximum.
  • On small clusters, even a single thread is enough to do the required balancing work.

Release note

The coordinator dynamic config now uses num_cpus / 2 as the default value for balancerComputeThreads instead of the old value of 1.
This is also the value used when smartSegmentLoading is enabled.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@kfaraz kfaraz merged commit e511819 into apache:master Aug 25, 2023
@kfaraz kfaraz deleted the fix_balancer_threads branch August 25, 2023 02:45
@LakshSingla LakshSingla added this to the 28.0 milestone Oct 12, 2023
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.

3 participants