Maximum Shard Size in ElasticSearch


What is the maximum recommended shard size in elasticsearch? I have gone through this blog and this discussion.

It seems maximum shard size per index should be less than equal to the amount memory allocated to ES. For example if memory allocated to ES is 31 GB then 30 GB seems to be a good guess for an maximum shard size.

The doubt I am having is if each ES node is holding let's say 2 different indices and the RAM allotted to ES is 32 GB then should the maximum recommended shard size of each index is 15 GB or it is still 30 GB.

I know that exact value of maximum shard size will depend on the nature of document being indexed, indexing rate, search queries and search query rate. I want to approximate value of maximum shard size to get us started.

(Mark Walkom) #2

Not really.

The maximum number of docs in a shard is 2^31, which is a lucene hard limit.
Otherwise we recommend around ~50GB, as larger can be a problem when reallocating/recovering.

However use cases can vary and our advise does evolve. So as always, test to see if that size is ok for your requirements.

(system) #3