# Shards configuration with a single server

**URL:** <https://community.graylog.org/t/shards-configuration-with-a-single-server/27403>\
**Category:** Graylog Central (peer support)\
**Tags:** elastic, architecture\
**Created:** [January 23, 2023, 10:45am UTC](https://community.graylog.org/t/shards-configuration-with-a-single-server/27403 "2023-01-23T10:45:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ihe](https://avatars.discourse-cdn.com/v4/letter/i/a88e57/32.png) [@ihe](https://community.graylog.org/u/ihe)\
**Post date:** [January 24, 2023, 10:11am UTC](https://community.graylog.org/t/shards-configuration-with-a-single-server/27403/5 "2023-01-24T10:11:22Z")

</div>

> [@nicosalva](#):
>
> But even with a single server deployment, it is then still beneficial to have several shards for an index set ?

yes!  
You create new shards every time your index rotates. If you rotate every day you will create new shards every day. But you will also delete the oldest ones → the number of shards will stay constant.  
My default setting is to set the rotation on P1D → one day. If I ingest more than 30GB of data into that index per day, I will set the number of shards to two, if I have more than 50 to three and so on. The daily amount is the relevant amount, as I rotate every day.

Total used disk space is not so relevant here, as it depends how many indices I will keep. If I want to have 90 days of data it will be more than just for 10 days.

Your index set A with 10GB in total in 30 days is perfectly fine with only one shard per day.  
Your index set B with 200GB in four days is a bit strange. I’d go for a daily rotation with two shards.

Two important things for the performance:

1. per 20 shards you should allocate 1GB of Heap for your Elastic/Opensearch
2. for each GB heap of Elastic/Opensearch you should have one GB of RAM for buffers by the OS.

Example:  
16GB Ram for your Elastic/Opensearch-Machine, no Graylog or Mongo on that machine.  
8GB Heap for Elastic/Opensearch, 8 for OS and Caches  
8GB Heap \* 20 shards = 160 shards

---

_[View the full topic](https://community.graylog.org/t/shards-configuration-with-a-single-server/27403)._
