# How to merge shareds in elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-merge-shareds-in-elasticsearch/177638>\
**Category:** Elasticsearch\
**Created:** [April 19, 2019, 2:57pm UTC](https://discuss.elastic.co/t/how-to-merge-shareds-in-elasticsearch/177638 "2019-04-19T14:57:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Jaleel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_jaleel/32/44394_2.png) [@Abdul\_Jaleel](https://discuss.elastic.co/u/Abdul_Jaleel)\
**Post date:** [April 19, 2019, 2:57pm UTC](https://discuss.elastic.co/t/how-to-merge-shareds-in-elasticsearch/177638/1 "2019-04-19T14:57:04Z")

</div>

My cluster status returns as follows,

> {  
> "\_nodes": {  
> "total": 1,  
> "successful": 1,  
> "failed": 0  
> },  
> "cluster\_name": "elasticsearch",  
> "timestamp": 1555593693195,  
> "status": "yellow",  
> "indices": {  
> "count": 15,  
> "shards": {  
> "total": 23,  
> "primaries": 23,  
> "replication": 0,  
> "index": {  
> "shards": {  
> "min": 1,  
> "max": 5,  
> "avg": 1.5333333333333334  
> },  
> "primaries": {  
> "min": 1,  
> "max": 5,  
> "avg": 1.5333333333333334  
> },  
> "replication": {  
> "min": 0,  
> "max": 0,  
> "avg": 0  
> }  
> }  
> },  
> "docs": {  
> "count": 2120836,  
> "deleted": 194362  
> },  
> "store": {  
> "size": "945.3mb",  
> "size\_in\_bytes": 991320586  
> },  
> "fielddata": {  
> "memory\_size": "928b",  
> "memory\_size\_in\_bytes": 928,  
> "evictions": 0  
> },  
> "query\_cache": {  
> "memory\_size": "0b",  
> "memory\_size\_in\_bytes": 0,  
> "total\_count": 0,  
> "hit\_count": 0,  
> "miss\_count": 0,  
> "cache\_size": 0,  
> "cache\_count": 0,  
> "evictions": 0  
> },  
> "completion": {  
> "size": "0b",  
> "size\_in\_bytes": 0  
> },  
> "segments": {  
> "count": 155,  
> "memory": "4.1mb",  
> "memory\_in\_bytes": 4326515,  
> "terms\_memory": "1.9mb",  
> "terms\_memory\_in\_bytes": 2046106,  
> "stored\_fields\_memory": "360.5kb",  
> "stored\_fields\_memory\_in\_bytes": 369152,  
> "term\_vectors\_memory": "0b",  
> "term\_vectors\_memory\_in\_bytes": 0,  
> "norms\_memory": "150kb",  
> "norms\_memory\_in\_bytes": 153664,  
> "points\_memory": "325kb",  
> "points\_memory\_in\_bytes": 332901,  
> "doc\_values\_memory": "1.3mb",  
> "doc\_values\_memory\_in\_bytes": 1424692,  
> "index\_writer\_memory": "0b",  
> "index\_writer\_memory\_in\_bytes": 0,  
> "version\_map\_memory": "0b",  
> "version\_map\_memory\_in\_bytes": 0,  
> "fixed\_bit\_set": "0b",  
> "fixed\_bit\_set\_memory\_in\_bytes": 0,  
> "max\_unsafe\_auto\_id\_timestamp": 1555593379495,  
> "file\_sizes": {}  
> }  
> },  
> "nodes": {  
> "count": {  
> "total": 1,  
> "data": 1,  
> "coordinating\_only": 0,  
> "master": 1,  
> "ingest": 1  
> },  
> "versions": [  
> "6.4.0"  
> ],  
> "os": {  
> "available\_processors": 8,  
> "allocated\_processors": 8,  
> "names": [  
> {  
> "name": "Windows 10",  
> "count": 1  
> }  
> ],  
> "mem": {  
> "total": "7.8gb",  
> "total\_in\_bytes": 8470802432,  
> "free": "5.6gb",  
> "free\_in\_bytes": 6118526976,  
> "used": "2.1gb",  
> "used\_in\_bytes": 2352275456,  
> "free\_percent": 72,  
> "used\_percent": 28  
> }  
> },  
> "process": {  
> "cpu": {  
> "percent": 0  
> },  
> "open\_file\_descriptors": {  
> "min": -1,  
> "max": -1,  
> "avg": 0  
> }  
> },  
> "jvm": {  
> "max\_uptime": "5.4m",  
> "max\_uptime\_in\_millis": 326286,  
> "versions": [  
> {  
> "version": "9",  
> "vm\_name": "Java HotSpot(TM) 64-Bit Server VM",  
> "vm\_version": "9+181",  
> "vm\_vendor": "Oracle Corporation",  
> "count": 1  
> }  
> ],  
> "mem": {  
> "heap\_used": "393.9mb",  
> "heap\_used\_in\_bytes": 413092408,  
> "heap\_max": "989.8mb",  
> "heap\_max\_in\_bytes": 1037959168  
> },  
> "threads": 100  
> },  
> "fs": {  
> "total": "115.9gb",  
> "total\_in\_bytes": 124510007296,  
> "free": "50.4gb",  
> "free\_in\_bytes": 54195118080,  
> "available": "50.4gb",  
> "available\_in\_bytes": 54195118080  
> },  
> "plugins": ,  
> "network\_types": {  
> "transport\_types": {  
> "security4": 1  
> },  
> "http\_types": {  
> "security4": 1  
> }  
> }  
> }  
> }

From this, it is evident that there are 23 shareds for approximate 1GB of data. My Kibana is going to unresponsive state sometimes. Is 23 shared fine for 1GB of data ? Should I merge shareds for better performance ? How to merge them ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 19, 2019, 9:35pm UTC](https://discuss.elastic.co/t/how-to-merge-shareds-in-elasticsearch/177638/2 "2019-04-19T21:35:59Z")

</div>

It shouldn't be a big problem, but it is a little excessive for that amount of data on that size heap.

Have a look at the `_shrink` API 🙂

---

<div class="post-metadata">

**Author:** ![Abdul\_Jaleel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_jaleel/32/44394_2.png) [@Abdul\_Jaleel](https://discuss.elastic.co/u/Abdul_Jaleel)\
**Post date:** [April 22, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-to-merge-shareds-in-elasticsearch/177638/3 "2019-04-22T04:31:39Z")

</div>

Thaks @warkolm. Do you mean I should shrik the shareds ? Or shrink is not preferred for this case?

---

<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:** [May 20, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-to-merge-shareds-in-elasticsearch/177638/4 "2019-05-20T04:31:46Z")

</div>

Closed on May 20, 2019, 4:31am UTC

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