# Different size\_in\_bytes for the same index

**URL:** <https://discuss.elastic.co/t/different-size-in-bytes-for-the-same-index/290474>\
**Category:** Elasticsearch\
**Created:** [November 29, 2021, 5:40pm UTC](https://discuss.elastic.co/t/different-size-in-bytes-for-the-same-index/290474 "2021-11-29T17:40:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saliinger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saliinger/32/77470_2.png) [@Saliinger](https://discuss.elastic.co/u/Saliinger)\
**Post date:** [November 29, 2021, 5:40pm UTC](https://discuss.elastic.co/t/different-size-in-bytes-for-the-same-index/290474/1 "2021-11-29T17:40:50Z")

</div>

Hello! 🙂

I'm trying to get the size in bytes of an individual document for each index I have.  
I'm using [Index stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html) to get that information dividing the `size_of bytes` with `docs` (total docs count).  
For example:

```auto
{
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "_all" : {
    "primaries" : {
      "docs" : {
        "count" : 21962,
        "deleted" : 0
      },
      "store" : {
        "size_in_bytes" : 10079240,
        "reserved_in_bytes" : 0
      },
...

```

Here I get 11159487/26670 = 418.428458943 bytes. And that measure repeats often (between 420-430 bytes)  
The doc count seems uniform but what happen with the size of bytes? Sometimes it shows another meassure of bytes ruining the usual measure. Like here (5 mins after previous measure):

```auto
{
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "_all" : {
    "primaries" : {
      "docs" : {
        "count" : 21986,
        "deleted" : 0
      },
      "store" : {
        "size_in_bytes" : 14436378,
        "reserved_in_bytes" : 0
      },
...

```

14436378/21986 = 656.616847085 Bytes. That's incorrect.

Here I have an histogram that show how frequently this happen

![image](https://us1.discourse-cdn.com/elastic/original/3X/8/3/83694e9abf47631671a0d125e5b91d374729149b.png)

Why sometimes it happen?  
Is something worng with my index?

---

<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:** [December 27, 2021, 5:41pm UTC](https://discuss.elastic.co/t/different-size-in-bytes-for-the-same-index/290474/2 "2021-12-27T17:41:32Z")

</div>

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