Enabling G1GC in Docker ELK's Elasticsearch

Update 22 Oct 2019: Using G1GC did bring down the CPU usage a bit, but the excessive CPU usage is caused by an Elasticsearch bug described in this GitHub issue. There are some GC issues causing Elasticsearch in the ELK stack to freeze and hit 100% CPU usage. The ELK is setup using docker-elk. Elasticsearch 6.5 comes with G1GC support according to this official post. Let’s see if it helps.