views:

177

answers:

1

I've read the MongoDB documentation, and it comes with a warning about 32-bit systems; particularly that they're capped at 2 GB of available RAM for Mongo.

So I was wondering if that statement meant anything in regards in running MongoDB in a low memory setting like Linode's 512mb of RAM based VPS. I doubt it matters but with a 64-bit distro for later resource adding.

Any warnings or would someone recommend a minimum of a RAM to choose in a VPS for MongoDB? I know project requirements figure into this, but I mean minimum in the sense of what'd be laughable to do without for even spinning MongoDB up.

+1  A: 

I use it on some small production sites which are running within my Linode 512 & it's using barely any memory, only a about 5 - 6MB. My dataset is very small for now.

MongoDB uses a mapped memory storage engine, which means it relies on the OS system cache to keep frequently used data in memory.

http://www.mongodb.org/display/DOCS/Caching

So unless you have a huge dataset to start out with, a Linode 512 should be OK.

The one thing I am a little concerned with when researching this is that MongoDB seems to crash when it runs out of memory, without much warning. It's also hard to pin down exactly how much memory or disk space it's going to use proportional to how much data you have. There also is no way to specify hard limits, at the cost of degraded performance. It's something you'll probably want to monitor.

You might try running MongoDB with the --smallfiles --noprealloc options, as this allows for smaller database files to start with and not preallocate them, saving disk space if you have a small dataset.

Here is one user's experience:

http://groups.google.com/group/mongodb-user/browse_thread/thread/223810a749f0e1eb

Unfortunately that thread was not resolved, would have been nice if they had a reason for the crash.

This also is good to read:

http://groups.google.com/group/mongodb-user/browse_thread/thread/2646a52c4f41d832/d43f3ba7bbbbd63d

Klinky
Ok, thank you Klinky :) I'll read those links and make sure I get a thorough understanding of the terms involved.
RayTFM