Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does running MongoDB in-memory create duplicates on RAM

Tags:

memory

mongodb

You can create ramdisks, tmpfs etc on RAM to create partitions to be used for different applications.

A similar one was posted in the following post: How to use MongoDB as a pure in-memory DB (Redis style)

MongoDB uses the resident memory for the hot data.

Hence 1) Does using ramdisk duplicate the ram usage for the same data?

2) Is there a way to disable the usage of resident memory?


Edit: We can think of the hosting OS as CentOS or Ubuntu Servers, since they are the foremost used servers.

like image 239
bugdayci Avatar asked Dec 02 '14 13:12

bugdayci


People also ask

Can you run MongoDB in-memory?

In addition to running as standalones, mongod instances that use in-memory storage engine can run as part of a replica set or part of a sharded cluster.

How much RAM does MongoDB need?

MongoDB requires approximately 1 GB of RAM per 100.000 assets. If the system has to start swapping memory to disk, this will have a severely negative impact on performance and should be avoided.

Should I use in-memory database?

The main use case for in-memory databases is when real-time data is needed. With its very low latency, RAM can provide near-instantaneous access to the needed data. Because of the potential data losses, in-memory databases without a persistence mechanism should not be used for mission-critical applications.

How does an in-memory database work?

Data storage in an in-memory database relies on a computer's random access memory (RAM) or main memory instead of traditional disk drives. Data is loaded into an in-memory database in a compressed and non-relational format. The data is in a directly usable format without the barrier of compression or encryption.


1 Answers

By the way MongoDB introduced plug-able storage engines in 3.0 release. And it ships with an experimental in-memory DB storage engine.

I was planning to use in memory DB for our testing environments, in order to get fast responses. So being experimental seems fine to me.

http://www.mongodb.com/blog/post/whats-new-mongodb-30-part-3-performance-efficiency-gains-new-storage-architecture

like image 141
bugdayci Avatar answered Sep 22 '22 19:09

bugdayci