# Shards and scalability

**URL:** https://discuss.elastic.co/t/shards-and-scalability/117566
**Category:** Elasticsearch
**Created:** [January 30, 2018, 5:44am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566 "2018-01-30T05:44:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![reachnavneeth](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@reachnavneeth](https://discuss.elastic.co/u/reachnavneeth)
#### Post date: [January 30, 2018, 5:44am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/1 "2018-01-30T05:44:31Z")

</div>

We have a requirement for frequent updates but the total data size per index will not be more than 5 GB. How many shards should be allocated for fast updates? The rate at which the update will happen is around 50k updates per second and each document is less than 1kb in size. Also how many nodes do I need for better performance? Thanks.

---

<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 30, 2018, 5:46am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/2 "2018-01-30T05:46:38Z")

</div>

You really need to test this to be sure.

---

<div class="post-metadata">

### Author: ![reachnavneeth](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@reachnavneeth](https://discuss.elastic.co/u/reachnavneeth)
#### Post date: [January 30, 2018, 5:48am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/3 "2018-01-30T05:48:50Z")

</div>

true, but right now we have around 24 cores on 3 nodes but we are able to achieve only 3k updates per second and the CPU is constantly above 90%. What am I missing here?

---

<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 30, 2018, 5:51am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/4 "2018-01-30T05:51:02Z")

</div>

What version are you on?  
What JVM, OS?  
What hardware?  
What is your heap size?  
What is your document mapping?  
What are you actually updating?  
Are you monitoring everything? What does that show?  
How are you measuring this 3K number?

---

<div class="post-metadata">

### Author: ![reachnavneeth](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@reachnavneeth](https://discuss.elastic.co/u/reachnavneeth)
#### Post date: [January 30, 2018, 6:10am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/5 "2018-01-30T06:10:19Z")

</div>

Version: 5.5  
AWS Elasticsearch  
hardware: m4 2xlarge  
What is your heap size? 18GB  
What is your document mapping? we are using custom mapping  
What are you actually updating? the entire document is updated. Some of the fields have the same value  
Are you monitoring everything? What does that show? Yes, the CPU shows more than 90% & JVM pressure is about 60%  
How are you measuring this 3K number? The 3k documents are indexed in bulk operation and if we increase the number then the queue size becomes full and also the latency shoots up.

Thanks.

---

<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 30, 2018, 7:00am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/6 "2018-01-30T07:00:45Z")

</div>

You may need better hardware then.

Unfortunately without Monitoring (from X-Pack) you are likely going to find it hard to effectively troubleshoot what your nodes/cluster is doing.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [January 30, 2018, 7:03am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/7 "2018-01-30T07:03:45Z")

</div>

How frequently are you on average updating each document? What bulk request size are you using? How are you performing the updates, e.g. overwriting the full document or using scripted updates? What type of storage do you have? What is disk I/O and iowait looking like?

---

<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: [February 27, 2018, 7:03am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566/8 "2018-02-27T07:03:52Z")

</div>

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