# Specify index size with esrally benchmark

**URL:** <https://forum.opensearch.org/t/specify-index-size-with-esrally-benchmark/7848>\
**Category:** OpenSearch\
**Created:** [December 2, 2021, 1:37pm UTC](https://forum.opensearch.org/t/specify-index-size-with-esrally-benchmark/7848 "2021-12-02T13:37:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickster](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@rickster](https://forum.opensearch.org/u/rickster)\
**Post date:** [December 2, 2021, 1:37pm UTC](https://forum.opensearch.org/t/specify-index-size-with-esrally-benchmark/7848/1 "2021-12-02T13:37:34Z")

</div>

Hi,  
I want to benchmark my Opensearch cluster with Esrally. Therefore I need indices with different sizes (e.g. 100mb, 5gb, 10gb, etc.). I can use some data from my production cluster which I can import via snapshot.  
Is there a way in esrally to define how large the index should be after indexing my data? Wasn’t able to find anything about that in the documentation.  
I think the problem is that esrally cann’t determine how much space the documents will have when they are analyzed and stored in Opensearch.

Possible solution would be to create different sized files from my snapshot index which will contain the data for the each different indices created by esrally. But that approach would consume a lot of storage on my machine.

Do you have any other ideas?

---

<div class="post-metadata">

**Author:** ![jathin12](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jathin12](https://forum.opensearch.org/u/jathin12)\
**Post date:** [December 2, 2021, 2:28pm UTC](https://forum.opensearch.org/t/specify-index-size-with-esrally-benchmark/7848/2 "2021-12-02T14:28:05Z")

</div>

if you already have the snapshot then it will just restore exist previously and it would be same\similar sized index. If you want to change it, you may need to use reindex api to copy a subset of documents into a new index. you could also use ISM policy to roll over the index when it reaches a specific size

---

<div class="post-metadata">

**Author:** ![rickster](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@rickster](https://forum.opensearch.org/u/rickster)\
**Post date:** [December 2, 2021, 2:52pm UTC](https://forum.opensearch.org/t/specify-index-size-with-esrally-benchmark/7848/3 "2021-12-02T14:52:57Z")

</div>

That way I have to create each esrally track for each different sized index. Because that takes a lot of time having indices which are up to 30gb, thats not an ideal option. But thanks for your response.
