# Long GC pauses on data nodes

**URL:** <https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251>\
**Category:** Elasticsearch\
**Created:** [March 21, 2019, 6:03am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251 "2019-03-21T06:03:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvind297](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@arvind297](https://discuss.elastic.co/u/arvind297)\
**Post date:** [March 21, 2019, 6:03am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/1 "2019-03-21T06:03:16Z")

</div>

Hi,

We are seeing hot nodes going out frequently(atleast once in a day) with the below error and we need to restart the services manually to add the node back to the cluster.

We have 8 hot nodes and Most of the time nodes go down with heap memory consumption more than 90% and long GC pauses (sometimes in Minutes).

[gc][69753] overhead, spent [54s] collecting in the last [54.9s]  
[gc][old][69754][152] duration [42s], collections [1]/[42.5s], total [42s]/[3.5m], memory [30.3gb]-\>[30.7gb]/[30.9gb], all\_pools {[young] [38.9mb]-\>[389.8mb]/[532.5mb]}{[survivor] [0b]-\>[0b]/[66.5mb]}{[old] [30.3gb]-\>[30.3gb]/[30.3gb]}

ERROR Recovering from [gc][old][69754][152] duration [42s], collections [1]/[42.5s], total [42s]/[3.5m], memory [30.3gb]-\>[30.7gb]/[30.9gb], all\_pools {[young] [38.9mb]-\>[389.8mb]/[532.5mb]}{[survivor] [0b]-\>[0b]/[66.5mb]}{[old] [30.3gb]-\>[30.3gb]/[30.3gb]}

Around 76 TB of data is stored in our cluster and around 10 TB of data in HOT nodes(1.7 tb of space is allocated on each hot node and around 300-400gb of free space is available).

We have allocated 31GB of memory on each hot node and around 350 shards currently exists on each hot node.

Please suggest is there any way we can check what is causing huge memory consumption on the hot nodes,I was thinking ingestion might be one of the reason.  
Is there anything which we can check specifically to find the root cause.

Most of the time we face this issue only on hot nodes.

ES version:6.2

Any help here is much appreciated.

Thanks,  
Aravind

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2019, 6:37am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/2 "2019-03-21T06:37:15Z")

</div>

Do you have any non-default settings in your Elasticsearch config? What is heap pressure looking like on the data nodes and how much data do these hold? Are you sending queries to all nodes in the cluster or just to hot nodes? What type of data are you ingesting? What is your ingest rate?

---

<div class="post-metadata">

**Author:** ![arvind297](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@arvind297](https://discuss.elastic.co/u/arvind297)\
**Post date:** [March 21, 2019, 6:55am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/3 "2019-03-21T06:55:13Z")

</div>

"cluster": {  
"routing": {  
"use\_adaptive\_replica\_selection": "true",  
"allocation": {  
"allow\_rebalance": "always",  
"cluster\_concurrent\_rebalance": "5",  
"node\_concurrent\_recoveries": "5",  
"disk": {  
"watermark": {  
"low": "80gb",  
"flood\_stage": "10gb",  
"high": "50gb"  
}  
},  
"node\_initial\_primaries\_recoveries": "5"  
}  
},  
"info": {  
"update": {  
"interval": "1m"  
}  
}  
},  
"indices": {  
"recovery": {  
"max\_bytes\_per\_sec": "200mb"  
}  
},  
"search": {  
"default\_search\_timeout": "90s"  
},

Data is getting ingested to all the 8 hot nodes,Most of the times heap memory consumption will be \< 75%.  
There will be a spike atleast once in a day where it crosses more than 90% and we see long GC pauses(sometimes in minutes) in the logfiles.

We have allocated 1.7 tb space on each hot nodes and all the hot nodes hold around 1-1.3 TB of data,We were expecting any expensive search queries might be causing this issue and search time out parameter is set to 90 seconds.  
But still we are seeing the same issue.

Around 1 to 1.2 TB of data is ingested per day.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2019, 7:11am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/4 "2019-03-21T07:11:22Z")

</div>

I was looking for settings in the elasticsearch.yml file, e.g. if you have increased the bulk size queue or similar. Have you tried moving data off the hot nodes a bit earlier to store less data on them? What does the [cluster stats API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html) give?

---

<div class="post-metadata">

**Author:** ![arvind297](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@arvind297](https://discuss.elastic.co/u/arvind297)\
**Post date:** [March 21, 2019, 7:31am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/5 "2019-03-21T07:31:39Z")

</div>

We have a curator job which is scheduled to move data from hot to warm nodes daily.

Please find the memory related details below.

"nodes": {  
"count": {  
"total": 31,  
"data": 25,  
"coordinating\_only": 3,  
"master": 3,  
"ingest": 11  
},  
"versions": [  
"6.2.0"  
],  
"os": {  
"available\_processors": 260,  
"allocated\_processors": 260,

"mem": {  
"total": "1.6tb",  
"total\_in\_bytes": 1804223500288,  
"free": "124.2gb",  
"free\_in\_bytes": 133380161536,  
"used": "1.5tb",  
"used\_in\_bytes": 1670843338752,  
"free\_percent": 7,  
"used\_percent": 93  
}  
},  
"process": {  
"cpu": {  
"percent": 1002  
},  
"open\_file\_descriptors": {  
"min": 929,  
"max": 8385,  
"avg": 3197  
}  
},  
"jvm": {  
"max\_uptime": "22d",  
"max\_uptime\_in\_millis": 1909155466,  
"versions": [  
{  
"version": "1.8.0\_192",  
"vm\_name": "Java HotSpot(TM) 64-Bit Server VM",  
"vm\_version": "25.192-b12",  
"vm\_vendor": "Oracle Corporation",  
"count": 31  
}  
],  
"mem": {  
"heap\_used": "397.1gb",  
"heap\_used\_in\_bytes": 426438577024,  
"heap\_max": "840.9gb",  
"heap\_max\_in\_bytes": 902976372736  
},  
"threads": 6498  
},

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2019, 8:28am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/6 "2019-03-21T08:28:01Z")

</div>

Can you please post the full output? I am primarily interested in the sections showing memory usage related to indices and shards.

---

<div class="post-metadata">

**Author:** ![arvind297](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@arvind297](https://discuss.elastic.co/u/arvind297)\
**Post date:** [March 21, 2019, 8:40am UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/7 "2019-03-21T08:40:16Z")

</div>

{  
"\_nodes": {  
"total": 31,  
"successful": 31,  
"failed": 0  
},  
"cluster\_name": "\<cluster\_name\>",  
"timestamp": 1553152785205,  
"status": "green",  
"indices": {  
"count": 6958,  
"shards": {  
"total": 20039,  
"primaries": 10009,  
"replication": 1.0020981116994705,  
"index": {  
"shards": {  
"min": 1,  
"max": 25,  
"avg": 2.8799942512216155  
},  
"primaries": {  
"min": 1,  
"max": 5,  
"avg": 1.438488071284852  
},  
"replication": {  
"min": 0,  
"max": 24,  
"avg": 1.0030181086519114  
}  
}  
},  
"docs": {  
"count": 133847115321,  
"deleted": 17695178  
},  
"store": {  
"size": "75.8tb",  
"size\_in\_bytes": 83358461265286  
},  
"fielddata": {  
"memory\_size": "3.8gb",  
"memory\_size\_in\_bytes": 4085858256,  
"evictions": 0  
},  
"query\_cache": {  
"memory\_size": "4.1gb",  
"memory\_size\_in\_bytes": 4407021212,  
"total\_count": 12359903,  
"hit\_count": 328527,  
"miss\_count": 12031376,  
"cache\_size": 43538,  
"cache\_count": 44066,  
"evictions": 528  
},  
"completion": {  
"size": "0b",  
"size\_in\_bytes": 0  
},  
"segments": {  
"count": 384832,  
"memory": "147.4gb",  
"memory\_in\_bytes": 158319407915,  
"terms\_memory": "110.9gb",  
"terms\_memory\_in\_bytes": 119111301300,  
"stored\_fields\_memory": "31.4gb",  
"stored\_fields\_memory\_in\_bytes": 33765067912,  
"term\_vectors\_memory": "0b",  
"term\_vectors\_memory\_in\_bytes": 0,  
"norms\_memory": "320.6mb",  
"norms\_memory\_in\_bytes": 336177088,  
"points\_memory": "4.4gb",  
"points\_memory\_in\_bytes": 4827562359,  
"doc\_values\_memory": "266.3mb",  
"doc\_values\_memory\_in\_bytes": 279299256,  
"index\_writer\_memory": "459.1mb",  
"index\_writer\_memory\_in\_bytes": 481473526,  
"version\_map\_memory": "233.3kb",  
"version\_map\_memory\_in\_bytes": 238900,  
"fixed\_bit\_set": "184.5kb",  
"fixed\_bit\_set\_memory\_in\_bytes": 189008,  
"max\_unsafe\_auto\_id\_timestamp": 1553152036160,  
"file\_sizes": {}  
}  
},  
"nodes": {  
"count": {  
"total": 31,  
"data": 25,  
"coordinating\_only": 3,  
"master": 3,  
"ingest": 11  
},  
"versions": [  
"6.2.0"  
],  
"os": {  
"available\_processors": 260,  
"allocated\_processors": 260,  
"names": [  
{  
"name": "Linux",  
"count": 31  
}  
],  
"mem": {  
"total": "1.6tb",  
"total\_in\_bytes": 1804223500288,  
"free": "124.2gb",  
"free\_in\_bytes": 133380161536,  
"used": "1.5tb",  
"used\_in\_bytes": 1670843338752,  
"free\_percent": 7,  
"used\_percent": 93  
}  
},  
"process": {  
"cpu": {  
"percent": 1002  
},  
"open\_file\_descriptors": {  
"min": 929,  
"max": 8385,  
"avg": 3197  
}  
},  
"jvm": {  
"max\_uptime": "22d",  
"max\_uptime\_in\_millis": 1909155466,  
"versions": [  
{  
"version": "1.8.0\_192",  
"vm\_name": "Java HotSpot(TM) 64-Bit Server VM",  
"vm\_version": "25.192-b12",  
"vm\_vendor": "Oracle Corporation",  
"count": 31  
}  
],  
"mem": {  
"heap\_used": "397.1gb",  
"heap\_used\_in\_bytes": 426438577024,  
"heap\_max": "840.9gb",  
"heap\_max\_in\_bytes": 902976372736  
},  
"threads": 6498  
},  
"fs": {  
"total": "195.6tb",  
"total\_in\_bytes": 215152809619456,  
"free": "119.2tb",  
"free\_in\_bytes": 131149386911744,  
"available": "109.4tb",  
"available\_in\_bytes": 120300727922688  
},

---

<div class="post-metadata">

**Author:** ![arvind297](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@arvind297](https://discuss.elastic.co/u/arvind297)\
**Post date:** [March 21, 2019, 12:59pm UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/8 "2019-03-21T12:59:01Z")

</div>

can anyone please provide some input on how to proceed on this issue.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 21, 2019, 4:30pm UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/9 "2019-03-21T16:30:22Z")

</div>

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

Also please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

---

<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:** [April 18, 2019, 4:30pm UTC](https://discuss.elastic.co/t/long-gc-pauses-on-data-nodes/173251/10 "2019-04-18T16:30:26Z")

</div>

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