# Calculating the time remaining for re-indexing process

**URL:** https://discuss.elastic.co/t/calculating-the-time-remaining-for-re-indexing-process/261702
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [January 20, 2021, 8:34pm UTC](https://discuss.elastic.co/t/calculating-the-time-remaining-for-re-indexing-process/261702 "2021-01-20T20:34:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)
#### Post date: [January 20, 2021, 8:34pm UTC](https://discuss.elastic.co/t/calculating-the-time-remaining-for-re-indexing-process/261702/1 "2021-01-20T20:34:38Z")

</div>

While `curator` is a fantastic tool, I wish it was showing the approximate time remaining for a re-indexing process.

Right now, I calculate the approximate time using the following:

1. Fire `GET _tasks?detailed=true&actions=*reindex&filter_path= **.name,**.total, **.created,**.description` and get the values of `status.total` and `status.created` for an index.

2. Go to Indices tab in Monitoring UI in kibana and get the indexing rate. Say it is `500/s`. I believe it can be calculated programmatically as described [here](https://discuss.elastic.co/t/calculating-indexing-rate-programmatically/261701).

3. `(status.total - status.created) / (500 *60)` gives me the number of minutes it will take for the re-indexing to complete.

Is this the correct approach? Could someone share their thoughts please.

Thanks,  
Sandeep

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 20, 2021, 8:36pm UTC](https://discuss.elastic.co/t/calculating-the-time-remaining-for-re-indexing-process/261702/2 "2021-01-20T20:36:46Z")

</div>

That'd be a very rough number.  
This like GC, IO/CPU/heap use, query and other indexing rates, and more would all impact any figure.

---

<div class="post-metadata">

### Author: ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)
#### Post date: [January 20, 2021, 8:44pm UTC](https://discuss.elastic.co/t/calculating-the-time-remaining-for-re-indexing-process/261702/3 "2021-01-20T20:44:29Z")

</div>

Thanks Mark. So far, had been calculating this manually using the above steps and it turned out to be fairly accurate almost all the time. The value of `status.total` is fixed. Only `status.created` varies and so does the indexing rate.

And yes, this is something that will need to be invoked repeatedly (or in a loop) since this will change with indexing rate.

---

<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, 2021, 8:44pm UTC](https://discuss.elastic.co/t/calculating-the-time-remaining-for-re-indexing-process/261702/4 "2021-02-17T20:44:37Z")

</div>

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