Slow terms aggregations after use of eager_global_ordinals

Hi team,
I have a use case where I need to perform aggregations on a keyword field which has high cardinality. As per the blog https://www.elastic.co/blog/improving-the-performance-of-high-cardinality-terms-aggregations-in-elasticsearch , Use of eager global ordinals should help in querying the results faster. But still it takes a lot of time. Following is my query.

 {
   "aggregations": {
     "traceIDs": {
       "aggregations": {
         "startTime": {
           "max": {
             "field": "startTime"
           }
         }
       },
       "terms": {
         "field": "traceID",
         "order": [
           {
             "startTime": "desc"
           }
         ],
         "size": 20
       }
     }
   },
   "query": {
     "bool": {
       "must": [
         {
           "range": {
             "startTime": {
               "from": 1601702100000000,
               "include_lower": true,
               "include_upper": true,
               "to": 1601705700000000
             }
           }
         },
         {
           "match": {
             "process.serviceName": {
               "query": "tracerClient"
             }
           }
         }
       ]
     }
   },
   "size": 0
 }'

I see field data increasing during indexing( which is expected) but still the query takes 21s to return the result . The shard is of 8gb size with 40million docs. I see no performance issues in terms of memory/CPU

Is this an expected response time given the high cardinality of traceID field. Or is there something which can be tuned here?

Hey,

the blog you linked post also mentions hot threads and profiling. Did you do both and can you share what you observed?

--Alex

Hi Sir,
Yes, I have tried both of them
hot_threads on the particular node having data shows the following

   100.1% (500.5ms out of 500ms) cpu usage by thread 'elasticsearch[cluster-4-data-hot-1][search][T#7]'
     2/10 snapshots sharing following 41 elements
       org.apache.lucene.codecs.lucene70.Lucene70DocValuesProducer$2.longValue(Lucene70DocValuesProducer.java:471)
       org.elasticsearch.index.fielddata.FieldData$DoubleCastedValues.doubleValue(FieldData.java:441)
       org.elasticsearch.search.aggregations.metrics.max.MaxAggregator$1.collect(MaxAggregator.java:126)
       org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectExistingBucket(BucketsAggregator.java:84)
       org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectBucket(BucketsAggregator.java:76)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.collectGlobalOrd(GlobalOrdinalsStringTermsAggregator.java:119)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.access$100(GlobalOrdinalsStringTermsAggregator.java:59)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator$2.collect(GlobalOrdinalsStringTermsAggregator.java:154)
       org.elasticsearch.search.aggregations.LeafBucketCollector.collect(LeafBucketCollector.java:82)
       org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174)
       org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:263)
       org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
       org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
       org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:276)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1252)
       org.elasticsearch.indices.IndicesService$$Lambda$2569/1728063762.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1308)
       org.elasticsearch.indices.IndicesService$$Lambda$2570/317524658.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:1314)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1250)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:348)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:394)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:359)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:355)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1107)
       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.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       java.lang.Thread.run(Thread.java:745)
     3/10 snapshots sharing following 38 elements
       org.elasticsearch.common.util.LongHash.set(LongHash.java:70)
       org.elasticsearch.common.util.LongHash.add(LongHash.java:110)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.collectGlobalOrd(GlobalOrdinalsStringTermsAggregator.java:114)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.access$100(GlobalOrdinalsStringTermsAggregator.java:59)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator$2.collect(GlobalOrdinalsStringTermsAggregator.java:154)
       org.elasticsearch.search.aggregations.LeafBucketCollector.collect(LeafBucketCollector.java:82)
       org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174)
       org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:263)
       org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
       org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
       org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:276)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1252)
       org.elasticsearch.indices.IndicesService$$Lambda$2569/1728063762.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1308)
       org.elasticsearch.indices.IndicesService$$Lambda$2570/317524658.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:1314)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1250)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:348)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:394)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:359)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:355)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1107)
       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.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       java.lang.Thread.run(Thread.java:745)
     2/10 snapshots sharing following 38 elements
       org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectExistingBucket(BucketsAggregator.java:83)
       org.elasticsearch.search.aggregations.bucket.BucketsAggregator.collectBucket(BucketsAggregator.java:76)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.collectGlobalOrd(GlobalOrdinalsStringTermsAggregator.java:119)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.access$100(GlobalOrdinalsStringTermsAggregator.java:59)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator$2.collect(GlobalOrdinalsStringTermsAggregator.java:154)
       org.elasticsearch.search.aggregations.LeafBucketCollector.collect(LeafBucketCollector.java:82)
       org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174)
       org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:263)
       org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
       org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
       org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:276)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1252)
       org.elasticsearch.indices.IndicesService$$Lambda$2569/1728063762.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1308)
       org.elasticsearch.indices.IndicesService$$Lambda$2570/317524658.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:1314)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1250)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:348)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:394)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:359)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:355)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1107)
       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.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       java.lang.Thread.run(Thread.java:745)

