Search code examples
mongodbin-memory-database

Can I configure MongoDB to be In-Memory?


I am interested in using a database that will allow high performance, with an expected requirement of cluster for a massive horizontal scaling.

We are looking into using MongoDB, does anyone know if I can use it InMemory (i.e. in the RAM - for performance reasons)?

Tnx


Solution

  • A performance boost approach you can take is to use a RAM disk

    e.g.:

    mongod --smallfiles --noprealloc --nojournal --dbpath <ramdisk mounted localtion>
    

    See also: