I got alerted that our CPU usage is high and according to some metrics elasticsearch is consuming cpu. This was the last log of elasticsearch, but it's still working fine though
[INFO ][o.e.m.j.JvmGcMonitorService] [iJXOMG0] [gc] overhead, spent [261ms] collecting in the last [1s]
Shortly after this, the alert triggered
Another thing is that the last time this log showed the number seems to be small
[o.e.m.j.JvmGcMonitorService] [iJXOMG0] [gc] overhead, spent [272ms] collecting in the last [1s]
How could I lower down the CPU usage?
Elasticsearch is running on docker and I have set
ES_JAVA_OPTS: "-Xmx512m -Xms512m"