# Reindexing is slow process

**URL:** <https://discuss.elastic.co/t/reindexing-is-slow-process/281766>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [August 18, 2021, 5:51am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766 "2021-08-18T05:51:52Z")\
**Posts on this page:** 8\
**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:** [August 18, 2021, 5:51am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/1 "2021-08-18T05:51:52Z")

</div>

Running ELK stack 7.13.2  
Reindexing is a slow process it takes one day or more than one day.  
we have 10 indices of 101.4gb reindexing this size of data is costlier even though we close the logstash but nothing happened and if we reindex one index of 100gb then we have another index of same size we can't do because we think elasticsearch can crash  
If we have 20 indices then the day it will take 20 days to reindex because we reindex one by one  
one more point that in logstash we are using different pipeline id so if we are reindexing one pipeline id's index then we close that and other pipeline\_id is running

So is there any approach that we can minimize the time  
we are using multi-node concept 3 master nodes 6 data nodes 2 coordinate node

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [August 19, 2021, 7:57am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/2 "2021-08-19T07:57:06Z")

</div>

Hi,

How do you do the reindexing? Are you indexing from remote or from local?

I d not know if you have already tried this but I can recommend:

- set `refresh_interval` of target index to `-1` to completely disable refreshs during reindex. Attentation: you will not see any updates until a manual refresh
- set `number_of_replicas` of target index to `0` during reindex
- try to increase `size` property in reindex body(default: 1000). Larger batches can greatly improve speed. Attention: when reindexing from remote `size`\*doc\_size must be smaller than 100MB

```auto
Reindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb. If the remote index includes very large documents you’ll need to use a smaller batch size.

```

Best regards  
Wolfram

---

<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:** [August 19, 2021, 9:10am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/3 "2021-08-19T09:10:15Z")

</div>

> [@Wolfram\_Haussig](#):
>
> Attention: when reindexing from remote `size` \*doc\_size must be smaller than 100MB

sorry @Wolfram_Haussig i don't know what is remote

---

<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:** [August 19, 2021, 9:52am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/4 "2021-08-19T09:52:05Z")

</div>

it is local... i will try this

---

<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:** [August 21, 2021, 7:30am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/5 "2021-08-21T07:30:49Z")

</div>

it takes 4 hours to reindex 20gb of data and one more question can we do reindexing of another index parallelly.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 21, 2021, 2:35pm UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/6 "2021-08-21T14:35:39Z")

</div>

Just driving by....

In addition to The very good suggestions from @Wolfram_Haussig....

You can also try using Logstash to read from the index you want and write to the index you want It's possible you may get better performance.

I guess I am also a little curious about what you are trying to accomplish with all the reindexing?

---

<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:** [September 14, 2021, 6:33am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/7 "2021-09-14T06:33:43Z")

</div>

what we are actually trying to do is that we have 20 different indices of 100gb.The method we follow for reindexing is let suppose we are using packetbeat and winlogbeat and other data source also  
so if we are using packetbeat in which we have 10 indices , we stop pipeline for packetbeat(winlogbeat and other data source are running),then we do reindex of packetbeat indices one by one.if it complete then we start the packetbeat pipeline.We gonna use this

> [@stephenb](#):
>
> In addition to The very good suggestions from @Wolfram_Haussig....

we are finding the effective way of reindexing in which time consuming should be less.

---

<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:** [October 12, 2021, 6:34am UTC](https://discuss.elastic.co/t/reindexing-is-slow-process/281766/8 "2021-10-12T06:34:04Z")

</div>

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