# Shard size not even for the same index

**URL:** https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761
**Category:** Elasticsearch
**Created:** [August 29, 2021, 6:54pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761 "2021-08-29T18:54:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![junhuangli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junhuangli/32/77615_2.png) [@junhuangli](https://discuss.elastic.co/u/junhuangli)
#### Post date: [August 29, 2021, 6:54pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761/1 "2021-08-29T18:54:23Z")

</div>

One of our index is relatively big and I just found its shards size are not even, see below.

Any idea what could have cause this?  
Will it cause any perf issues and anything I can do?

|my-index|0|r|STARTED|23869700|9.1gb|123.123.104.233|es-data-25|  
|my-index|0|p|STARTED|23864279|4.6gb|123.123.104.153|es-data-10|  
|my-index|0|r|STARTED|23854902|10.3gb|123.123.113.49|es-data-35|  
|my-index|2|p|STARTED|303340414|70.2gb|123.123.97.11|es-data-45|  
|my-index|2|r|STARTED|302962931|62.1gb|123.123.108.156|es-data-7|  
|my-index|2|r|STARTED|302694814|71.3gb|123.123.103.221|es-data-18|  
|my-index|5|r|STARTED|23856194|11.2gb|123.123.114.221|es-data-20|  
|my-index|5|p|STARTED|23852768|9.3gb|123.123.99.102|es-data-12|  
|my-index|5|r|STARTED|23854955|4.6gb|123.123.102.23|es-data-33|

---

<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: [August 29, 2021, 7:19pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761/2 "2021-08-29T19:19:06Z")

</div>

Are you using custom document routing? Is the index using parent-child relationships?

---

<div class="post-metadata">

### Author: ![junhuangli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junhuangli/32/77615_2.png) [@junhuangli](https://discuss.elastic.co/u/junhuangli)
#### Post date: [August 29, 2021, 8:04pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761/3 "2021-08-29T20:04:48Z")

</div>

Thanks for the hint @Christian_Dahlqvist

I didn't find any routing config in the mapping of the index. How can I check for parent-child relationships?

Btw, we deleted a lot of documents in this index recently. This unbalance happened after that.

---

<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: [August 29, 2021, 8:13pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761/4 "2021-08-29T20:13:40Z")

</div>

Then it may be that the shards are in different stages of merging so a lot of the deleted documents may not have been m,erged out yet for some shards. You can manually run a forcemerge and see if that reduces the size but that can be I/O intensive.

---

<div class="post-metadata">

### Author: ![junhuangli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/junhuangli/32/77615_2.png) [@junhuangli](https://discuss.elastic.co/u/junhuangli)
#### Post date: [August 30, 2021, 3:59pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761/5 "2021-08-30T15:59:44Z")

</div>

Seems like forcemerge have worked, thanks @Christian_Dahlqvist

---

<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 27, 2021, 3:59pm UTC](https://discuss.elastic.co/t/shard-size-not-even-for-the-same-index/282761/6 "2021-09-27T15:59:55Z")

</div>

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