Please help to describe indexing buffer related parameters' workflow

(Makeyang) #1

let's assume below parameters are all default and index.refresh_interval set -1:
indices.memory.index_buffer_size (10%)
indices.memory.min_index_buffer_size (48mb)
indices.memory.max_index_buffer_size (unbounded)
indices.memory.min_shard_index_buffer_size (4mb)

when start to index, ES will allocate 4mb memory for indexing and this buffer is keep fill, when it is full, how ES manage this memory? will it keep expand until it/them hit 10% limit and then flush this in memory data structure into disk or just flush this shard into disk when it hit 4mb?

(Adrien Grand) #2

What this means is that elasticsearch will compute the size of the indexing buffer as follows:

  • first take 10% of the available memory of the machine
  • then divide this amount of memory among active shards (shards that are actually indexing)
  • if this number is less than 4MB, then bump it to 4MB

(Makeyang) #3

what if it is more than 4mb?

(Adrien Grand) #4

If 10% of the memory of the machine divided by the number of active shards is less than 4MB, then elasticsearch will use 4MB for the indexing buffer.

(system) #5