Does Mongo work with Dynamic Memory and Hyper-V?

731 views
Skip to first unread message

Mike Boehm

unread,
Nov 9, 2015, 4:02:57 PM11/9/15
to mongodb-user
We have various Mongo VMs setup in our Hyper-V environment.  We've had some issues lately and the information that we get from support always says:

[As per our docs|https://docs.opsmanager.mongodb.com/current/core/requirements/], you need 15 GB for the OpsManager Application, 15 GB for the Backup Daemon, 8 GB for the Monitoring Database, and for the Backup Database, it is dependent on the amount of data being backed up. So if you are running the OpsManager Application and Monitoring Database, you should have at least 23 GB of memory available.

The whole point of Dynamic Memory is that we set the VM with a minimum and a maximum setting and the HyperVisor allocates memory to the VM as it requests more and takes it back if it doesn't need it any more.  Does anyone know if Mongo will work with that setup?  If we have to dedicate 23 Gigs of memory to each server, that's insane.

Does anyone have Mongo running in a Hyper-V environment with Dynamic Memory?  If so, what settings are you using for your minimum and maximum?  Or do we need to run it as static memory with 23 in order to make it work?

Thanks.

Wan Bachtiar

unread,
Nov 16, 2015, 10:10:39 PM11/16/15
to mongodb-user

Hi Mike,

The quoted response that you posted is the recommended memory requirements for OpsManager Application which is part of the Enterprise package.

If your company already has a commercial subscription and you have further questions about running OpsManager I would suggest to open a case in the Commercial Support Project in MongoDB Jira.

If you are referring to MongoDB itself - MongoDB will use available free memory for caching, and swap to disk as needed to yield memory to other applications on the same server.

To calculate how much RAM you need, you must calculate your working set size, or the portion of your data that clients use most often. This depends on your access patterns, what indexes you have, and the size of your documents. For the best performance you will want to have enough RAM to keep your indices and working set in memory.

For more information about RAM requirements:


Regards,

Wan.


Dan Rusu

unread,
Mar 23, 2016, 7:22:03 AM3/23/16
to mongodb-user
Hi

This does not answer the original question.

If mongod is caching 60% of memory at startup and never tries to allocate more, then dynamic memory allocation will not work for it at all.

But I am unsure of this.

Anyone?

Wan Bachtiar

unread,
Mar 29, 2016, 2:05:47 AM3/29/16
to mongodb-user

If mongod is caching 60% of memory at startup and never tries to allocate more, then dynamic memory allocation will not work for it at all.

Hi Dan,

I assumed by 60% of memory at startup, you are referring to wiredTigerCache size which is the default in MongoDB v3.2.

Note that wiredTigerCache is only for the size limit of the WiredTiger cache - this is not the total amount of memory used by mongod. mongod will automatically use all free memory on the machine via the filesystem cache. See also Memory diagnostics for WiredTiger.

In regards to virtualisation, generally anything that misleads about the memory availability will tend to cause performance issues under memory pressure.
For more information see: Production notes: VMWare and Understanding VMWare ballooning.

Also note that the original post on this thread is in relation to Ops Manager, if you still have further questions please open a new thread discussion detailing your environment and use case.

Kind regards,

Wan.

Reply all
Reply to author
Forward
0 new messages