Package org.opensearch.index
Class ShardIndexingPressureMemoryManager
java.lang.Object
org.opensearch.index.ShardIndexingPressureMemoryManager
The Shard Indexing Pressure Memory Manager is the construct responsible for increasing and decreasing the allocated shard limit
based on incoming requests. A shard limits defines the maximum memory that a shard can occupy in the heap for request objects.
Based on the overall memory utilization on the node, and current traffic needs shard limits will be modified:
1. If the limits assigned to a shard is breached (Primary Parameter) while the node level overall occupancy across all shards
is not greater than primary_parameter.node.soft_limit, MemoryManager will increase the shard limits without any deeper evaluation.
2. If the limits assigned to the shard is breached(Primary Parameter) and the node level overall occupancy across all shards
is greater than primary_parameter.node.soft_limit, then MemoryManager will evaluate deeper parameters for shards to identify any
issues, such as throughput degradation (Secondary Parameter - 1) and time since last request was successful (Secondary Parameter - 2).
This helps identify detect any duress state with the shard, requesting more memory.
Secondary Parameters covered above:
1. ThroughputDegradationLimitsBreached - When the moving window throughput average has increased by a factor compared to
the historical throughput average. If the factor by which it has increased is greater than the degradation limit threshold, this
parameter is considered to be breached.
2. LastSuccessfulRequestDurationLimitsBreached - When the time since the last successful request completed is greater than the max
timeout threshold value, while there a number of outstanding requests greater than the max outstanding requests then this parameter
is considered to be breached.
MemoryManager attempts to increase of decrease the shard limits in case the shard utilization goes below operating_factor.lower or
goes above operating_factor.upper of current shard limits. MemoryManager attempts to update the new shard limit such that the new value
remains withing the operating_factor.optimal range of current shard utilization.
- Opensearch.internal:
-
Field Summary
FieldsModifier and TypeFieldDescriptionShard operating factor can be evaluated using currentShardBytes/shardLimits.This determines the max outstanding request that are yet to be processed successfully.The node level soft limit determines when the secondary parameters for shard is to be evaluated for degradation.static final Setting<org.opensearch.common.unit.TimeValue>
This determines the max time elapsed since any request was processed successfully.Degradation for a shard can be evaluated using average throughput of last N requests, where N beingShardIndexingPressureSettings.REQUEST_SIZE_WINDOW
, divided by lifetime average throughput. -
Constructor Summary
ConstructorsConstructorDescriptionShardIndexingPressureMemoryManager
(ShardIndexingPressureSettings shardIndexingPressureSettings, ClusterSettings clusterSettings, Settings settings) -
Method Summary
-
Field Details
-
LOWER_OPERATING_FACTOR
Shard operating factor can be evaluated using currentShardBytes/shardLimits. Outcome of this expression is categorized as lower, optimal and upper boundary, and appropriate action is taken once the below defined threshold values are breached. -
OPTIMAL_OPERATING_FACTOR
-
UPPER_OPERATING_FACTOR
-
SUCCESSFUL_REQUEST_ELAPSED_TIMEOUT
public static final Setting<org.opensearch.common.unit.TimeValue> SUCCESSFUL_REQUEST_ELAPSED_TIMEOUTThis determines the max time elapsed since any request was processed successfully. Appropriate action is taken once the below below defined threshold value is breached. -
MAX_OUTSTANDING_REQUESTS
This determines the max outstanding request that are yet to be processed successfully. Appropriate action is taken once the below defined threshold value is breached. -
THROUGHPUT_DEGRADATION_LIMITS
Degradation for a shard can be evaluated using average throughput of last N requests, where N beingShardIndexingPressureSettings.REQUEST_SIZE_WINDOW
, divided by lifetime average throughput. Appropriate action is taken once the outcome of above expression breaches the below defined threshold value is breached. -
NODE_SOFT_LIMIT
The node level soft limit determines when the secondary parameters for shard is to be evaluated for degradation.
-
-
Constructor Details
-
ShardIndexingPressureMemoryManager
public ShardIndexingPressureMemoryManager(ShardIndexingPressureSettings shardIndexingPressureSettings, ClusterSettings clusterSettings, Settings settings)
-