# Soft\_deletes enabled maybe slow down the index performance

**URL:** https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520
**Category:** Elasticsearch
**Created:** [November 6, 2020, 11:35am UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520 "2020-11-06T11:35:32Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hackerwin7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackerwin7/32/43223_2.png) [@hackerwin7](https://discuss.elastic.co/u/hackerwin7)
#### Post date: [November 6, 2020, 11:35am UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/1 "2020-11-06T11:35:32Z")

</div>

Hi,

Our elasticsearch is on 6.8.0

when we use soft\_delete is enabled, we find that the index which indexing requests is mainly updates, so the segments bytes grow up more and more bigger, and docs.deleted count is more and more higher.

because `index.soft_deletes.retention_lease.period` is default 12h, the deleted docs still live in segments after merges.

this cause to the index most update requests slow down and timeout.

I want to know is there any issues or improvements for this in 7,x or 6.8.x version of Elasticsearch?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [November 6, 2020, 1:04pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/2 "2020-11-06T13:04:25Z")

</div>

Are you using CCR? If so, do you have a follower that has been offline for a long time?

If the answer to either question is "no" then no extra operations are being retained due to soft deletes.

---

<div class="post-metadata">

### Author: ![hackerwin7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackerwin7/32/43223_2.png) [@hackerwin7](https://discuss.elastic.co/u/hackerwin7)
#### Post date: [November 6, 2020, 1:11pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/3 "2020-11-06T13:11:17Z")

</div>

Yes, we use CCR, but the follower index is active.and we shorten the `index.soft_deletes.retention_lease.period` to resolve this issue.

---

<div class="post-metadata">

### Author: ![hackerwin7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackerwin7/32/43223_2.png) [@hackerwin7](https://discuss.elastic.co/u/hackerwin7)
#### Post date: [November 6, 2020, 1:16pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/4 "2020-11-06T13:16:15Z")

</div>

What is a follower offline mean? the follower index status is green.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [November 6, 2020, 1:17pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/5 "2020-11-06T13:17:08Z")

</div>

Ok, probably best to open a ticket with your support engineer to investigate further. There have been a handful of bugs fixed in the 6.8 series in the area of retention leases, and a good deal of further development in the 7.x series too.

---

<div class="post-metadata">

### Author: ![hackerwin7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackerwin7/32/43223_2.png) [@hackerwin7](https://discuss.elastic.co/u/hackerwin7)
#### Post date: [November 6, 2020, 1:24pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/6 "2020-11-06T13:24:15Z")

</div>

Thanks David,

one more interesting thing is the only one index is huge, but other indices with soft\_deletes enabled have no problems.

maybe this unique follower index have leader index history retention lease issue?

be appreciate it if you provide some related issues with this from 6.8.0

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [November 6, 2020, 2:28pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/7 "2020-11-06T14:28:32Z")

</div>

Yes possibly this is a bug, and possibly it's fixed in an upgrade -- a lot has changed in the 18 months since 6.8.0 was released. Without digging deeper we can only speculate on what's causing it.

---

<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: [December 4, 2020, 2:28pm UTC](https://discuss.elastic.co/t/soft-deletes-enabled-maybe-slow-down-the-index-performance/254520/8 "2020-12-04T14:28:33Z")

</div>

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