Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know which storage engine is used in mongodb?

Starting from version 3.0, mongodb support pluggable storage engine. How to know which storage engine is being used in a system?

like image 616
Mayank Patel Avatar asked Mar 20 '15 09:03

Mayank Patel


People also ask

Which storage engine is used in MongoDB?

WiredTiger is the default storage engine starting in MongoDB 3.2. It is well-suited for most workloads and is recommended for new deployments. WiredTiger provides a document-level concurrency model, checkpointing, and compression, among other features. In MongoDB Enterprise, WiredTiger also supports Encryption at Rest.

What is WiredTiger storage engine?

WiredTiger uses document-level concurrency control for write operations. As a result, multiple clients can modify different documents of a collection at the same time. For most read and write operations, WiredTiger uses optimistic concurrency control.

Which storage engine supports only collection level locking in MongoDB?

Explanation: MongoDB includes support for two storage engines: MMAPv1, the storage engine available in previous versions of MongoDB, and WiredTiger. 2. Point out the correct statement. Explanation: MMAPv1 provides collection-level locking.


1 Answers

Easiest way to find the storage engine being used currently in from mongo console.

Inside mongo console, type (You might need admin access to run this command)

db.serverStatus().storageEngine 

If It returns,

{ "name" : "wiredTiger" } 

WireTiger Storage engine is being used.

Once it is confirmed that wiredTiger is being used then type

db.serverStatus().wiredTiger 

to get all the configuration details of wiredTiger.

like image 176
Mayank Patel Avatar answered Sep 30 '22 04:09

Mayank Patel