Index storage size increased a lot after reindex

hi, I just reindex all the Eng-sort-test-2018-* into one single index: Eng-sort-test-2018. what I found is the primary storage size increased a lot, the sum of all sub indices is 39.5895gb, but the new single index size is increased a lot, changed to 62.4gb, so any one can help explain it why increased so much?
thanks!

Name Health Status Primaries Replicas Docs Count Storage size Primary storage size
Eng-sort-2018-01-01 green open 5 2 15907103 6.6gb 2.1gb 2.1
Eng-sort-2018-02-01 green open 5 2 921445 0.5077gb 169mb 0.169
Eng-sort-2018-03-01 green open 5 2 13578919 7.1gb 2.3gb 2.3
Eng-sort-2018-04-01 green open 5 2 17600634 9.4gb 3.1gb 3.1
Eng-sort-2018-05-01 green open 5 2 21215855 11.5gb 3.8gb 3.8
Eng-sort-2018-06-01 green open 5 2 47990649 26gb 8.6gb 8.6
Eng-sort-2018-07-01 green open 5 2 43950622 24.2gb 8gb 8
Eng-sort-2018-08-01 green open 5 2 4646029 2.4gb 843.6mb 0.8436
Eng-sort-2018-09-01 green open 5 2 3039927 1.6gb 576.9mb 0.5769
Eng-sort-2018-10-01 green open 5 2 9950270 5.3gb 1.7gb 1.7
Eng-sort-2018-11-01 green open 5 2 6434044 3.4gb 1.1gb 1.1
Eng-sort-2018-12-01 green open 5 2 35137823 22.1gb 7.3gb 7.3
summary Eng-sort-2018 green open 2 0 220373320 62.4gb 62.4gb 39.5895

Do you have the same mapping ?

yes, the mapping is the same. the docs count is correct but size increased too much, I will try reindex one by one and see what will happen

What does the mappings for new and old indices look like?

the changes are only for index settings: something like reduce number_of_shards, disable the refresh..
settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "2",
"refresh_interval": "-1"
}
},
I will try only reindex one small single index and see what will happen
so do you think what maybe the potential factors of the storage size change?
...

What does the mappings (not settings) look like?

I just reindex a single index

Name Health 	Status 	Primaries 	Replicas 	Docs Count 	Storage size 	Primary storage size	
eng-sort-test-2018-01-01 green open 5   2    4646029   2.4gb   843.6mb
reindex-2018-01  green  open  1  0  4646029  1gb  1gb

storage size increased from 843Mb to more than 1Gb

the mappings are exactly the same as below, I just removed some fields.

