# Best index performance

**URL:** <https://discuss.elastic.co/t/best-index-performance/164892>\
**Category:** Elasticsearch\
**Created:** [January 19, 2019, 12:30pm UTC](https://discuss.elastic.co/t/best-index-performance/164892 "2019-01-19T12:30:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fadihaddad](https://avatars.discourse-cdn.com/v4/letter/f/4bbf92/32.png) [@fadihaddad](https://discuss.elastic.co/u/fadihaddad)\
**Post date:** [January 19, 2019, 12:30pm UTC](https://discuss.elastic.co/t/best-index-performance/164892/1 "2019-01-19T12:30:43Z")

</div>

I have 2 servers each has 4 cpus and each cpu has 4 cores and the servers have 16gb RAM. I receive every hour 2 8gb files and 2 3gb files. What are the best number of shards and pipelines workers and batch size and JVM heap size basically what should I configure to make the best index speed for these files.

---

<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 19, 2019, 12:40pm UTC](https://discuss.elastic.co/t/best-index-performance/164892/2 "2019-01-19T12:40:28Z")

</div>

What kind of disk/storage do you have?

---

<div class="post-metadata">

**Author:** ![fadihaddad](https://avatars.discourse-cdn.com/v4/letter/f/4bbf92/32.png) [@fadihaddad](https://discuss.elastic.co/u/fadihaddad)\
**Post date:** [January 19, 2019, 12:58pm UTC](https://discuss.elastic.co/t/best-index-performance/164892/3 "2019-01-19T12:58:24Z")

</div>

Thank you for reply and a normal HDD

---

<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 19, 2019, 6:30pm UTC](https://discuss.elastic.co/t/best-index-performance/164892/4 "2019-01-19T18:30:01Z")

</div>

OK. Then I would recommend you review and follow [these guidelines](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/tune-for-indexing-speed.html). Use as few shards as possible and consider using [the rollover index API](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/indices-rollover-index.html) to target a specific shard size.

---

<div class="post-metadata">

**Author:** ![fadihaddad](https://avatars.discourse-cdn.com/v4/letter/f/4bbf92/32.png) [@fadihaddad](https://discuss.elastic.co/u/fadihaddad)\
**Post date:** [January 19, 2019, 10:42pm UTC](https://discuss.elastic.co/t/best-index-performance/164892/5 "2019-01-19T22:42:08Z")

</div>

I will, but i also need help in setting logstash pipeline workers and batch size acfording to file sizes

---

<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 20, 2019, 3:02am UTC](https://discuss.elastic.co/t/best-index-performance/164892/6 "2019-01-20T03:02:31Z")

</div>

I would recommend using the defaults as they are quite good.

---

<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 17, 2019, 3:02am UTC](https://discuss.elastic.co/t/best-index-performance/164892/7 "2019-02-17T03:02:34Z")

</div>

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