Getting GC overhead on Elasticsearch

You really need to upgrade urgently, 5.X has been EOL for quite some time now. Upgrading will also bring performance improvements to help with this.

You also need to reduce your shard count. See How do I increase or reduce the shard count of an existing index? for some ideas.