# Will increasing the number of shards to utilize more CPU and improve performance?

**URL:** <https://discuss.elastic.co/t/will-increasing-the-number-of-shards-to-utilize-more-cpu-and-improve-performance/84868>\
**Category:** Elasticsearch\
**Created:** [May 8, 2017, 3:05am UTC](https://discuss.elastic.co/t/will-increasing-the-number-of-shards-to-utilize-more-cpu-and-improve-performance/84868 "2017-05-08T03:05:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![red888](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@red888](https://discuss.elastic.co/u/red888)\
**Post date:** [May 8, 2017, 3:05am UTC](https://discuss.elastic.co/t/will-increasing-the-number-of-shards-to-utilize-more-cpu-and-improve-performance/84868/1 "2017-05-08T03:05:06Z")

</div>

Previously I asked a question about optimizing my ES searches: [I think my heap is sized right but searches are still super slow](https://discuss.elastic.co/t/i-think-my-heap-is-sized-right-but-searches-are-still-super-slow/83914/7)

This is just one index.  
I have 5 nodes and set it to 5 shards and one replica.  
My shards are large 120-180 gigs and CPU on my nodes is consistently below 7% (they have 8 cores).

If I double or even triple my shards will that improve searches and possibly index time by taking advantage of the underutilized CPUs? I have a lot of CPU capacity.

Also, I have a feeling I'll have to break up the shards anyway because they are kind of unwieldy at this size.

Any tips?

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [May 8, 2017, 3:28am UTC](https://discuss.elastic.co/t/will-increasing-the-number-of-shards-to-utilize-more-cpu-and-improve-performance/84868/2 "2017-05-08T03:28:12Z")

</div>

You might want to look at my reply in a recent thread here... [Cluster topology consideration](https://discuss.elastic.co/t/cluster-topology-consideration/83564/5?u=rcowart)

The key point is that you are likely to be limited by disk IO and memory, long before CPU is a concern.

Your indexes are pretty large so index speed will be impacted. If this is time series data you should consider daily (or some other time interval) indexes, which are also discussed in that other thread.

Rob

---

<div class="post-metadata">

**Author:** ![red888](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@red888](https://discuss.elastic.co/u/red888)\
**Post date:** [May 8, 2017, 6:44pm UTC](https://discuss.elastic.co/t/will-increasing-the-number-of-shards-to-utilize-more-cpu-and-improve-performance/84868/3 "2017-05-08T18:44:09Z")

</div>

1. These indices are daily
2. But getting back to my original question, will doubling or tripling my shard size improve performance (assuming my nodes can handle the added resources it will require)?
3. OR would it be better to keep the shard size the same and split my indices on 6 hour increments which would give me 4 times my current number of indices
4. In general more shards or more indices?

Thanks for the help!

---

<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:** [June 5, 2017, 6:51pm UTC](https://discuss.elastic.co/t/will-increasing-the-number-of-shards-to-utilize-more-cpu-and-improve-performance/84868/4 "2017-06-05T18:51:26Z")

</div>

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