MongoDB: WiredTiger or MMAPv1?

mihalis's picture

Although it is easy to find out whether you are using WiredTiger or MMAPv1 by the filenames in the data directory, there is a better way to discover the Storage Engine your MongoDB database is using.
The next command returns the Storage Engine a MongoDB server is using:

> db.serverStatus().storageEngine
{ "name" : "mmapv1", "supportsCommittedReads" : false }

If you are using WiredTiger, the output would have been similar to the following:

> db.serverStatus().storageEngine
{ "name" : "wiredTiger", "supportsCommittedReads" : true }
> db.serverStatus()

If you are using WiredTiger, the following command will give you even more information:

> db.serverStatus().wiredTiger