# Trouble with my ILM

**URL:** <https://discuss.elastic.co/t/trouble-with-my-ilm/326051>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 21, 2023, 10:53am UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051 "2023-02-21T10:53:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccaillet](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ccaillet](https://discuss.elastic.co/u/ccaillet)\
**Post date:** [February 21, 2023, 10:53am UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051/1 "2023-02-21T10:53:31Z")

</div>

Hi all,

I've the following paramters on my ILM :

```auto
"policy": {
      "phases": {
        "hot": {
          "min_age": "0ms",
          "actions": {
            "rollover": {
              "max_primary_shard_size": "12gb",
              "max_age": "30m"
            },
            "set_priority": {
              "priority": 100
            }
          }
        },
        "delete": {
          "min_age": "2h",
          "actions": {
            "delete": {
              "delete_searchable_snapshot": true
            }
          }
        },
        "warm": {
          "min_age": "30m",
          "actions": {
            "set_priority": {
              "priority": 50
            }
          }
        }
      }
    },

```

The settings on the index template is the following :

```auto
"settings": {
      "index": {
        "lifecycle": {
          "name": "2h_30mh_90mw"
        },
        "codec": "best_compression",
        "routing": {
          "allocation": {
            "include": {
              "_tier_preference": "data_hot"
            }
          }
        },
        "refresh_interval": "60s",
        "number_of_shards": "1",
        "number_of_replicas": "0"
      }
    }

```

Anyone could explain to me why it produces index files with a storage size of 20GB ? instead of the 12 GB defined ?

DOn't hesitate to tell me if it's the wrong place to post according to the subject 🙂

Thanks by advance for your reply

Regards,  
Christophe

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [February 21, 2023, 5:03pm UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051/2 "2023-02-21T17:03:19Z")

</div>

Hi @ccaillet,  
Can we see the output of \_cat/indices/ for the indices in question?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 21, 2023, 5:36pm UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051/3 "2023-02-21T17:36:45Z")

</div>

> [@ccaillet](#):
>
> Anyone could explain to me why it produces index files with a storage size of 20GB ? instead of the 12 GB defined ?

ILM tasks are executed on a [schedule](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-index-lifecycle.html#ilm-phase-execution) that per default is every 10 minutes and in the linked documentation you also have this information:

> To avoid race conditions, ILM might need to run more than once to execute all of the steps required to complete an action.

So per default it may take 20 minutes for the ILM to complete the action and by this time your index may grow above the configured maximum shard size.

You may [change](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-settings.html#_cluster_level_settings_2) this interval, but keep in mind that this can impact your cluster performance depending on yout lifecycle policies.

I'm not sure ILM works well with short ages and small sizes, it was built to be used thinking on age of days and sizes of a couple of tens GB.

---

<div class="post-metadata">

**Author:** ![ccaillet](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@ccaillet](https://discuss.elastic.co/u/ccaillet)\
**Post date:** [February 22, 2023, 8:07am UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051/4 "2023-02-22T08:07:54Z")

</div>

HI Andrew,

Here is a result on an indice that has the "problem"

```auto
green open .ds-cdn-varnish.edge-http-2023.02.22-000064 TtgvEfRsTxSsp_T-1xCBCw 1 0 103568775 0 16gb 16gb

```

As Leandro said, it seems related to the time between two sequences of ILM schedule. I haven't this behaviour on my production environment which has bigger indices files and of course rollover params are different.

My pre-production cluster has small storage, that's why I have small retention and of course small size for shards and age.

Thanks for your replies.

Regards

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [February 22, 2023, 3:50pm UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051/5 "2023-02-22T15:50:04Z")

</div>

Nice, glad it got sorted 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:** [March 22, 2023, 3:50pm UTC](https://discuss.elastic.co/t/trouble-with-my-ilm/326051/6 "2023-03-22T15:50:58Z")

</div>

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