What is segments.terms_memory_in_bytes?


(Wang Xiang Ustc) #1

I use plugin head to monitor elasticsearch cluster, and I found that the segments.terms_memory_in_bytes occupy most of the memory:

"segments": {
"count": 6813,
"memory_in_bytes": 39858854460,
"terms_memory_in_bytes": 37379779192,
"stored_fields_memory_in_bytes": 2461982384,
"term_vectors_memory_in_bytes": 0,
"norms_memory_in_bytes": 6998592,
"doc_values_memory_in_bytes": 10094292,
"index_writer_memory_in_bytes": 16501940,
"index_writer_max_memory_in_bytes": 7467965004,
"version_map_memory_in_bytes": 137381,
"fixed_bit_set_memory_in_bytes": 0
}

what is it ? and how to reduce it?


(Michael McCandless) #2

That's the heap memory Lucene uses to load the index into the terms dictionary and postings for indexed fields. It's a compact structure (a finite state transducer) so it's suprising yours are taking so much heap.

Do you have many indexed fields? High cardinality indexed fields?

Mike McCandless


(Wang Xiang Ustc) #3

yeah´╝î At the first I use the default mapping, and every field will be indexed. can move some of them from heap by myself?


(Michael McCandless) #4

The only way to do that is to stop indexing them.

Mike McCandless


(Wang Xiang Ustc) #5

new data will not insert into this index, and this index will be seldom searched. I delete some old data of this index, but the terms_memory_in_bytes is not changed. Why


(Michael McCandless) #6

To see a reduction in the terms heap usage, the segments containing the documents you deleted need to be merged away.

If the indices really will no longer change, you could forceMerge them but this is a costly operation.

Mike McCandless


(system) #7

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