Skip to content

Aggregations can be bottlenecked on ChildMemoryCircuitBreaker.limit() #58647

Closed
@hackerwin7

Description

@hackerwin7

In the method of ChildMemoryCircuitBreaker.addEstimateBytesAndMaybeBreak(), the limit() method would do while loop atomically compare and set the used value.

when we test the high qps query to ES-node, the major cost is ChildMemoryCircuitBreaker.limit() which cause to AggregationPhase.preProcess()'s cost is extremely high

If data node receive high qps complicated search request body, and data-node will be busy to create aggregator, and it will lead to SumAggregator.<init>, lead to BigArrays.newDoubleArray() and lead to BigArrays.adjustBreaker(), finally call breaker.addEstimateBytesAndMaybeBreak and ChildMemoryCircuitBreaker.limit()

Metadata

Metadata

Assignees

Labels

:Analytics/AggregationsAggregations:PerformanceAll issues related to Elasticsearch performance including regressions and investigationsTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Team:PerformanceMeta label for performance team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions