ES并发搜索查询运行非常缓慢

时间:2019-05-29 10:42:49

标签: elasticsearch

我正在使用单个节点集群进行弹性搜索。机器配置如下: 8 vcpu 16 RB RAM(8 GB分配给堆)

我有一个包含5个分片的索引,其中包含6700万份文档,大小为9 GB。

单个搜索查询最多在3-4秒内给出响应。该查询很复杂,由查询中的过滤器,多个字段的聚合和按一个脚本派生字段进行存储桶排序组成。

但是当我运行5个并发查询时,机器上的所有8个核心都达到了100%,我在16-17秒内得到了响应。

我对弹性搜索非常陌生。您能否解释为什么并发查询速度慢以及为什么CPU达到100%?我应该如何调试?

最初,我尝试了4 GB的堆,然后尝试了8 GB的堆,但是没有得到任何改善。

我有热线程转储。

Hot threads at 2019-05-29T10:22:42.499, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:
   83.1% (415.2ms out of 500ms) cpu usage by thread 'elasticsearch[cGMGVgo][search][T#13]'
     6/10 snapshots sharing following 32 elements
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.advanceExact(SingletonSortedNumericDoubleValues.java:44)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:78)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
     4/10 snapshots sharing following 30 elements
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
   76.3% (381.2ms out of 500ms) cpu usage by thread 'elasticsearch[cGMGVgo][search][T#8]'
     2/10 snapshots sharing following 34 elements
       org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$4.longValue(Lucene70DocValuesProducer.java:490)
       org.elasticsearch.index.fielddata.SortableLongBitsToNumericDoubleValues.doubleValue(SortableLongBitsToNumericDoubleValues.java:42)
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.nextValue(SingletonSortedNumericDoubleValues.java:54)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:85)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
     4/10 snapshots sharing following 33 elements
       org.elasticsearch.index.fielddata.FieldData$DoubleCastedValues.advanceExact(FieldData.java:446)
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.advanceExact(SingletonSortedNumericDoubleValues.java:44)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:78)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
     2/10 snapshots sharing following 34 elements
       org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$2.longValue(Lucene70DocValuesProducer.java:471)
       org.elasticsearch.index.fielddata.FieldData$DoubleCastedValues.doubleValue(FieldData.java:441)
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.nextValue(SingletonSortedNumericDoubleValues.java:54)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:85)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
     2/10 snapshots sharing following 30 elements
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:204)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
   76.0% (380.1ms out of 500ms) cpu usage by thread 'elasticsearch[cGMGVgo][search][T#9]'
     5/10 snapshots sharing following 33 elements
       org.elasticsearch.index.fielddata.FieldData$DoubleCastedValues.advanceExact(FieldData.java:446)
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.advanceExact(SingletonSortedNumericDoubleValues.java:44)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:78)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
     4/10 snapshots sharing following 34 elements
       org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$2.longValue(Lucene70DocValuesProducer.java:471)
       org.elasticsearch.index.fielddata.FieldData$DoubleCastedValues.doubleValue(FieldData.java:441)
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.nextValue(SingletonSortedNumericDoubleValues.java:54)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:85)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)
       org.elasticsearch.indices.IndicesService.cacheShardLevelResult(IndicesService.java:1299)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1235)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:349)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:398)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:360)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:356)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1117)
       org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:759)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
     unique snapshot
       org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$4.longValue(Lucene70DocValuesProducer.java:490)
       org.elasticsearch.index.fielddata.SortableLongBitsToNumericDoubleValues.doubleValue(SortableLongBitsToNumericDoubleValues.java:42)
       org.elasticsearch.index.fielddata.SingletonSortedNumericDoubleValues.nextValue(SingletonSortedNumericDoubleValues.java:54)
       org.elasticsearch.search.aggregations.metrics.sum.SumAggregator$1.collect(SumAggregator.java:85)
       org.elasticsearch.search.aggregations.MultiBucketCollector$MultiLeafBucketCollector.collect(MultiBucketCollector.java:195)
       org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:187)
       org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
       org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:103)
       org.elasticsearch.search.aggregations.bucket.terms.LongTermsAggregator.buildAggregation(LongTermsAggregator.java:157)
       org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:130)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:120)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1237)
       org.elasticsearch.indices.IndicesService$$Lambda$3474/438228420.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1293)
       org.elasticsearch.indices.IndicesService$$Lambda$3477/425852668.get(Unknown Source)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:164)
       org.elasticsearch.indices.IndicesRequestCache$Loader.load(IndicesRequestCache.java:147)
       org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:433)
       org.elasticsearch.indices.IndicesRequestCache.getOrCompute(IndicesRequestCache.java:119)

有人可以向我解释如何避免CPU使用率过高吗?我读到2-8核心足以满足ES节点的需求。

0 个答案:

没有答案