On Nov 25, 2009, at 11:50, Eliot Horowitz wrote:
> That's mmaped data - so you don't need real RAM or even virtual ram to
> back it up.
> It uses almost nothing that isn't mmaped, so there isn't a setting.
Maybe I just don't understand how it works then; but the end-result for me is that top reports mongod to use 32GB memory; of which 15-16GB is reported resident.
You are saying that all that memory is just mmap'ed data? I guess that's okay then, except Linux does seem to favor using memory on that mmap'ed data over using it for file system cache (which I'm using for MyISAM tables on this particular set of boxes).
- ask
# ps axwum | grep mongod | head -1
root 4051 35.7 48.3 33139564 15940924 ? - Nov24 640:42 /pkg/packages/mongodb-linux-x86_64-2009-11-24/bin/mongod --shardsvr --dbpath=/mongodb/shard/
# top -n 1
Tasks: 208 total, 1 running, 207 sleeping, 0 stopped, 0 zombie
Cpu(s): 7.5%us, 0.5%sy, 0.0%ni, 87.4%id, 4.4%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 32962968k total, 32800712k used, 162256k free, 120516k buffers
Swap: 2097144k total, 2097036k used, 108k free, 20186236k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3951 mysql 15 0 10.8g 9.1g 3480 S 124.4 28.8 9104:14 mysqld
4051 root 16 0 31.6g 15g 15g S 71.1 48.3 642:38.92 mongod
[...]