# Store.size of an index

**URL:** <https://discuss.elastic.co/t/store-size-of-an-index/115818>\
**Category:** Elasticsearch\
**Created:** [January 17, 2018, 3:36am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818 "2018-01-17T03:36:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [January 17, 2018, 3:36am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/1 "2018-01-17T03:36:02Z")

</div>

Hi there!

i am not clear on store.size and pri.store.size.

> health status index pri rep docs.count docs.deleted **store.size pri.store.size**  
> yellow open logstash-2018.01.16 5 1 24964 0 **34.9mb 34.9mb**

above index info,

1. are **store.size** and **pri.store.size** are compressed already?
2. is actual **total** store on disk **store.size + pri.store.size** ( **34.9mb+34.9mb** ) or **only store.size**?

appreciate if someone clean it up my mess up.

---

<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:** [January 17, 2018, 3:41am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/2 "2018-01-17T03:41:46Z")

</div>

1. If you are using 5.X and above, then yes these will be compressed sizes.
2. Yes. Because you have unassigned replicas the total is not 2 x `pri.store.size`.

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 17, 2018, 3:42am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/3 "2018-01-17T03:42:47Z")

</div>

`store.size` is the store size taken by primary & replica shards  
`pri.store.size` is the store size taken only by primary shards

If your replica shards were properly assigned (i.e. status=green), then `store.size` would be 69.8mb (=2x 34.9mb)

---

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [January 17, 2018, 3:53am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/4 "2018-01-17T03:53:25Z")

</div>

so, may i know which one is best practice? replica shards **assigned** or **unassigned**?

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 17, 2018, 3:56am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/6 "2018-01-17T03:56:41Z")

</div>

If you have a single node (usually in dev environment), you don't need replicas as you won't be able to assign them, so you can set `index.number_of_replicas` to 0 in your index settings when creating your index.

However, in production, you might want some redundancy, hence you usually provision more than one data nodes and the replicas shards will be properly assigned.

---

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [January 17, 2018, 3:58am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/7 "2018-01-17T03:58:39Z")

</div>

noted with thanks 🙂

---

<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:** [February 14, 2018, 3:59am UTC](https://discuss.elastic.co/t/store-size-of-an-index/115818/8 "2018-02-14T03:59:01Z")

</div>

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