-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Multiple utilization samples in write load decider #132148
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
Multiple utilization samples in write load decider #132148
Conversation
…e_decider # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
newUtilizationSamples.add( | ||
new NodeUsageStatsForThreadPools.UtilizationSample(previousUtilization.instant(), newWritePoolUtilization) | ||
); | ||
return new NodeUsageStatsForThreadPools.ThreadPoolUsageStats(writeThreadPoolStats.numberOfThreads(), newUtilizationSamples); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simulator will replace the most recent utilization value with the new one. We could instead add one to the end, but then what timestamp would we put on it? 🤷
Hard to know the best strategy without knowing how the determination of "hot spotting" is made, and whether we care about that in the simulator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think hot-spot detection should be same for real data and simulation. How about simulate samples? Maybe apply fixed value to all of them and then run hot-spot detection?
public record UtilizationSample(Instant instant, float utilization) implements Writeable { | ||
|
||
@Override | ||
public boolean equals(Object o) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were equals
, hashCode
and toString
methods on these records, I'm not sure if they were once classes or we're doing something special here? I removed them in lieu of the ones you get for free with a record.
# Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather we delayed this change until we've got to a point where we can see from production experience that this sort of thing will be needed.
Change ClusterInfo to contain a list of utilization samples rather than a single one.
I decided not to include the information about hot spotting in this, because it's hard to imagine what it'll look like without having done the work to calculate it & interpret it.
Happy to add it if we think we are set on what that looks like.