# Shard Size is 50gb

**URL:** <https://discuss.elastic.co/t/shard-size-is-50gb/268441>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [March 26, 2021, 5:35am UTC](https://discuss.elastic.co/t/shard-size-is-50gb/268441 "2021-03-26T05:35:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [March 26, 2021, 5:35am UTC](https://discuss.elastic.co/t/shard-size-is-50gb/268441/1 "2021-03-26T05:35:15Z")

</div>

I have an index called log-wlb-sysmon-2021.03.20-00002 and i am using ILM Policy for this index

```auto
{
  "winlogbeat_sysmon_policy" : {
    "version" : 8,
    "modified_date" : "2021-03-26T05:06:42.599Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "50gb",
              "max_age" : "30d"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "60d",
          "actions" : {
            "delete" : {
              "delete_searchable_snapshot" : true
            }
          }
        }
      }
    }
  }
}

```

Now the index size is 58gb why it is not rollovering

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
 green open log-wlb-sysmon-2021.03.23-000002 EgDbcn3pSNWrR5noH3zvPQ 1 1 46159377 29088 59.1gb 29.4gb

```

Elasticsearch shard size should be 10 to 50gb according to [this](https://www.elastic.co/guide/en/elasticsearch/reference/current/size-your-shards.html#shard-size-recommendation) i have a confusion are they talking about primary shard or replica shard because in my case the actual index size is 29.4gb(primary shard) and total index with replication is 59.1gb

---

<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:** [March 26, 2021, 5:39am UTC](https://discuss.elastic.co/t/shard-size-is-50gb/268441/2 "2021-03-26T05:39:37Z")

</div>

Rollover works on the total size of primary shards per index which in this case is just below 30GB.

---

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [March 27, 2021, 5:36am UTC](https://discuss.elastic.co/t/shard-size-is-50gb/268441/3 "2021-03-27T05:36:20Z")

</div>

so when we talking about that shard size should be 10 to 50gb...we are talking about primary shard or both **(primary and replica shard)**

---

<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:** [March 27, 2021, 5:58am UTC](https://discuss.elastic.co/t/shard-size-is-50gb/268441/4 "2021-03-27T05:58:38Z")

</div>

We are talking about each individual primary shard. You can change the number of replica shards easily at runtime so if the rollover was based on this you could get quite unevenly sized primary shards. If you have an index with 2 primary shards setting the rollover target to 100GB would result in the 2 primary shards each being around 50GB.

---

<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:** [April 24, 2021, 5:59am UTC](https://discuss.elastic.co/t/shard-size-is-50gb/268441/5 "2021-04-24T05:59:09Z")

</div>

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