# Set the number\_of\_shards

**URL:** <https://discuss.elastic.co/t/set-the-number-of-shards/15793>\
**Category:** Elasticsearch\
**Created:** [February 14, 2014, 3:44am UTC](https://discuss.elastic.co/t/set-the-number-of-shards/15793 "2014-02-14T03:44:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_shi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_shi/32/1125_2.png) [@David\_shi](https://discuss.elastic.co/u/David_shi)\
**Post date:** [February 14, 2014, 3:44am UTC](https://discuss.elastic.co/t/set-the-number-of-shards/15793/1 "2014-02-14T03:44:37Z")

</div>

I have some server with 48G memory and 27 CPUS. set what number of shards  
is the best!

--  
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/62d44070-16e8-41ed-9a7e-c01366e73798%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/62d44070-16e8-41ed-9a7e-c01366e73798%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [February 14, 2014, 12:18pm UTC](https://discuss.elastic.co/t/set-the-number-of-shards/15793/2 "2014-02-14T12:18:22Z")

</div>

There is no right (or wrong) answer. The best way is to test. Start with  
the default 5 shards and load real data into it at the rate that you expect  
in production. And then query it at the rate that you expect in production

- check throughput and response times. Then run your facets, sorts,  
aggregations - check throughput, response times, and RAM usage. After a  
little but of testing, you should get a good sense of the limits of your  
hardware (per node) and then go from there.

--  
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/3f908453-78e7-4af3-98fe-900a41ba0e91%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3f908453-78e7-4af3-98fe-900a41ba0e91%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:50am UTC](https://discuss.elastic.co/t/set-the-number-of-shards/15793/3 "2017-07-06T01:50:11Z")

</div>