Continuation of hot_threads

     2/10 snapshots sharing following 39 elements
       org.apache.lucene.util.packed.MonotonicLongValues.get(MonotonicLongValues.java:40)
       org.apache.lucene.util.packed.PackedLongValues.get(PackedLongValues.java:108)
       org.apache.lucene.index.OrdinalMap$3.get(OrdinalMap.java:312)
       org.elasticsearch.index.fielddata.ordinals.GlobalOrdinalMapping.getGlobalOrd(GlobalOrdinalMapping.java:53)
       org.elasticsearch.index.fielddata.ordinals.GlobalOrdinalMapping.nextOrd(GlobalOrdinalMapping.java:67)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator$2.collect(GlobalOrdinalsStringTermsAggregator.java:153)
       org.elasticsearch.search.aggregations.LeafBucketCollector.collect(LeafBucketCollector.java:82)
       org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174)
       org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:263)
       org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
       org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
       org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:276)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1252)
       org.elasticsearch.indices.IndicesService$$Lambda$2569/1728063762.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1308)
       org.elasticsearch.indices.IndicesService$$Lambda$2570/317524658.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:1314)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1250)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:348)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:394)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:359)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:355)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1107)
       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.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       java.lang.Thread.run(Thread.java:745)
     unique snapshot
       org.elasticsearch.common.util.LongHash.add(LongHash.java:110)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.collectGlobalOrd(GlobalOrdinalsStringTermsAggregator.java:114)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.access$100(GlobalOrdinalsStringTermsAggregator.java:59)
       org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator$2.collect(GlobalOrdinalsStringTermsAggregator.java:154)
       org.elasticsearch.search.aggregations.LeafBucketCollector.collect(LeafBucketCollector.java:82)
       org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174)
       org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:263)
       org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
       org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
       org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:191)
       org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:276)
       org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114)
       org.elasticsearch.indices.IndicesService.lambda$loadIntoContext$17(IndicesService.java:1252)
       org.elasticsearch.indices.IndicesService$$Lambda$2569/1728063762.accept(Unknown Source)
       org.elasticsearch.indices.IndicesService.lambda$cacheShardLevelResult$18(IndicesService.java:1308)
       org.elasticsearch.indices.IndicesService$$Lambda$2570/317524658.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:1314)
       org.elasticsearch.indices.IndicesService.loadIntoContext(IndicesService.java:1250)
       org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:348)
       org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:394)
       org.elasticsearch.search.SearchService.access$100(SearchService.java:126)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:359)
       org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:355)
       org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1107)
       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.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751)
       org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       java.lang.Thread.run(Thread.java:745)

the profile API shows the following. (The timing shown in query above is of different time range than the in profile, but its still for a half hr duration on similar setup)

{   
  "took" : 88702,
  "timed_out" : false,
  "_shards" : {
    "total" : 7,
    "successful" : 7,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 20173620,
    "max_score" : 0.0,
    "hits" : [ ]
  },
  "profile" : {
    "shards" : [
      {
        "id" : "[jUBm-JpRShy_oVEUQtCfnw][jaeger-span-2020.09.28-000012][0]",
        "searches" : [
          {
            "query" : [
              {
                "type" : "BooleanQuery",
                "description" : "+startTime:[1601278500000000 TO 1601280300000000] +process.serviceName:tracerClient",
                "time_in_nanos" : 41245200385,
                "breakdown" : {
                  "score" : 0,
                  "build_scorer_count" : 62,
                  "match_count" : 0,
                  "create_weight" : 50934,
                  "next_doc" : 41185451070,
                  "match" : 0,
                  "create_weight_count" : 1,
                  "next_doc_count" : 20173651,
                  "score_count" : 0,
                  "build_scorer" : 39524667,
                  "advance" : 0,
                  "advance_count" : 0
                },
                "children" : [
                  {
                    "type" : "IndexOrDocValuesQuery",
                    "description" : "startTime:[1601278500000000 TO 1601280300000000]",
                    "time_in_nanos" : 8371996831,
                    "breakdown" : {
                      "score" : 0,
                      "build_scorer_count" : 93,
                      "match_count" : 0,
                      "create_weight" : 10851,
                      "next_doc" : 8314685204,
                      "match" : 0,
                      "create_weight_count" : 1,
                      "next_doc_count" : 20173651,
                      "score_count" : 0,
                      "build_scorer" : 37127031,
                      "advance" : 0,
                      "advance_count" : 0
                    }
                  },
                  {
                    "type" : "TermQuery",
                    "description" : "process.serviceName:tracerClient",
                    "time_in_nanos" : 8292989692,
                    "breakdown" : {
                      "score" : 0,
                      "build_scorer_count" : 93,
                      "match_count" : 0,
                      "create_weight" : 5490,
                      "next_doc" : 0,
                      "match" : 0,
                      "create_weight_count" : 1,
                      "next_doc_count" : 0,
                      "score_count" : 0,
                      "build_scorer" : 459348,
                      "advance" : 8272351109,
                      "advance_count" : 20173651
                    }
                  }
                ]
              }
            ],
            "rewrite_time" : 46543,
            "collector" : [
              {
                "name" : "CancellableCollector",
                "reason" : "search_cancelled",
                "time_in_nanos" : 76953353875,
                "children" : [
                  {
                    "name" : "MultiCollector",
                    "reason" : "search_multi",
                    "time_in_nanos" : 60351911921,
                    "children" : [
                      {
                        "name" : "TotalHitCountCollector",
                        "reason" : "search_count",
                        "time_in_nanos" : 8435452702
                      },
                      {
                        "name" : "ProfilingAggregator: [traceIDs]",
                        "reason" : "aggregation",
                        "time_in_nanos" : 26623291698
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "aggregations" : [
          {
            "type" : "GlobalOrdinalsStringTermsAggregator",
            "description" : "traceIDs",
            "time_in_nanos" : 22065512148,
            "breakdown" : {
              "reduce" : 0,
              "build_aggregation" : 2526372752,
              "build_aggregation_count" : 1,
              "initialize" : 31400,
              "initialize_count" : 1,
              "reduce_count" : 0,
              "collect" : 19518934374,
              "collect_count" : 20173620
            },
            "children" : [
              {
                "type" : "MaxAggregator",
                "description" : "startTime",
                "time_in_nanos" : 2086319,
                "breakdown" : {
                  "reduce" : 0,
                  "build_aggregation" : 54052,
                  "build_aggregation_count" : 40,
                  "initialize" : 2565,
                  "initialize_count" : 1,
                  "reduce_count" : 0,
                  "collect" : 2029621,
                  "collect_count" : 40
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

There is lot of overhead being added by profile, making it show more overall time

Hi
Any updates/insights on this @spinscale ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.