# Uneven size per shards

**URL:** https://discuss.elastic.co/t/uneven-size-per-shards/144852
**Category:** Elasticsearch
**Created:** [August 17, 2018, 8:25am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852 "2018-08-17T08:25:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lazam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lazam/32/34587_2.png) [@lazam](https://discuss.elastic.co/u/lazam)
#### Post date: [August 17, 2018, 8:25am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852/1 "2018-08-17T08:25:45Z")

</div>

Hello!

I saw some previous posts about uneven shard distribution but I was unable to get information that I need.  
I have an index which has 2 Shards and 1 Replication:

> index-name 1 r STARTED 1510504 546.6mb 10.10.1.34 node-name  
> index-name 1 r STARTED 1510504 458.4mb 10.10.1.229 node-name  
> index-name 1 p STARTED 1510504 502.9mb 10.10.1.224 node-name  
> index-name 0 p STARTED 374273705 51.4gb 10.105.1.34 node-name  
> index-name 0 r STARTED 374273705 52.6gb 10.10.1.139 node-name  
> index-name 0 r STARTED 374273705 51.4gb 10.10.1.57 node-name

Based from the API explanation, there's no reason to do a rebalance but as we see the docs and size difference is significant. I don't see any important output in the deciders that might affect the result. Below are some result of explanation:

- "rebalance\_explanation" : "cannot rebalance as no target node exists that can both allocate this shard and improve the cluster balance",
- "can\_remain\_on\_current\_node" : "yes",
- "can\_rebalance\_cluster" : "yes",
- "can\_rebalance\_to\_other\_node" : "no",

Here are some other notable settings:

- The current index settings mostly use the default settings for cluster allocation.
- The same index has a balance shard distribution in dev and staging environment. Only the production has this status.
- We're doing a deletion of docs in this index.
- We're using custom \_id for each docs.

Kindly let me know if there's anymore information needed.  
Thank you!

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 17, 2018, 9:17am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852/2 "2018-08-17T09:17:12Z")

</div>

are you using routing? or parent/child or the join type? There must be a reason why one shard only has 500MB and the other has 100x the size.

---

<div class="post-metadata">

### Author: ![lazam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lazam/32/34587_2.png) [@lazam](https://discuss.elastic.co/u/lazam)
#### Post date: [August 21, 2018, 2:19am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852/3 "2018-08-21T02:19:14Z")

</div>

Hi Alexander,

We're only using the default routing provided by Elasticsearch, and not a custom one. Below is the cluster settings config that we have.

```
{
      "persistent" : { },
      "transient" : {
        "cluster" : {
          "routing" : {
            "allocation" : {
              "enable" : "all",
              "exclude" : {
                "_ip" : "10.5.1.109"
              }
            }
          }
        }
      }
    }

```

The IP which is excluded doesn't exist anymore.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 21, 2018, 7:24am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852/4 "2018-08-21T07:24:30Z")

</div>

sorry for being unclear. This was not the routing I am referring to. Are you using the `routing` parameter when indexing data?

If not, how do your ids look like?

---

<div class="post-metadata">

### Author: ![lazam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lazam/32/34587_2.png) [@lazam](https://discuss.elastic.co/u/lazam)
#### Post date: [August 21, 2018, 8:47am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852/5 "2018-08-21T08:47:11Z")

</div>

We're not using any routing parameter when indexing data.

Here's some sample of IDs in that index.

> "586ab92846e0fb0001f74910",  
> "59376fa49948f20001aec204",  
> "59376f81a5ca4f0001774bf1",  
> "59376fa9a5ca4f00017760ea",  
> "5896b3c046e0fb00013a7537",  
> "5895b69e46e0fb0001a0ea88",  
> "5a0e121aa752c50001d0676f",  
> "5a0e009e71bf640001b42140"

---

<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 18, 2018, 8:47am UTC](https://discuss.elastic.co/t/uneven-size-per-shards/144852/6 "2018-09-18T08:47:22Z")

</div>

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