mirror of https://github.com/apache/druid.git
Update default values in CoordinatorDynamicConfig (#14269)
The defaults of the following config values in the `CoordinatorDynamicConfig` are being updated. 1. `maxSegmentsInNodeLoadingQueue = 500` (previous = 100) 2. `replicationThrottleLimit = 500` (previous = 10) Rationale: With round-robin segment assignment now being the default assignment technique, the Coordinator can assign a large number of under-replicated/unavailable segments very quickly, without getting stuck in `RunRules` duty due to very slow strategy-based cost computations. 3. `maxSegmentsToMove = 100` (previous = 5) Rationale: A very low value (say 5) is ineffective in balancing especially if there are many segments to balance. A very large value can cause excessive moves, which has these disadvantages: - Load of moving segments competing with load of unavailable/under-replicated segments - Unnecessary network costs due to constant download and delete of segments These defaults will be revisited after #13197 is merged.
This commit is contained in:
parent
0e51c2702a
commit
8091c6a547
|
@ -951,16 +951,16 @@ Issuing a GET request at the same URL will return the spec that is currently in
|
|||
|`millisToWaitBeforeDeleting`|How long does the Coordinator need to be a leader before it can start marking overshadowed segments as unused in metadata storage.|900000 (15 mins)|
|
||||
|`mergeBytesLimit`|The maximum total uncompressed size in bytes of segments to merge.|524288000L|
|
||||
|`mergeSegmentsLimit`|The maximum number of segments that can be in a single [append task](../ingestion/tasks.md).|100|
|
||||
|`maxSegmentsToMove`|The maximum number of segments that can be moved at any given time.|5|
|
||||
|`maxSegmentsToMove`|The maximum number of segments that can be moved at any given time.|100|
|
||||
|`useBatchedSegmentSampler`|Deprecated. Boolean flag for whether or not we should use the Reservoir Sampling with a reservoir of size k instead of fixed size 1 to pick segments to move. This option can be enabled to speed up the sampling of segments to be balanced, especially if there is a large number of segments in the cluster or if there are too many segments to move.|true|
|
||||
|`percentOfSegmentsToConsiderPerMove`|Deprecated. This will eventually be phased out by the batched segment sampler. You can enable the batched segment sampler now by setting the dynamic Coordinator config, `useBatchedSegmentSampler`, to `true`. Note that if you choose to enable the batched segment sampler, `percentOfSegmentsToConsiderPerMove` will no longer have any effect on balancing. If `useBatchedSegmentSampler == false`, this config defines the percentage of the total number of segments in the cluster that are considered every time a segment needs to be selected for a move. Druid orders servers by available capacity ascending (the least available capacity first) and then iterates over the servers. For each server, Druid iterates over the segments on the server, considering them for moving. The default config of 100% means that every segment on every server is a candidate to be moved. This should make sense for most small to medium-sized clusters. However, an admin may find it preferable to drop this value lower if they don't think that it is worthwhile to consider every single segment in the cluster each time it is looking for a segment to move.|100|
|
||||
|`replicantLifetime`|The maximum number of Coordinator runs for a segment to be replicated before we start alerting.|15|
|
||||
|`replicationThrottleLimit`|The maximum number of segments that can be replicated at one time.|10|
|
||||
|`replicationThrottleLimit`|The maximum number of segments that can be in the replication queue of a historical tier at any given time.|500|
|
||||
|`balancerComputeThreads`|Thread pool size for computing moving cost of segments in segment balancing. Consider increasing this if you have a lot of segments and moving segments starts to get stuck.|1|
|
||||
|`emitBalancingStats`|Boolean flag for whether or not we should emit balancing stats. This is an expensive operation.|false|
|
||||
|`killDataSourceWhitelist`|List of specific data sources for which kill tasks are sent if property `druid.coordinator.kill.on` is true. This can be a list of comma-separated data source names or a JSON array.|none|
|
||||
|`killPendingSegmentsSkipList`|List of data sources for which pendingSegments are _NOT_ cleaned up if property `druid.coordinator.kill.pendingSegments.on` is true. This can be a list of comma-separated data sources or a JSON array.|none|
|
||||
|`maxSegmentsInNodeLoadingQueue`|The maximum number of segments that could be queued for loading to any given server. This parameter could be used to speed up segments loading process, especially if there are "slow" nodes in the cluster (with low loading speed) or if too much segments scheduled to be replicated to some particular node (faster loading could be preferred to better segments distribution). Desired value depends on segments loading speed, acceptable replication time and number of nodes. Value 1000 could be a start point for a rather big cluster. Default value is 100. |100|
|
||||
|`maxSegmentsInNodeLoadingQueue`|The maximum number of segments allowed in the load queue of any given server. Use this parameter to load segments faster if, for example, the cluster contains slow-loading nodes or if there are too many segments to be replicated to a particular node (when faster loading is preferred to better segments distribution). The optimal value depends on the loading speed of segments, acceptable replication time and number of nodes. |500|
|
||||
|`useRoundRobinSegmentAssignment`|Boolean flag for whether segments should be assigned to historicals in a round robin fashion. When disabled, segment assignment is done using the chosen balancer strategy. When enabled, this can speed up segment assignments leaving balancing to move the segments to their optimal locations (based on the balancer strategy) lazily. |true|
|
||||
|`decommissioningNodes`| List of historical servers to 'decommission'. Coordinator will not assign new segments to 'decommissioning' servers, and segments will be moved away from them to be placed on non-decommissioning servers at the maximum rate specified by `decommissioningMaxPercentOfMaxSegmentsToMove`.|none|
|
||||
|`decommissioningMaxPercentOfMaxSegmentsToMove`| Upper limit of segments the Coordinator can move from decommissioning servers to active non-decommissioning servers during a single run. This value is relative to the total maximum number of segments that can be moved at any given time based upon the value of `maxSegmentsToMove`.<br /><br />If `decommissioningMaxPercentOfMaxSegmentsToMove` is 0, the Coordinator does not move segments to decommissioning servers, effectively putting them in a type of "maintenance" mode. In this case, decommissioning servers do not participate in balancing or assignment by load rules. The Coordinator still considers segments on decommissioning servers as candidates to replicate on active servers.<br /><br />Decommissioning can stall if there are no available active servers to move the segments to. You can use the maximum percent of decommissioning segment movements to prioritize balancing or to decrease commissioning time to prevent active servers from being overloaded. The value must be between 0 and 100.|70|
|
||||
|
|
|
@ -518,14 +518,14 @@ public class CoordinatorDynamicConfig
|
|||
TimeUnit.MINUTES.toMillis(15);
|
||||
private static final long DEFAULT_MERGE_BYTES_LIMIT = 524_288_000L;
|
||||
private static final int DEFAULT_MERGE_SEGMENTS_LIMIT = 100;
|
||||
private static final int DEFAULT_MAX_SEGMENTS_TO_MOVE = 5;
|
||||
private static final int DEFAULT_MAX_SEGMENTS_TO_MOVE = 100;
|
||||
private static final double DEFAULT_PERCENT_OF_SEGMENTS_TO_CONSIDER_PER_MOVE = 100;
|
||||
private static final int DEFAULT_REPLICANT_LIFETIME = 15;
|
||||
private static final int DEFAULT_REPLICATION_THROTTLE_LIMIT = 10;
|
||||
private static final int DEFAULT_REPLICATION_THROTTLE_LIMIT = 500;
|
||||
private static final int DEFAULT_BALANCER_COMPUTE_THREADS = 1;
|
||||
private static final boolean DEFAULT_EMIT_BALANCING_STATS = false;
|
||||
private static final boolean DEFAULT_USE_BATCHED_SEGMENT_SAMPLER = true;
|
||||
private static final int DEFAULT_MAX_SEGMENTS_IN_NODE_LOADING_QUEUE = 100;
|
||||
private static final int DEFAULT_MAX_SEGMENTS_IN_NODE_LOADING_QUEUE = 500;
|
||||
private static final int DEFAULT_DECOMMISSIONING_MAX_SEGMENTS_TO_MOVE_PERCENT = 70;
|
||||
private static final boolean DEFAULT_PAUSE_COORDINATION = false;
|
||||
private static final boolean DEFAULT_REPLICATE_AFTER_LOAD_TIMEOUT = false;
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.Set;
|
|||
*/
|
||||
public class CoordinatorDynamicConfigTest
|
||||
{
|
||||
private static final int EXPECTED_DEFAULT_MAX_SEGMENTS_IN_NODE_LOADING_QUEUE = 100;
|
||||
private static final int EXPECTED_DEFAULT_MAX_SEGMENTS_IN_NODE_LOADING_QUEUE = 500;
|
||||
|
||||
private final ObjectMapper mapper = TestHelper.makeJsonMapper();
|
||||
|
||||
|
@ -679,11 +679,11 @@ public class CoordinatorDynamicConfigTest
|
|||
900000,
|
||||
524288000,
|
||||
100,
|
||||
5,
|
||||
100,
|
||||
100,
|
||||
true,
|
||||
15,
|
||||
10,
|
||||
500,
|
||||
1,
|
||||
false,
|
||||
emptyList,
|
||||
|
@ -710,11 +710,11 @@ public class CoordinatorDynamicConfigTest
|
|||
900000,
|
||||
524288000,
|
||||
100,
|
||||
5,
|
||||
100,
|
||||
100,
|
||||
true,
|
||||
15,
|
||||
10,
|
||||
500,
|
||||
1,
|
||||
false,
|
||||
ImmutableSet.of("DATASOURCE"),
|
||||
|
|
|
@ -44,7 +44,7 @@ export const COORDINATOR_DYNAMIC_CONFIG_FIELDS: Field<CoordinatorDynamicConfig>[
|
|||
{
|
||||
name: 'maxSegmentsToMove',
|
||||
type: 'number',
|
||||
defaultValue: 5,
|
||||
defaultValue: 100,
|
||||
info: <>The maximum number of segments that can be moved at any given time.</>,
|
||||
},
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ export const COORDINATOR_DYNAMIC_CONFIG_FIELDS: Field<CoordinatorDynamicConfig>[
|
|||
{
|
||||
name: 'maxSegmentsInNodeLoadingQueue',
|
||||
type: 'number',
|
||||
defaultValue: 0,
|
||||
defaultValue: 500,
|
||||
info: (
|
||||
<>
|
||||
The maximum number of segments that could be queued for loading to any given server. This
|
||||
|
@ -106,7 +106,7 @@ export const COORDINATOR_DYNAMIC_CONFIG_FIELDS: Field<CoordinatorDynamicConfig>[
|
|||
scheduled to be replicated to some particular node (faster loading could be preferred to
|
||||
better segments distribution). Desired value depends on segments loading speed, acceptable
|
||||
replication time and number of nodes. Value 1000 could be a start point for a rather big
|
||||
cluster. Default value is 0 (loading queue is unbounded)
|
||||
cluster. Default value is 500.
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
@ -147,7 +147,7 @@ export const COORDINATOR_DYNAMIC_CONFIG_FIELDS: Field<CoordinatorDynamicConfig>[
|
|||
{
|
||||
name: 'replicationThrottleLimit',
|
||||
type: 'number',
|
||||
defaultValue: 10,
|
||||
defaultValue: 500,
|
||||
info: <>The maximum number of segments that can be replicated at one time.</>,
|
||||
},
|
||||
{
|
||||
|
@ -199,7 +199,7 @@ export const COORDINATOR_DYNAMIC_CONFIG_FIELDS: Field<CoordinatorDynamicConfig>[
|
|||
{
|
||||
name: 'useRoundRobinSegmentAssignment',
|
||||
type: 'boolean',
|
||||
defaultValue: false,
|
||||
defaultValue: true,
|
||||
info: (
|
||||
<>
|
||||
Boolean flag for whether segments should be assigned to historicals in a round-robin
|
||||
|
|
Loading…
Reference in New Issue