Store.size of an index

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.

1 Like
  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.
2 Likes

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)

7 Likes

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

1 Like

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.

3 Likes

noted with thanks :slight_smile:

2 Likes

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