How to know which storage engine is used in MongoDB?

To know which storage engine is used in MongoDB, you can use the db.serverStatus().storageEngine command. This returns basic information about the current storage engine including its name and capabilities.

Syntax

db.serverStatus().storageEngine;

For detailed configuration statistics of the storage engine ?

db.serverStatus().storageEngineName;

Example 1: Check Storage Engine

db.serverStatus().storageEngine;
{
   "name" : "wiredTiger",
   "supportsCommittedReads" : true,
   "supportsSnapshotReadConcern" : true,
   "readOnly" : false,
   "persistent" : true
}

This output shows that WiredTiger is the active storage engine, which is MongoDB's default storage engine since version 3.2.

Example 2: Get Detailed WiredTiger Statistics

To view comprehensive statistics about the WiredTiger storage engine ?

db.serverStatus().wiredTiger;
{
   "uri" : "statistics:",
   "cache" : {
      "bytes currently in the cache" : 814060,
      "maximum bytes configured" : 4803526656,
      "pages currently held in the cache" : 349,
      "pages read into cache" : 324
   },
   "connection" : {
      "files currently open" : 170,
      "total fsync I/Os" : 760,
      "total read I/Os" : 2257,
      "total write I/Os" : 875
   },
   "transaction" : {
      "transaction begins" : 309,
      "transactions committed" : 40,
      "transactions rolled back" : 269
   }
   // ... additional statistics
}

Key Points

  • WiredTiger is MongoDB's default storage engine providing high performance and compression.
  • The storageEngine command shows basic engine information and capabilities.
  • Detailed statistics include cache usage, I/O operations, and transaction metrics.

Conclusion

Use db.serverStatus().storageEngine to quickly identify your MongoDB storage engine. For performance monitoring, access detailed statistics through db.serverStatus().wiredTiger to analyze cache, I/O, and transaction metrics.

Updated on: 2026-03-15T00:17:24+05:30

349 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements