Shreekant N
Shreekant N

Reputation: 868

How to make MongoDB as in-memory database (partially or fully) in Windows 8.1

I am using MongoDB as database for my spring web service.Now I want some data(if possible) or complete data should be transferred to mongodb database as in-memory database in Windows 8.1.I tried searching how to make this in Windows but I couldn't find this.I only got for Linux http://edgystuff.tumblr.com/post/49304254688/how-to-use-mongodb-as-a-pure-in-memory-db-redis ,So can anyone tell me how to make this or can you share link where it is written ?

Upvotes: 1

Views: 1822

Answers (1)

Matthew Wilson
Matthew Wilson

Reputation: 2065

RAMDISK

You could try setting up a ramdisk on windows, and then telling mongodb to use that location as the datastore.

You can configure this by setting the storage.dbPath in mongodb's configuration - http://docs.mongodb.org/manual/reference/configuration-options/

Here's a guide for setting up a ramdisk on windows - http://www.tekrevue.com/tip/create-10-gbs-ram-disk-windows/

And you can start mongodb and pass in the --dbpath to point to the ramdisk


'inMemoryExperiment' STORAGE ENGINE

Also as of MongoDB v3 there is an experimental in memory storage engine, you can try it out by passing in --storageEngine inMemoryExperiment to the mongod command when starting mongodb

Some info here - http://stela.io/mongodb-in-memory-storage-engine-setup/

Upvotes: 1

Related Questions