# Primary store size showing wrong info while using \_cat/indices

**URL:** <https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361>\
**Category:** Elasticsearch\
**Created:** [March 16, 2021, 11:56am UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361 "2021-03-16T11:56:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [March 16, 2021, 11:56am UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/1 "2021-03-16T11:56:37Z")

</div>

I somehow doubt \_cat/indices is showing me wrong information regarding store size.

I have two indices - **giitran\_with\_message** and **giitran\_without\_message**.

Now both have have almost the same document. Each one has 1000 docs. The only difference is that giitran\_with\_message has one extra field - **message**.

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/0/50b1403bbe0a43542770dbf6d29f4e08f4d05196.png)

Now as you can see from response of \_cat/indices, the primary store size of the index (giitran\_with\_message) with extra field is smaller than the index without message field even though store size seems correct.

Normally primary store size should be half of store size since we have one replica. It looks logical for giitran\_with\_message ( ss= 505.1kb pss=252.5kb) but not for giitran\_wthout\_message (ss =426.8kb pss = 281.2kb). Any thoughts ?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 16, 2021, 2:20pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/2 "2021-03-16T14:20:23Z")

</div>

In short when indices are very small (which yours are) the store sizes can look / be a little inconsistent (segments are getting created etc) . Index a 100k or 1M messages in and I suspect you will see what you expect to see. In fact as the index grows it actual size Will Saw Tooth a bit as it grows segments get created, merged etc.

Oh other thought if your test document has the same message the storage per doc (when you divide out) will probably be less than if it is a random message, how much depends on the actual data.

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [March 16, 2021, 3:00pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/3 "2021-03-16T15:00:48Z")

</div>

Yeah the test document is actually same. So all 1000 docs have same data apart from \_id.

Will try with 100k docs and compare.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 16, 2021, 3:02pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/4 "2021-03-16T15:02:57Z")

</div>

I have also noticed when they are very small, do a `_search` against the index before looking at the sizes, I am not sure why but it seems to make sure the latest data is reflected. I don't notice the same behavior once the indices are larger.

> [@Divit\_Sharma](#):
>
> Yeah the test document is actually same. So all 1000 docs have same data apart from \_id.
> 
> Will try with 100k docs and compare.

Yes and even 100K docs is still very small in Elasticsearch terms, that will be 25-28MB we we often work with indices that are 20-50GB+ (even much larger). Elasticsearch will work great with smaller data set where it gets amazing is with larger data sets.

Curious Are you trying to calculate storage for a larger data set? If so I would try to get to ~10% of the prod datasets before you try to calculate storage.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 16, 2021, 3:13pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/5 "2021-03-16T15:13:07Z")

</div>

When comparing size, always make sure you first forcemerge down to a single segment as the indices may have merged differently.

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [March 16, 2021, 3:40pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/6 "2021-03-16T15:40:30Z")

</div>

Yes i have also observed that the \_cat api is little slow and doing a search against the index refreshes it.

I am actually evaluating if I remove the message field from my index how much space will I save. Currently our index size per day is 60gbs. So I was thinking of removing the message field since we have the individual fields which makes up the message.

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [March 16, 2021, 3:41pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/7 "2021-03-16T15:41:02Z")

</div>

I will take a look at forcemerge.

---

<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:** [April 13, 2021, 3:41pm UTC](https://discuss.elastic.co/t/primary-store-size-showing-wrong-info-while-using-cat-indices/267361/8 "2021-04-13T15:41:20Z")

</div>

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