# Is there a preferred config for Index / Shard configuration? Lots of indexes with lots of shards or fewer indexes and bigger shards?

**URL:** https://discuss.elastic.co/t/is-there-a-preferred-config-for-index-shard-configuration-lots-of-indexes-with-lots-of-shards-or-fewer-indexes-and-bigger-shards/21490
**Category:** Elasticsearch
**Created:** [January 5, 2015, 9:51pm UTC](https://discuss.elastic.co/t/is-there-a-preferred-config-for-index-shard-configuration-lots-of-indexes-with-lots-of-shards-or-fewer-indexes-and-bigger-shards/21490 "2015-01-05T21:51:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mike\_giardinelli](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@mike\_giardinelli](https://discuss.elastic.co/u/mike_giardinelli)
#### Post date: [January 5, 2015, 9:51pm UTC](https://discuss.elastic.co/t/is-there-a-preferred-config-for-index-shard-configuration-lots-of-indexes-with-lots-of-shards-or-fewer-indexes-and-bigger-shards/21490/1 "2015-01-05T21:51:42Z")

</div>

Hi All,

We have started noticing in our environment that our query performance is  
starting to suffer for some of our datasets that span the roughly 1 year of  
data we keep online. We are looking into optimizations we can make to our  
Index / Shard configuration and I was wondering if there is a preferable  
way to configure our indexes / shards? Right now we create a new index for  
each week and have 22 shards per index (We have 22 data nodes). Would it  
be more optimal to reduce the number of indexes (index by month) and have  
larger shards? Our documents are kb in size so they are not all that big,  
we just have a lot of them.

The feedback we typically get back from support is just test and see. That  
is something we can do, but there is a fair amount of effort / time that we  
would need to put in to only find that it doesn't give us any benefit. I  
was just hoping some of the more experienced folks could provide some input  
on possible solutions. If all else fails, we can always try to test  
different configs.

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 5, 2015, 10:26pm UTC](https://discuss.elastic.co/t/is-there-a-preferred-config-for-index-shard-configuration-lots-of-indexes-with-lots-of-shards-or-fewer-indexes-and-bigger-shards/21490/2 "2015-01-05T22:26:54Z")

</div>

One shard per node is ideal as you spread the load.  
Reducing the shard count can help but it depends on a few things.

How much data do you have in your cluster, how many indexes?

On 6 January 2015 at 08:51, [mike.giardinelli@gmail.com](mailto:mike.giardinelli@gmail.com) wrote:

> Hi All,
> 
> We have started noticing in our environment that our query performance is  
> starting to suffer for some of our datasets that span the roughly 1 year of  
> data we keep online. We are looking into optimizations we can make to our  
> Index / Shard configuration and I was wondering if there is a preferable  
> way to configure our indexes / shards? Right now we create a new index for  
> each week and have 22 shards per index (We have 22 data nodes). Would it  
> be more optimal to reduce the number of indexes (index by month) and have  
> larger shards? Our documents are kb in size so they are not all that big,  
> we just have a lot of them.
> 
> The feedback we typically get back from support is just test and see.  
> That is something we can do, but there is a fair amount of effort / time  
> that we would need to put in to only find that it doesn't give us any  
> benefit. I was just hoping some of the more experienced folks could  
> provide some input on possible solutions. If all else fails, we can always  
> try to test different configs.
> 
> Thanks!
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-yUUxqLWaPtAtdPmzMNROXSzH%3D0qoVKK3XtJJDWSP0rg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-yUUxqLWaPtAtdPmzMNROXSzH%3D0qoVKK3XtJJDWSP0rg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![mike\_giardinelli](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@mike\_giardinelli](https://discuss.elastic.co/u/mike_giardinelli)
#### Post date: [January 5, 2015, 10:44pm UTC](https://discuss.elastic.co/t/is-there-a-preferred-config-for-index-shard-configuration-lots-of-indexes-with-lots-of-shards-or-fewer-indexes-and-bigger-shards/21490/3 "2015-01-05T22:44:15Z")

</div>

Hi Mark,

Thanks for the reply! We have roughly 13 TB of data and about 40 indexes (1  
index per week). For each index we have 22 shards (one for every data  
node).

On Monday, January 5, 2015 2:27:24 PM UTC-8, Mark Walkom wrote:

> One shard per node is ideal as you spread the load.  
> Reducing the shard count can help but it depends on a few things.
> 
> How much data do you have in your cluster, how many indexes?
> 
> On 6 January 2015 at 08:51, \<[mike.gia...@gmail.com](mailto:mike.gia...@gmail.com) \<javascript:\>\> wrote:
> 
> > Hi All,
> > 
> > We have started noticing in our environment that our query performance is  
> > starting to suffer for some of our datasets that span the roughly 1 year of  
> > data we keep online. We are looking into optimizations we can make to our  
> > Index / Shard configuration and I was wondering if there is a preferable  
> > way to configure our indexes / shards? Right now we create a new index for  
> > each week and have 22 shards per index (We have 22 data nodes). Would it  
> > be more optimal to reduce the number of indexes (index by month) and have  
> > larger shards? Our documents are kb in size so they are not all that big,  
> > we just have a lot of them.
> > 
> > The feedback we typically get back from support is just test and see.  
> > That is something we can do, but there is a fair amount of effort / time  
> > that we would need to put in to only find that it doesn't give us any  
> > benefit. I was just hoping some of the more experienced folks could  
> > provide some input on possible solutions. If all else fails, we can always  
> > try to test different configs.
> > 
> > Thanks!
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/12e73093-236b-4656-b6d5-960b31df7747%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/65c2167b-905a-4403-bab8-fef301c57287%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65c2167b-905a-4403-bab8-fef301c57287%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:40am UTC](https://discuss.elastic.co/t/is-there-a-preferred-config-for-index-shard-configuration-lots-of-indexes-with-lots-of-shards-or-fewer-indexes-and-bigger-shards/21490/4 "2017-07-06T00:40:42Z")

</div>


