Subject: [mongodb-user] Extremely Low RAM on MongoDB



I have an issue where MongoDB is using so much RAM, the OS only has < 50 MiB free / available. I don't know if I should compact all the collections in my database or if the actual amount of data we're using is large enough to use all of the system RAM. When I check the stats on my production database, I see:

PRIMARY> db.stats(1024)
{
 "db" : "myDb",
 "collections" : 26,
 "objects" : 3026,
 "avgObjSize" : 11712.888301387971,
 "dataSize" : 34612,
 "storageSize" : 1399596,
 "numExtents" : 83,
 "indexes" : 27,
 "indexSize" : 319,
 "fileSize" : 31377408,
 "nsSizeMB" : 16,
 "ok" : 1
}
PRIMARY> exit
bye
[email protected]:~$ df -h
Filesystem            Size  Used Avail Use% Mounted
                       47G  7.4G   38G  17% /
tmpfs                 4.0G     0  4.0G   0% /lib/init/rw
udev                  4.0G  120K  4.0G   1% /dev
tmpfs                 4.0G     0  4.0G   0% /dev/shm
/dev/sda1             228M   16M  201M   8% /boot
/dev/mapper/mongodb   911G   75G  790G   9% /var/lib/mongodb
[email protected]:~$
[email protected]:~$
[email protected]:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          8008       7956         51          0        268       7384
-/+ buffers/cache:        303       7705
Swap:         2111          0       2111

Any thoughts on how I can properly assess what is causing this? When I run 'mongostat', I can see 72.2G are mapped in memory:

insert  query update delete getmore command flushes mapped  vsize    res faults locked % idx miss %     qr|qw   ar|aw  netIn netOut  conn set repl       time
     0     79      1      0       1      40       0  72.2g  72.6g   254m      0        0          0       0|0     1|0    24k    16k     9 arp    M   20:56:09

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/6ae4be20-ede5-4049-96d8-84e700907968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Programming list archiving by: Enterprise Git Hosting