I would like to ask question about indices.segments.memory_in_bytes in Node Stats API .
Before asking the question I have read definitive guide and understood that segments are also exists in OS cache.
In my system, vmstat shows available memory is about 32 GB (free + buffer + cache) . OS memory is 64GB.
2017-12-01 11:05:01 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
2017-12-01 11:05:01 r b swpd free buff cache si so bi bo in cs us sy id wa st
2017-12-01 11:05:01 19 8 602408 497496 16 31037824 0 0 388 10411 1 0 48 7 41 4 0
2017-12-01 11:06:01 5 0 602396 412732 16 31117308 0 0 2358 161207 31772 56060 44 6 46 4 0
2017-12-01 11:07:01 9 1 602396 2158624 16 29376444 0 0 2241 152205 36625 52261 47 6 42 4 0
2017-12-01 11:08:01 13 10 602380 1612348 16 29921360 8 0 5728 147693 26983 52309 48 6 42 4 0
Segments.memory_in_bytes shows about 7.6GB.
"segments" : {
"count" : 4757,
"memory_in_bytes" : 7654472672,
"terms_memory_in_bytes" : 5632402110,
"stored_fields_memory_in_bytes" : 1788182664,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 306880,
"points_memory_in_bytes" : 213440590,
"doc_values_memory_in_bytes" : 20140428,
"index_writer_memory_in_bytes" : 116584108,
"version_map_memory_in_bytes" : 5922525,
"fixed_bit_set_memory_in_bytes" : 10688,
"max_unsafe_auto_id_timestamp" : 1512086419369,
"file_sizes" : { }
},
Heap is commited about 32 GB .
"jvm" : {
"timestamp" : 1512095101864,
"uptime_in_millis" : 171846023,
"mem" : {
"heap_used_in_bytes" : 16159640384,
"heap_used_percent" : 50,
"heap_committed_in_bytes" : 32098877440,
Given the fact that segment size in memory is 7.6GB and heap commited bytes is 32 GB, I was expecting vmstat to show about 24.4 GB. But its not.
Total OS memory : 64GB
Assigned Heap Size : 32 GB
Segment Size : 7.6GB
Available memory : about 24.4 GB
My question is , is segment.memory_in_bytes the usage in OS cache?
I appreciate if someone can give me advice.