Different size_in_bytes for the same index

Hello! :slight_smile:

I'm trying to get the size in bytes of an individual document for each index I have.
I'm using Index stats to get that information dividing the size_of bytes with docs (total docs count).
For example:

{
  "_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):

{
  "_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

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

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