# Elasticsearch data nodes total size

**URL:** https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800
**Category:** Elasticsearch
**Created:** [September 29, 2016, 9:34am UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800 "2016-09-29T09:34:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sundar1](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@sundar1](https://discuss.elastic.co/u/sundar1)
#### Post date: [September 29, 2016, 9:34am UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/1 "2016-09-29T09:34:31Z")

</div>

How to get total/average data nodes size through API's?

The below api to get the data nodes allocation each data nodes but i need average or total size of data nodes. Please help me how to get this.

**[http://localhost:9200/\_cat/allocation](http://localhost:9200/_cat/allocation)**  
**shards disk.indices disk.used disk.avail disk.total disk.percent host ip node**  
29 397.4gb 556.6gb 1.2tb 1.8tb 29 10.236.140.43 10.236.140.43 vc2coma1081153n-node-02  
30 469.5gb 1014.2gb 863gb 1.8tb 54 10.240.138.112 10.240.138.112 vc2coma2081152n-node-03  
29 445.2gb 545.7gb 1.3tb 1.8tb 29 10.240.148.27 10.240.148.27 vc2coma2085406n-node-05  
29 393.9gb 741.4gb 197gb 938.5gb 79 10.240.146.21 10.240.146.21 vc2coma2080685n-node-01  
29 395gb 685.2gb 253.3gb 938.5gb 73 10.240.146.45 10.240.146.45 vc2coma2080687n-node-04

---

<div class="post-metadata">

### Author: ![MarkOStewart](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@MarkOStewart](https://discuss.elastic.co/u/MarkOStewart)
#### Post date: [September 29, 2016, 7:38pm UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/2 "2016-09-29T19:38:52Z")

</div>

try the API \_stats

[http://localhost:9200/\_stats?all=true](http://localhost:9200/_stats?all=true)

look for store size in bytes near the top. (and divide by 1024000000 for Gig. )  
Here is my return

{  
"\_shards": {  
"total": 108,  
"successful": 108,  
"failed": 0  
},  
"\_all": {  
"primaries": {  
"docs": {  
"count": 560336831,  
"deleted": 17200  
},  
"store": {  
**"size\_in\_bytes": 257292738493,**  
"throttle\_time\_in\_millis": 0  
},

---

<div class="post-metadata">

### Author: ![sundar1](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@sundar1](https://discuss.elastic.co/u/sundar1)
#### Post date: [September 30, 2016, 12:03pm UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/3 "2016-09-30T12:03:46Z")

</div>

Thanks for your reply looks like my store bytes is not matching. Below are my details.

Allocation details :-  
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node  
31 485.2gb 775.5gb 163gb 938.5gb 82 10.240.146.45 10.240.146.45 vc2coma2080687n-node-04  
32 491.7gb 839.5gb 99gb 938.5gb 89 10.240.146.21 10.240.146.21 vc2coma2080685n-node-01  
32 569.3gb 670.2gb 1.1tb 1.8tb 35 10.240.148.27 10.240.148.27 vc2coma2085406n-node-05  
31 499.1gb 658.3gb 1.1tb 1.8tb 35 10.236.140.43 10.236.140.43 vc2coma1081153n-node-02  
32 591.6gb 1.1tb 740.9gb 1.8tb 60 10.240.138.112 10.240.138.112 vc2coma2081152n-node-03

My store info :-

"\_shards": {  
"total": 158,  
"successful": 158,  
"failed": 0  
},  
"\_all": {  
"primaries": {  
"docs": {  
"count": 1054938644,  
"deleted": 0  
},  
"store": {  
"size\_in\_bytes": 1410686115558,  
"throttle\_time\_in\_millis": 0  
}

I calculated disk used column in allocation info. It's coming more than 4 tb but in store showing 1.4 tb. which one is the correct store data.

---

<div class="post-metadata">

### Author: ![MarkOStewart](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@MarkOStewart](https://discuss.elastic.co/u/MarkOStewart)
#### Post date: [September 30, 2016, 12:27pm UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/4 "2016-09-30T12:27:25Z")

</div>

have you loaded the HQ plugin?  
HQ will quickly tell you the size to compare with what the API returns.

For instance one of my clusters shows in HQ  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/b/b6a74c523db4e7d566bdcd58f2d8d76a87a9193c.png)

The API returns  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/9/93ae2784c0bc95f39d5a5ff7aacc02b9db0d7854.png)

1277160888 / 1024000000=1.24G

---

<div class="post-metadata">

### Author: ![sundar1](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@sundar1](https://discuss.elastic.co/u/sundar1)
#### Post date: [October 4, 2016, 11:41am UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/5 "2016-10-04T11:41:04Z")

</div>

Thanks Mark for HQ plugin tool. I have installed KOPF plugin in elasticsearch.  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/2/2aef8f9bfb16f43a2e9afba3a3d3284a42d54f47.png)

Just now i have installed HQ as well. the below are document and size of data.

![](https://us1.discourse-cdn.com/elastic/original/2X/b/bacedbcb59c4a2f6812d527791d8c9e4d7fa8c2d.png)

Store value is not matching with above figures.

---

<div class="post-metadata">

### Author: ![MarkOStewart](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@MarkOStewart](https://discuss.elastic.co/u/MarkOStewart)
#### Post date: [October 19, 2016, 2:48pm UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/6 "2016-10-19T14:48:08Z")

</div>

Not sure but I think HQ size is only the primaries and not the replicas.  
I know in Kopf that the replicas are taken into account. (as seen in your screen cap above. )

Are any indices closed? Closed indices are stored on disk and take up more space but may be included in KPOF stats. I'm not sure?

Anyone else know the difference?

---

<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: [July 5, 2017, 10:11pm UTC](https://discuss.elastic.co/t/elasticsearch-data-nodes-total-size/61800/7 "2017-07-05T22:11:05Z")

</div>


