Why your Elasticsearch cluster is slow — and how to fix it

Why your Elasticsearch cluster is slow — and how to fix it

Why your Elasticsearch cluster is slow — and how to fix it

Is your Elasticsearch cluster grinding to a halt during queries or indexing? We’ve helped teams across industries identify—and fix—their slowdowns. In this post, we break down the most common causes of Elasticsearch lag and how to address them.

Oversharding

What is oversharding?

Having too many small shards relative to your data volume.

Why oversharding affects cluster performance.

Every shard is a Lucene index with its own memory and file handles. Too many shards = wasted resources and poor performance.

How to fix oversharding.

Use the 20–40GB per shard rule of thumb. Merge small indices. Use index rollover with ILM.

Poor mapping design

What is poor mapping in Elasticsearch?

Using dynamic mappings, unnecessary text fields, or high-cardinality keyword fields.

Why poor mapping affects cluster performance.

Increases heap usage and slows down queries, especially aggregations.

How to fix mapping in Elasticsearch.

Review mappings. Use keyword instead of text where appropriate. Avoid fields with high uniqueness unless necessary.

Unoptimized queries

What are unoptimized queries?

Using wildcard or regexp on analyzed fields, requesting too many shards, or using deep pagination (from + size).

Why unoptimized queries affect cluster performance.

These queries are computationally expensive.

How to fix unoptimized queries.

Use filters where possible. Limit shards in queries. Use search_after instead of deep from pagination.

Disk or heap pressure

What is disk and heap pressure?

Elasticsearch nodes suffering from GC pauses or disk I/O bottlenecks.

Why disk and heap pressure affect cluster performance.

Heap pressure leads to GC thrashing.  Slow disks hurt segment merges and snapshotting.

How to fix disk and heap pressure.

Use SSDs, monitor with _nodes/stats, tune GC. Consider heap sizing based on node roles.

Misconfigured refresh intervals and merge policies

What are misconfigured refresh and merge settings?

Using too frequent refreshes or default merge settings that don’t match your workload.

Why do misconfigured refresh and merge settings affect cluster performance.

Increases segment count and reduces query performance.

How to fix misconfigured refresh and merge settings.

For heavy ingest, raise refresh_interval to 30s or more. Review merge throttling.

Summing it up

Slow Elasticsearch clusters don’t have to stay that way. From mapping to merges, many performance issues are easy to fix—once you know where to look.

Need a second pair of eyes on your cluster? Contact us for Elasticsearch support services.

24x7 Elasticsearch Support & Consulting

24x7 Elasticsearch Support & Consulting

24x7 Elasticsearch Support & Consulting

Visit our Elasticsearch page for more details on our support services.

Scroll to Top

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading