Last May I asked a similar question about performance in 7.17.10, but ran out of things to try and the discussion was auto-closed due to inactivity. I'll avoid repeating the same context info from that post (the initial post has important details on sharding strategy)
I have since upgraded to 8.9.1 (won the fight and didn't have to move to OpenSearch). Sadly I'm still having similar issues. The indexing rate tops out at ~100k/s (including replicas), with an average of 88.2k/s over the past 15min.
I'm also seeing up to 2s when writing a single document. Most data is written in batches of 600-1000 documents based on the data type, but for the least frequent data type a single write is appropriate. The 2s response time is surprising.
Current cluster sizing:
- 10 hot i3.2xlarge, 7.8 cpu, 55gi mem, 35g heap
- 6 warm d3.2xlarge, 7 cpu, 60 gi mem, 30g heap
- 20 cold d3.2xlarge, 7 cpu, 60 gi mem, 30g heap
- 3 master as pods w/ 4 cpu, 28gi mem, 22gi heap
In that cluster there are:
- 6258 indices
- 17514 total shards (I know this is high - it's split by tenant)
- 101 billion documents
- 191.3 TB
Changes since I asked in the earlier thread (other than the upgrade):
- increased parallelism to have more concurrent writes
- currently 70 parallel jobs, but it dynamically sizes based on ingest rate
- this increased the write queue size, but only on some nodes
Output from GET _cluster/settings/?flat_settings=true
{
"persistent": {
"cluster.routing.allocation.cluster_concurrent_rebalance": "30",
"cluster.routing.allocation.disk.watermark.low": "85%",
"indices.breaker.request.limit": "30%",
"indices.recovery.max_bytes_per_sec": "100mb"
},
"transient": {}
}
For cluster.routing.allocation.cluster_concurrent_rebalance
I tried the default value, 10, 30, and 50 to see if it allowed the cluster to redistribute shards more evenly with the new heuristics in es 8. I haven't seen a difference in ingestion rates or work distribution. Similar notes on indices.recovery.max_bytes_per_sec
.
The write load is very unevenly distributed. Hot tier nodes have
EC2 monitoring stats for the past 3h shows very uneven distribution, with the busiest instance around 96% cpu, and the quietest at ~33%.
Indexing rate by node is also very unbalanced:
hot-3 has an average write queue of 80, and the next busiest (hot-1) only has 10.
With 8.9 I would have expected it to rebalance using write load a bit more than it is. Do you have any recommendations on tuning the allocation, or troubleshooting the indexing bottleneck in general?