{
  "mapping": {
    "doc": {
      "dynamic": "true",
      "dynamic_templates": [
        {
          "date_1": {
            "match": "DoneTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "date_2": {
            "match": "EndTestTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "date_3": {
            "match": "FileTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "date_4": {
            "match": "LotEndTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "date_5": {
            "match": "LotStartTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "date_6": {
            "match": "StartTestTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "date_7": {
            "match": "TransferTime",
            "mapping": {
              "type": "date"
            }
          }
        },
        {
          "key_word_1": {
            "match": "WaferLot",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "key_word_2": {
            "match": "LotNumber",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        ...
        {
          "key_word_52": {
            "match": "result",
            "mapping": {
              "type": "keyword"
            }
          }
        },
        {
          "text_1": {
            "match": "bitValues",
            "mapping": {
              "type": "text"
            }
          }
        },
        {
          "text_2": {
            "match": "componentHash",
            "mapping": {
              "type": "text"
            }
          }
        },
        {
          "text_3": {
            "match": "highSpecLimit",
            "mapping": {
              "type": "text"
            }
          }
        },
        {
          "text_4": {
            "match": "lowSpecLimit",
            "mapping": {
              "type": "text"
            }
          }
        },
        {
          "byte_1": {
            "match": "BinType",
            "mapping": {
              "type": "byte"
            }
          }
        },
       ....
        {
          "byte_8": {
            "match": "networkError",
            "mapping": {
              "type": "byte"
            }
          }
        },
        {
          "short_1": {
            "match": "UnitCnt",
            "mapping": {
              "type": "short"
            }
          }
        }, 
 ....
        {
          "short_5": {
            "match": "portNumber",
            "mapping": {
              "type": "short"
            }
          }
        },
        {
          "float_1": {
            "match": "value",
            "mapping": {
              "type": "float"
            }
          }
        },
        {
          "float_2": {
            "match": "TestTime",
            "mapping": {
              "type": "float"
            }
          }
        },
        {
          "float_3": {
            "match": "connectTime",
            "mapping": {
              "type": "float"
            }
          }
        },
        {
          "float_4": {
            "match": "recvTime",
            "mapping": {
              "type": "float"
            }
          }
        },
        {
          "float_5": {
            "match": "totalQueryTime",
            "mapping": {
              "type": "float"
            }
          }
        },
        {
          "integer_1": {
            "match": "DocCnt",
            "mapping": {
              "type": "integer"
            }
          }
        },
 ....
        {
          "integer_8": {
            "match": "sequence",
            "mapping": {
              "type": "integer"
            }
          }
        },
        {
          "long_1": {
            "match": "timestamp",
            "mapping": {
              "type": "long"
            }
          }
        },
        {
          "long_2": {
            "match": "endTimestamp",
            "mapping": {
              "type": "long"
            }
          }
        },
        {
          "long_3": {
            "match": "startTimestamp",
            "mapping": {
              "type": "long"
            }
          }
        },
        {
          "integers": {
            "match_mapping_type": "long",
            "mapping": {
              "type": "text"
            }
          }
        },
        {
          "float": {
            "match_mapping_type": "double",
            "mapping": {
              "type": "float"
            }
          }
        },
        {
          "string_fields": {
            "match_mapping_type": "string",
            "mapping": {
              "type": "text"
            }
          }
        }
      ]
}
}
}
old index stats
{
  "_shards": {
    "total": 15,
    "successful": 15,
    "failed": 0
  },
  "stats": {
    "uuid": "llYruV2QQvW1aJ3fclAS5Q",
    "primaries": {
      "docs": {
        "count": 4646029,
        "deleted": 0
      },
      "store": {
        "size_in_bytes": 884631128
      },
      "indexing": {
        "index_total": 0,
        "index_time_in_millis": 0,
        "index_current": 0,
        "index_failed": 0,
        "delete_total": 0,
        "delete_time_in_millis": 0,
        "delete_current": 0,
        "noop_update_total": 0,
        "is_throttled": false,
        "throttle_time_in_millis": 0
      },
      "get": {
         removed...
      },
      "search": {
        "open_contexts": 0,
        "query_total": 41278,
        "query_time_in_millis": 43525,
        "query_current": 0,
        "fetch_total": 41130,
        "fetch_time_in_millis": 111370,
        "fetch_current": 0,
        "scroll_total": 8,
        "scroll_time_in_millis": 7318742,
        "scroll_current": 0,
        "suggest_total": 0,
        "suggest_time_in_millis": 0,
        "suggest_current": 0
      },
      "merges": {
        "current": 0,
        "current_docs": 0,
        "current_size_in_bytes": 0,
        "total": 0,
        "total_time_in_millis": 0,
        "total_docs": 0,
        "total_size_in_bytes": 0,
        "total_stopped_time_in_millis": 0,
        "total_throttled_time_in_millis": 0,
        "total_auto_throttle_in_bytes": 104857600
      },
      "refresh": {
        "total": 15,
        "total_time_in_millis": 85,
        "listeners": 0
      },
      "flush": {
        "total": 5,
        "periodic": 0,
        "total_time_in_millis": 85
      },
      "warmer": {
        "current": 0,
        "total": 5,
        "total_time_in_millis": 0
      },
      "query_cache": {
        "memory_size_in_bytes": 0,
        "total_count": 1078,
        "hit_count": 0,
        "miss_count": 1078,
        "cache_size": 0,
        "cache_count": 0,
        "evictions": 0
      },
      "fielddata": {
        "memory_size_in_bytes": 6528,
        "evictions": 0
      },
      "completion": {
        "size_in_bytes": 0
      },
      "segments": {
        "count": 64,
        "memory_in_bytes": 2567293,
        "terms_memory_in_bytes": 1456057,
        "stored_fields_memory_in_bytes": 720872,
        "term_vectors_memory_in_bytes": 0,
        "norms_memory_in_bytes": 20096,
        "points_memory_in_bytes": 222140,
        "doc_values_memory_in_bytes": 148128,
        "index_writer_memory_in_bytes": 0,
        "version_map_memory_in_bytes": 0,
        "fixed_bit_set_memory_in_bytes": 0,
        "max_unsafe_auto_id_timestamp": 1540880597154,
        "file_sizes": {}
      },
      "translog": {
        "operations": 0,
        "size_in_bytes": 1650,
        "uncommitted_operations": 0,
        "uncommitted_size_in_bytes": 1650,
        "earliest_last_modified_age": 0
      },
      "request_cache": {
        "memory_size_in_bytes": 13822,
        "evictions": 0,
        "hit_count": 0,
        "miss_count": 17
      },
      "recovery": {
        "current_as_source": 0,
        "current_as_target": 0,
        "throttle_time_in_millis": 0
      }
    },
    "total": {
      "docs": {
        "count": 13938087,
        "deleted": 0
      },
      "store": {
        "size_in_bytes": 2656471855
      },
      "indexing": { 
          removed...
      },
      "get": {
         removed...
      },
      "search": {
        "open_contexts": 0,
        "query_total": 136385,
        "query_time_in_millis": 151668,
        "query_current": 0,
        "fetch_total": 135952,
        "fetch_time_in_millis": 365018,
        "fetch_current": 0,
        "scroll_total": 25,
        "scroll_time_in_millis": 24113716,
        "scroll_current": 0,
        "suggest_total": 0,
        "suggest_time_in_millis": 0,
        "suggest_current": 0
      },
      "merges": {
        "current": 0,
        "current_docs": 0,
        "current_size_in_bytes": 0,
        "total": 0,
        "total_time_in_millis": 0,
        "total_docs": 0,
        "total_size_in_bytes": 0,
        "total_stopped_time_in_millis": 0,
        "total_throttled_time_in_millis": 0,
        "total_auto_throttle_in_bytes": 314572800
      },
      "refresh": {
        "total": 35,
        "total_time_in_millis": 89,
        "listeners": 0
      },
      "flush": {
        "total": 5,
        "periodic": 0,
        "total_time_in_millis": 85
      },
      "warmer": {
        "current": 0,
        "total": 15,
        "total_time_in_millis": 0
      },
      "query_cache": {
        "memory_size_in_bytes": 0,
        "total_count": 2902,
        "hit_count": 0,
        "miss_count": 2902,
        "cache_size": 0,
        "cache_count": 0,
        "evictions": 0
      },
      "fielddata": {
        "memory_size_in_bytes": 20352,
        "evictions": 0
      },
      "completion": {
        "size_in_bytes": 0
      },
      "segments": {
        "count": 203,
        "memory_in_bytes": 7819733,
        "terms_memory_in_bytes": 4465984,
        "stored_fields_memory_in_bytes": 2161640,
        "term_vectors_memory_in_bytes": 0,
        "norms_memory_in_bytes": 63936,
        "points_memory_in_bytes": 666673,
        "doc_values_memory_in_bytes": 461500,
        "index_writer_memory_in_bytes": 0,
        "version_map_memory_in_bytes": 0,
        "fixed_bit_set_memory_in_bytes": 0,
        "max_unsafe_auto_id_timestamp": 1540880597154,
        "file_sizes": {}
      },
      "translog": {
        "operations": 0,
        "size_in_bytes": 4950,
        "uncommitted_operations": 0,
        "uncommitted_size_in_bytes": 4950,
        "earliest_last_modified_age": 0
      },
      "request_cache": {
        "memory_size_in_bytes": 36555,
        "evictions": 0,
        "hit_count": 0,
        "miss_count": 45
      },
      "recovery": {
        "current_as_source": 0,
        "current_as_target": 0,
        "throttle_time_in_millis": 0
      }
    }
  }
}
new index stats:
{
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0
  },
  "stats": {
    "uuid": "TtyEJojjRSiEmtk_1iCsJA",
    "primaries": {
      "docs": {
        "count": 4646029,
        "deleted": 0
      },
      "store": {
        "size_in_bytes": 1131999811
      },
      "indexing": {
        "index_total": 4646029,
        "index_time_in_millis": 507054,
        "index_current": 0,
        "index_failed": 0,
        "delete_total": 0,
        "delete_time_in_millis": 0,
        "delete_current": 0,
        "noop_update_total": 0,
        "is_throttled": false,
        "throttle_time_in_millis": 0
      },
     [...removed]
      "merges": {
        "current": 0,
        "current_docs": 0,
        "current_size_in_bytes": 0,
        "total": 0,
        "total_time_in_millis": 0,
        "total_docs": 0,
        "total_size_in_bytes": 0,
        "total_stopped_time_in_millis": 0,
        "total_throttled_time_in_millis": 0,
        "total_auto_throttle_in_bytes": 20971520
      },
      "refresh": {
        "total": 21,
        "total_time_in_millis": 2332,
        "listeners": 0
      },
      "flush": {
        "total": 8,
        "periodic": 7,
        "total_time_in_millis": 39646
      },
      "warmer": {
        "current": 0,
        "total": 9,
        "total_time_in_millis": 0
      },
      "query_cache": {
        "memory_size_in_bytes": 0,
        "total_count": 0,
        "hit_count": 0,
        "miss_count": 0,
        "cache_size": 0,
        "cache_count": 0,
        "evictions": 0
      },
      "fielddata": {
        "memory_size_in_bytes": 0,
        "evictions": 0
      },
      "completion": {
        "size_in_bytes": 0
      },
      "segments": {
        "count": 24,
        "memory_in_bytes": 2433128,
        "terms_memory_in_bytes": 1394077,
        "stored_fields_memory_in_bytes": 729272,
        "term_vectors_memory_in_bytes": 0,
        "norms_memory_in_bytes": 7552,
        "points_memory_in_bytes": 214179,
        "doc_values_memory_in_bytes": 88048,
        "index_writer_memory_in_bytes": 0,
        "version_map_memory_in_bytes": 0,
        "fixed_bit_set_memory_in_bytes": 0,
        "max_unsafe_auto_id_timestamp": -1,
        "file_sizes": {}
      },
      "translog": {
        "operations": 672029,
        "size_in_bytes": 586640104,
        "uncommitted_operations": 0,
        "uncommitted_size_in_bytes": 55,
        "earliest_last_modified_age": 0
      },
      "request_cache": {
        "memory_size_in_bytes": 0,
        "evictions": 0,
        "hit_count": 0,
        "miss_count": 0
      },
      "recovery": {
        "current_as_source": 0,
        "current_as_target": 0,
        "throttle_time_in_millis": 0
      }
    },
    "total": {
      "docs": {
        "count": 4646029,
        "deleted": 0
      },
      "store": {
        "size_in_bytes": 1131999811
      },
      "indexing": {
        "index_total": 4646029,
        "index_time_in_millis": 507054,
        "index_current": 0,
        "index_failed": 0,
        "delete_total": 0,
        "delete_time_in_millis": 0,
        "delete_current": 0,
        "noop_update_total": 0,
        "is_throttled": false,
        "throttle_time_in_millis": 0
      },
      "get": {
        "total": 0,
        "time_in_millis": 0,
        "exists_total": 0,
        "exists_time_in_millis": 0,
        "missing_total": 0,
        "missing_time_in_millis": 0,
        "current": 0
      },
      "search": {
        "open_contexts": 0,
        "query_total": 0,
        "query_time_in_millis": 0,
        "query_current": 0,
        "fetch_total": 0,
        "fetch_time_in_millis": 0,
        "fetch_current": 0,
        "scroll_total": 0,
        "scroll_time_in_millis": 0,
        "scroll_current": 0,
        "suggest_total": 0,
        "suggest_time_in_millis": 0,
        "suggest_current": 0
      },
      "merges": {
        "current": 0,
        "current_docs": 0,
        "current_size_in_bytes": 0,
        "total": 0,
        "total_time_in_millis": 0,
        "total_docs": 0,
        "total_size_in_bytes": 0,
        "total_stopped_time_in_millis": 0,
        "total_throttled_time_in_millis": 0,
        "total_auto_throttle_in_bytes": 20971520
      },
      "refresh": {
        "total": 21,
        "total_time_in_millis": 2332,
        "listeners": 0
      },
      "flush": {
        "total": 8,
        "periodic": 7,
        "total_time_in_millis": 39646
      },
      "warmer": {
        "current": 0,
        "total": 9,
        "total_time_in_millis": 0
      },
      "query_cache": {
        "memory_size_in_bytes": 0,
        "total_count": 0,
        "hit_count": 0,
        "miss_count": 0,
        "cache_size": 0,
        "cache_count": 0,
        "evictions": 0
      },
      "fielddata": {
        "memory_size_in_bytes": 0,
        "evictions": 0
      },
      "completion": {
        "size_in_bytes": 0
      },
      "segments": {
        "count": 24,
        "memory_in_bytes": 2433128,
        "terms_memory_in_bytes": 1394077,
        "stored_fields_memory_in_bytes": 729272,
        "term_vectors_memory_in_bytes": 0,
        "norms_memory_in_bytes": 7552,
        "points_memory_in_bytes": 214179,
        "doc_values_memory_in_bytes": 88048,
        "index_writer_memory_in_bytes": 0,
        "version_map_memory_in_bytes": 0,
        "fixed_bit_set_memory_in_bytes": 0,
        "max_unsafe_auto_id_timestamp": -1,
        "file_sizes": {}
      },
      "translog": {
        "operations": 672029,
        "size_in_bytes": 586640104,
        "uncommitted_operations": 0,
        "uncommitted_size_in_bytes": 55,
        "earliest_last_modified_age": 0
      },
      "request_cache": {
        "memory_size_in_bytes": 0,
        "evictions": 0,
        "hit_count": 0,
        "miss_count": 0
      },
      "recovery": {
        "current_as_source": 0,
        "current_as_target": 0,
        "throttle_time_in_millis": 0
      }
    }
  }
}

The index size can vary quite a bit depending on the number of segments and how recently the last merge took place. To compare apples to apples, run a force merge down to a single segment for both indices before comparing. Also make sure that you have as few shards as possible.

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