ie includes amount of data attr \ blobs \ dictionary \ skiplist actually mapped into app memory
for the RT index itself it includes all disk chunks ram_bytes plus the RT RAM itself - the amount of data stored in the RAM segments (shown as ram_chunk)
maybe OS does not load them into memory but keep them to disk?
if you use mlock option and it succeed only then you could be sure the data actually in memory
Its obvisoully, flushed the RAM chunk in the meantime, but did some more queries (with MATCH and attribute) and have much higher disk_mapped_cached now
… would explain the 64k diff as disk_mapped_cached was only 45k.
I’ve always assumed attributes and dictionary etc are always mapped into memory (even if unused), it was only the extra files (like doc lists) that loaded as needed. Seems was wrong about that (although yes, reading about mlock, can influence it!)
So really ram_bytes = disk_mapped_cached + ram_chunk + (bit extra for headers etc)
“peak” (worst case) memory usage woudl be basically
= disk_mapped + mem_limit + (bit extra for headers etc)
(ie total of disk_mapped COULD be mapped to memory, even if not currently. And mem_limit should be the biggest ram_chunk can get to)