# Sharding is important with small dataset?

**URL:** <https://discuss.elastic.co/t/sharding-is-important-with-small-dataset/90668>\
**Category:** Elasticsearch\
**Created:** [June 23, 2017, 4:16pm UTC](https://discuss.elastic.co/t/sharding-is-important-with-small-dataset/90668 "2017-06-23T16:16:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diego.bernardes](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@diego.bernardes](https://discuss.elastic.co/u/diego.bernardes)\
**Post date:** [June 23, 2017, 4:16pm UTC](https://discuss.elastic.co/t/sharding-is-important-with-small-dataset/90668/1 "2017-06-23T16:16:22Z")

</div>

My dataset is very small (+- 7gb) and our machines are big enough to keep everything on memory (32gb machines), but we do tons of queries on this dataset. I'm trying to find the the best cluster setup for this scenario.

Should we keep the default 5 shard configuration or go down to 1 shard? The shard is important if your server can't keep all the dataset on memory, right? In our case, we can keep on memory.

Or should i keep the 5 shards, but stay with them in all machines?

The idea is if everything in the same shard, we has less wast of time with shards data merging during query.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 23, 2017, 4:32pm UTC](https://discuss.elastic.co/t/sharding-is-important-with-small-dataset/90668/2 "2017-06-23T16:32:41Z")

</div>

I'd go with 1 shard only (and test) but I'd increase the number of replicas so your cluster will be able to serve more distributed searches.

---

<div class="post-metadata">

**Author:** ![diego.bernardes](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@diego.bernardes](https://discuss.elastic.co/u/diego.bernardes)\
**Post date:** [June 23, 2017, 4:42pm UTC](https://discuss.elastic.co/t/sharding-is-important-with-small-dataset/90668/3 "2017-06-23T16:42:46Z")

</div>

Gonna do that, and yes, today we have several replicas, but with lots of shards and this small dataset.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 21, 2017, 4:42pm UTC](https://discuss.elastic.co/t/sharding-is-important-with-small-dataset/90668/4 "2017-07-21T16:42:56Z")

</div>

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