Hi,
We have mongodb 1.6.5 running on SUSE linux box with 16G memory and
479G hard disk. We have the virtual memory limit set to 450G. We have
one database with multiple collections each containing around 8
million records. We do insertions/deletions and updates to the data.
Currently the collections (including indexes) are taking around 83G of
storage/disk space:
Somehow the mongod process is taking 428G of virtual memory as shown
below:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2356 demo 20 0 428g 3.0g 3.0g S 2 19.2 4100:46 mongod
> db.serverStatus().mem
{
"bits" : 64,
"resident" : 3073,
"virtual" : 438295,
"supported" : true,
"mapped" : 438011
}
>
When I try to create a new collection I get the following error:
> db.testcoll.insert({key:1})
can't map file memory
In the mongo log I get the following:
Thu Mar 31 20:44:57 [conn104] mmap() failed for /export/home/rail/
var/lib/mongodb/mis3.218 len:
2146435072 errno:12 Cannot allocate
memory
Thu Mar 31 20:44:57 [conn104] mmap failed with out of memory, if
you're using 32-bits, then you probably need to upgrade to 64
1) What I don't understand is that if the amount of data currently
stored is only 83G, then why does mongod require so much virtual
memory.
2) Is there a way to free up some of this space without bringing the
database offline so that we can create new collections in the
database?
Thanks and Regards,
Prashant