# Calculate disk usage

**URL:** <https://discuss.elastic.co/t/calculate-disk-usage/244571>\
**Category:** Elasticsearch\
**Created:** [August 11, 2020, 2:33pm UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571 "2020-08-11T14:33:44Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 11, 2020, 2:33pm UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/1 "2020-08-11T14:33:44Z")

</div>

I've deployed a test cluster that feeds from about 5 servers.

I was asked to spec out the disk requirement once 50 servers would feed it logs with ILM setup (ILM should delete logs older than 3 month or 1 year - haven't decided yet).

Problem is, I'm not sure how much space it currently takes and how to calculate how much space it would take once ILM is set up.

Is it possible to calculate how much space elastic would take for 50 servers with ILM set up for 3 month or a year? Is it possible to set logs to be archived once their older than X time?

Huge thanks ahead.

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [August 12, 2020, 5:04am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/2 "2020-08-12T05:04:36Z")

</div>

```auto
GET /_cat/indices?v

```

Will give you among other details, store.size && pri.store.size  
Calculate averages of your indices for a day/week/month  
Then extrapolate for the time period you want.

store size is the size of the index + replicas on the disk.

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 12, 2020, 8:05am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/3 "2020-08-12T08:05:55Z")

</div>

Thanks for the response.

This is the response I get:

```
curl -X GET "localhost:9200/_cat/indices/?v"
curl: (52) Empty reply from server
```

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 12, 2020, 8:18am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/4 "2020-08-12T08:18:58Z")

</div>

Can you get any data from the server, like just:

curl localhost:9200/

Or use the Dev Tools icon in Kibana?

You may have security enabled, so no reply until you add auth credentials? Or this server using SSL/TLS so

curl [https://localhost:9200/\_cat\_indices?v](https://localhost:9200/_cat_indices?v)

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 12, 2020, 8:40am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/5 "2020-08-12T08:40:15Z")

</div>

Thanks for the response!

```auto
GET /_cat/indices?v

```

Worked in the dev tool. I get lots of results. Is it possible to see a sum of all the data?

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 12, 2020, 8:41am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/6 "2020-08-12T08:41:42Z")

</div>

GET /\_cluster/stats summarizes, such as store size in bytes.

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 13, 2020, 7:16am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/7 "2020-08-13T07:16:17Z")

</div>

> [@Steve\_Mushero](#):
>
> GET /\_cluster/stats

Thanks for the response. This seems to return an even longer output. I'm not sure what variable holds the sum size.

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 13, 2020, 9:19am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/8 "2020-08-13T09:19:00Z")

</div>

See total cluster size:

"store" : {  
"size\_in\_bytes" : 415514514555  
},

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 13, 2020, 10:52am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/9 "2020-08-13T10:52:15Z")

</div>

Thanks for the response.

Mine says 14773708614. If it's bites, it's 2 GB. if it's kb then it's 14773 GB which also doesn't make sense.

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 13, 2020, 10:54am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/10 "2020-08-13T10:54:56Z")

</div>

Everything is bytes, so 14.7GB.

14,773,708,614 bytes

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 13, 2020, 11:07am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/11 "2020-08-13T11:07:18Z")

</div>

Awesome! So just look how much data it takes for like a week and make the estimates?

Also, do you know if it's possible to have Elasticsearch compresses data it receives ( before i start making compressions)

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 13, 2020, 11:11am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/12 "2020-08-13T11:11:40Z")

</div>

Yes, for total size; it'll go up/down as segments merge, but watch over time and you can see - also turn on self monitoring in Kibana and might also be able to see at cluster level (I forget).

Elasticsearch compresses by default. You can increase it, but not sure makes much 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:** [September 10, 2020, 11:11am UTC](https://discuss.elastic.co/t/calculate-disk-usage/244571/13 "2020-09-10T11:11:44Z")

</div>

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