Module org.elasticsearch.server
Class ShardMovementWriteLoadSimulator
java.lang.Object
org.elasticsearch.cluster.routing.ShardMovementWriteLoadSimulator
Simulates the impact to each node's write-load in response to the movement of individual
shards around the cluster.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApply the simulated shard movements to the original thread pool usage stats for each node.voidsimulateShardStarted(ShardRouting shardRouting) static floatupdateNodeUtilizationWithShardMovements(float nodeUtilization, float shardWriteLoadDelta, int numberOfWriteThreads) ThenodeUtilizationis the average utilization per thread for some duration of time.
-
Constructor Details
-
ShardMovementWriteLoadSimulator
-
-
Method Details
-
simulateShardStarted
-
simulatedNodeUsageStatsForThreadPools
Apply the simulated shard movements to the original thread pool usage stats for each node. -
updateNodeUtilizationWithShardMovements
public static float updateNodeUtilizationWithShardMovements(float nodeUtilization, float shardWriteLoadDelta, int numberOfWriteThreads) ThenodeUtilizationis the average utilization per thread for some duration of time. TheshardWriteLoadDeltais the sum of shards' total execution time. Dividing the shards total execution time by the number of threads provides the average utilization of each write thread for those shards. The change in shard load can then be added to the node utilization.- Parameters:
nodeUtilization- The current node-level write load percent utilization.shardWriteLoadDelta- The change in shard(s) execution time across all threads. This can be positive or negative depending on whether shards were moved onto the node or off of the node.numberOfWriteThreads- The number of threads available in the node's write thread pool.- Returns:
- The new node-level write load percent utilization after adding the shard write load delta.
-