mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 22:45:04 +00:00
The current heuristic to compute a default shard size is pretty aggressive, it returns `max(10, number_of_shards * size)` as a value for the shard size. I think making it less aggressive has the benefit that it would reduce the likelyness of running into OOME when there are many shards (yearly aggregations with time-based indices can make numbers of shards in the thousands) and make the use of breadth-first more likely/efficient. This commit replaces the heuristic with `size * 1.5 + 10`, which is enough to have good accuracy on zipfian distributions.