# ES 6.2 Percolator causes very high CPU utilization

**URL:** https://discuss.elastic.co/t/es-6-2-percolator-causes-very-high-cpu-utilization/128093
**Category:** Elasticsearch
**Created:** [April 16, 2018, 1:06am UTC](https://discuss.elastic.co/t/es-6-2-percolator-causes-very-high-cpu-utilization/128093 "2018-04-16T01:06:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![meghna1292](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@meghna1292](https://discuss.elastic.co/u/meghna1292)
#### Post date: [April 16, 2018, 1:06am UTC](https://discuss.elastic.co/t/es-6-2-percolator-causes-very-high-cpu-utilization/128093/1 "2018-04-16T01:06:03Z")

</div>

Hi,  
I am currently using AWS ES 6.2 for the percolator. I have a dedicated cluster for the percolator which has a single index that contains ~16,000 percolator queries (~30MB).  
I have about 10000 percolator query invocations to the cluster per minute. With this, I am experiencing a max CPU of about 80%.

Here's my cluster configuration:

Instance type: c4.4xlarge.elasticsearch  
Nodes: 20 data + 3 master  
Shards: 8 Primary + 9 Replica

Sample percolator query:

```auto
{
 "parentNode": "123",
 "isActive": true,
 "query": {
            "bool": {
              "should": [
                {
                  "bool": {
                    "must": [
                      {
                        "query_string": {
                          "query": "\"great results\", \"good results\", \"excellent results\"",
                          "analyzer": "english"
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }

```

Sample request sent to the percolator:

```javascript
{
            "size": 100,
            "_source": False,
            "query": {
                "bool": {
                    "filter": {
                        "percolate": {
                            "field": "query",
                            "documents": [contains a list of 100 documents with same metafields]
                        }
                    },
                    "must": [
                        {
                            "terms": {
                                "parentNode": ['123', '234']
                            }
                        },
                        {
                            "term": {
                                "isActive": true
                            }
                        }
                    ]
                }
            }
        }

```

I am using the 2 filters to narrow down the candidate queries to percolate on.

Am I using the percolator wrong? The documentation states that performance of the percolator has improved a lot from earlier versions (I used AWS ES 1.5 earlier) but I only see the performance degrading. Can I get any suggestions on this?

Thank you

---

<div class="post-metadata">

### Author: ![Daniel\_Penning](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_penning/32/48792_2.png) [@Daniel\_Penning](https://discuss.elastic.co/u/Daniel_Penning)
#### Post date: [April 18, 2018, 12:20pm UTC](https://discuss.elastic.co/t/es-6-2-percolator-causes-very-high-cpu-utilization/128093/2 "2018-04-18T12:20:25Z")

</div>

Could you enable [profiling](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-profile.html#search-profile) to see which step of executing the query takes too long.

Yesterday i encountered some slow percolate queries which took very long to create the scorers for the candidate query. I am not sure yet if this is caused by the low amount of available memory on my development server or if there is an actual performance bottleneck.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 16, 2018, 12:20pm UTC](https://discuss.elastic.co/t/es-6-2-percolator-causes-very-high-cpu-utilization/128093/3 "2018-05-16T12:20:53Z")

</div>

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