Is 20 shards per index ok?

(596375269) #1

Hi., to All.
Good Evening.

We have a indice with total size of 80G(28m documents),(5 shards ,2 replicas), and when do some queries ,commonly costs 40ms,

but after we changed sharding number to 20, time costs decreased to 10~15ms

if there is any disadvantages of having 20 shards for one index?

our data node number is 5

current shard per node is about 150,but other shard is not so big

Thanks to you all.


(Christian Dahlqvist) #2

That depends on your use case. If you have a search use case with a fixed number of indices, and the shard count will not increase further, it may be fine. If you on the other hand are using time-based indices, the larger number of shards generated per time period will cause additional overhead. Also look at measuring query performance at expected production load. having 20 shards may allow you to do more work in parallel when you have few queries, resulting in lower latencies, but this may no longer be the case as the number of concurrent queries grow and a larger number of tasks need to be queued up.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.