# Curator - Deleting old Snapshots is taking a long time

**URL:** <https://discuss.elastic.co/t/curator-deleting-old-snapshots-is-taking-a-long-time/144054>\
**Category:** Elasticsearch\
**Created:** [August 12, 2018, 9:57pm UTC](https://discuss.elastic.co/t/curator-deleting-old-snapshots-is-taking-a-long-time/144054 "2018-08-12T21:57:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pri](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@pri](https://discuss.elastic.co/u/pri)\
**Post date:** [August 12, 2018, 9:57pm UTC](https://discuss.elastic.co/t/curator-deleting-old-snapshots-is-taking-a-long-time/144054/1 "2018-08-12T21:57:40Z")

</div>

Hi,  
I have been creating hourly snapshots of our prod ES to AWS s3. And have been running curator to do this task. However now I am setting up a curator action to delete snapshots older than n number of days and it is extremely slow. The repository does have a large number of snapshots. It is deleting like 2 snapshots in 30+ minutes and I have thousands to clean up. Is it possible to speed this up? Once the clean up is done, I am planning to run the clean-up along side the creation so there won't be a large set of snapshots to clean up in the future.

Thanks!

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [August 13, 2018, 11:38am UTC](https://discuss.elastic.co/t/curator-deleting-old-snapshots-is-taking-a-long-time/144054/2 "2018-08-13T11:38:56Z")

</div>

Curator does not employ any method differing from the regular Elasticsearch APIs. It is really just an index and snapshot selecting wrapper around them. With that understanding, know that Elasticsearch is what is taking so long to delete the snapshots, and not Curator.

You described a system with a high number of snapshots. The snapshot delete process can become quite lengthy when there are a large number of indices and segments in the snapshot repository, because each segment selected for deletion must be compared to every other snapshot in the repository to see if there are other snapshots which require the same segment. As the number of segments decreases, the snapshot deletion speed will gradual increase, as the number being compared will correspondingly decrease. There is unfortunately no silver bullet for this. You will simply have to wait it out, and clean it up as quickly as Elasticsearch will permit.

You should also know that the more remote network file systems (`s3` And `azure`) can be slower than a local nfs because of the network round-trip. Since you’re using S3, it will also simply take longer.

---

<div class="post-metadata">

**Author:** ![pri](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@pri](https://discuss.elastic.co/u/pri)\
**Post date:** [August 13, 2018, 1:00pm UTC](https://discuss.elastic.co/t/curator-deleting-old-snapshots-is-taking-a-long-time/144054/3 "2018-08-13T13:00:14Z")

</div>

Thanks for clarifying. I guess I will have to bite the bullet until this first round of cleanup is done.

---

<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:** [September 10, 2018, 1:00pm UTC](https://discuss.elastic.co/t/curator-deleting-old-snapshots-is-taking-a-long-time/144054/4 "2018-09-10T13:00:31Z")

</div>

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