Mongo db taking lot of virtual memory - mongodb

My mongo db collection size is appro 2Gb , and it is taking a lot of virtual memory when i continously hit database, my server ram is 48Gb , and mongo takes around 60Gb virtual memory.

Related

How can I get mongo db actual size?

When I run below command in mongo shell,
db.stats()
I get below and this is wired. When I check mongoDB installation folder it only used around 2 GB disk space?
see below fsTotalSize over 80 GB
From dbStats documentation:
fsTotalSize and fsUsedSize are about the filesystem that the database is stored on. They'd be used to get an idea about how much the database could grow to.
dataSize is the size of the all the documents themselves.
storageSize is the size of the data stored on the filesystem (it can be smaller than the dataSize if using compression).
So the database takes up 6.7MB on the filesystem.
dbStats
dbStats.fsTotalSize - Total size of all disk capacity on the filesystem where MongoDB stores data.
It looks like 80 GB is the total of all disk capacity on the filesystem

How heroku postgres works with 0 bytes of RAM

On heroku postgres plan page https://elements.heroku.com/addons/heroku-postgresql, it is mentioned that for hobby plans there is 0 bytes of RAM. Does it mean that Postgres is working without RAM?
The 0 bytes RAM refers to the amount of in-memory cache allocated to your datastore. Heroku says...
The lack of an in-memory cache limits performance, because the data can’t be accessed on low-latency storage.

What maps MongoDb into memory

Does MongoDb mmap everything (i.e. all data files + all indexes) into memory on start?
If database has 100GB and machine has only 4GB RAM, MongoDb mmaps whole database into memory, is it right?
MongoDB uses memory-mapped files for all data. See the following documentation for how this works:
http://docs.mongodb.org/manual/faq/storage/#what-are-memory-mapped-files
http://www.mongodb.org/display/DOCS/Checking+Server+Memory+Usage
http://www.mongodb.org/display/DOCS/Starting+and+Stopping+Mongo#StartingandStoppingMongo-MemoryUsage
http://www.mongodb.org/display/DOCS/Caching

MongoDB shared memory usage

I was looking at the top output on a dedicated mongo machine with 16gb of ram and I noticed that the memory consumed by the mongod process was split 7.5gb RES and 7.5gb SHR. What is 7.5gb used for in SHR memory? Does this mean that mongodb actually has only 7.5gb available for mem-mapping the data?

Mongodb32-bit limitation is for single database?

I am using mongodb-v2.0. I have gone through the 32-bit mongodb limitation of "2GB". The thing which baffling me is 2GB limitation. I will explain our scenario :-
When the database reaches 2GB. It is possible to use different database name in a single instance.If so then each database will have 2GB? Can we use different instance of mongodb listening on different port. If its possible,then can we continue in creating new database until it reaches 2GB of size?. In this way can we use multiple database of size 2GB on 32-bit mongodb on 32-bit machines?
Thanks,
sampath
The 2GB are the storage limit for the mongodb server. See in the FAQ http://www.mongodb.org/display/DOCS/FAQ#FAQ-Whatarethe32bitlimitations%3F
But maybe this is your solution: Database over 2GB in MongoDB