# Does Rally support benchmark the performance about deleting a type of documents?

**URL:** <https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [March 20, 2023, 1:29am UTC](https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033 "2023-03-20T01:29:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gloriacs](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gloriacs](https://discuss.elastic.co/u/gloriacs)\
**Post date:** [March 20, 2023, 1:29am UTC](https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033/1 "2023-03-20T01:29:40Z")

</div>

Hi all, I want to use Rally to benchmark the performance of deleting documents instead of deleting an index. Like, delete all documents from that specific day.

I know elasticsearch support that by using delete\_by\_query API, however, I didn't find out whether rally supports this kind of feature.

Any clues or links will be very appreciated! Thanks in advance.

---

<div class="post-metadata">

**Author:** ![json](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/json/32/4125_2.png) [@json](https://discuss.elastic.co/u/json)\
**Post date:** [March 20, 2023, 3:33pm UTC](https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033/2 "2023-03-20T15:33:19Z")

</div>

Hello @gloriacs, Rally focuses on [operations](https://esrally.readthedocs.io/en/latest/track.html#operations) representing Elasticsearch APIs for indexing, search, and other related APIs. Out of the box, Rally does not define an operation for deleting individual documents. To do this, create a custom runner from the [documented example](https://esrally.readthedocs.io/en/latest/advanced.html#creating-your-own-operations-with-custom-runners) to define your operation.

Thank you,  
Jason

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 20, 2023, 3:41pm UTC](https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033/3 "2023-03-20T15:41:09Z")

</div>

Deleting a lot of documents using delete-by-query is a single long-running operation. If I was to try to quantify the impact I would use Rally to add the ongoing indexing and query load and then trigger a delete-by-query at a specific point in time and see how the indexing and query operations executed by Rally are affected. I would not try to get Rally to run the delete-by-query as you are not necessarily interested in how long it takes. Make sure you use a metrics store so you can plot the performance data and spot changes in behaviour over time.

---

<div class="post-metadata">

**Author:** ![gloriacs](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@gloriacs](https://discuss.elastic.co/u/gloriacs)\
**Post date:** [March 20, 2023, 4:53pm UTC](https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033/4 "2023-03-20T16:53:08Z")

</div>

Thanks @json and @Christian_Dahlqvist. I will create a custom runner and quantify the impact. Both solutions are good, and thanks for the quick response.

---

<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:** [April 17, 2023, 4:53pm UTC](https://discuss.elastic.co/t/does-rally-support-benchmark-the-performance-about-deleting-a-type-of-documents/328033/5 "2023-04-17T16:53:32Z")

</div>

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