I am having the following problem.
$ cat /var/log/elasticsearch/elasticsearch.log | grep WARN
[2021-07-09T00:04:51,795][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][young][214003][2290] duration [1.7s], collections [1]/[2.5s], total [1.7s]/[21.7m], memory [5.7gb]->[3.4gb]/[30gb], all_pools {[young] [512mb]->[16mb]/[0b]}{[old] [4.4gb]->[3.4gb]/[30gb]}{[survivor] [848mb]->[64mb]/[0b]}
[2021-07-09T00:04:51,899][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][214003] overhead, spent [1.7s] collecting in the last [2.5s]
[2021-07-09T01:14:38,495][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][young][218183][2319] duration [5.4s], collections [1]/[6s], total [5.4s]/[21.8m], memory [5.7gb]->[4gb]/[30gb], all_pools {[young] [176mb]->[32mb]/[0b]}{[old] [4.3gb]->[3.9gb]/[30gb]}{[survivor] [1.2gb]->[64mb]/[0b]}
[2021-07-09T01:14:38,505][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][218183] overhead, spent [5.4s] collecting in the last [6s]
[2021-07-09T01:30:04,271][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][219107] overhead, spent [718ms] collecting in the last [1.1s]
[2021-07-09T02:17:41,291][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][young][221962][2344] duration [1.5s], collections [1]/[2.3s], total [1.5s]/[21.8m], memory [21.1gb]->[4.7gb]/[30gb], all_pools {[young] [16.7gb]->[64mb]/[0b]}{[old] [3.2gb]->[3.2gb]/[30gb]}{[survivor] [1.1gb]->[1.3gb]/[0b]}
[2021-07-09T02:17:41,313][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][221962] overhead, spent [1.5s] collecting in the last [2.3s]
[2021-07-09T11:39:17,849][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][young][255645][2418] duration [2.5s], collections [1]/[2.5s], total [2.5s]/[22m], memory [5.3gb]->[3.1gb]/[30gb], all_pools {[young] [736mb]->[32mb]/[0b]}{[old] [3.9gb]->[2.9gb]/[30gb]}{[survivor] [768mb]->[72mb]/[0b]}
[2021-07-09T11:39:17,851][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][255645] overhead, spent [2.5s] collecting in the last [2.5s]
[2021-07-09T12:31:40,883][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][young][258786][2434] duration [1.7s], collections [1]/[2.2s], total [1.7s]/[22m], memory [21.2gb]->[4.5gb]/[30gb], all_pools {[young] [16.7gb]->[80mb]/[0b]}{[old] [3.3gb]->[3.3gb]/[30gb]}{[survivor] [1.1gb]->[1gb]/[0b]}
[2021-07-09T12:31:41,374][WARN ][o.e.m.j.JvmGcMonitorService] [ITS-ELST-01] [gc][258786] overhead, spent [1.7s] collecting in the last [2.2s]
I think that is a warning that the heap memory is exhausted, but I believe that the heap memory is well provided for.
The basis for this is the following values.
- Memory capacity
$ free
total used free shared buff/cache available
Mem: 32779936 31255628 222328 204 1301980 1121152
Swap: 33554424 6078000 27476424
- Allocating Heap Size to ElasticSearch
$ cat /etc/elasticsearch/jvm.options
################################################################
## IMPORTANT: JVM heap size
################################################################
-Xms30g
-Xmx30g
- Heap size in use
$ curl -X GET "localhost:9200/_cat/nodes?v=true&h=heap.current&pretty"
heap.current
13.2gb
- Number of shards
$ curl -X GET http://localhost:9200/_count?pretty
{
"count" : 8005914274,
"_shards" : {
"total" : 712,
"successful" : 712,
"skipped" : 0,
"failed" : 0
}
}
What steps does this suggest need to be taken?