MongoDB’s storage engine released in version 3.0 and is now the default engine as of MongoDB version 3.2.
MongoDB’s original storage engine that has since been deprecated in MongoDB 4.0.
WiredTiger Data compression: Having its own write-cache and a filesystem cache, as well as supporting snappy and Zlib compression, WiredTiger takes up much less space than MMAPv1
MMAPv1 Data compression: Data compression is not supported so MMAPv1 is based on memory-mapped files. Consequentially, MMAPv1 succeeds at high volume actions.
WiredTiger Journaling: Using checkpoints is at the core, while all journal writes maintain data changes between checkpoints. To recover from crashes, the journal entries from the last checkpoint are used.
MMAPv1 Journaling: In the event of a crash, MongoDB with MMAPV1 will access the journal files to apply a consistent state.
WiredTiger Locks and Concurrency: Employs document-level locking where intent locks are only used at the global, database, and collection layers.
MMAPV1 3.0 Locks and Concurrency: Uses collection-level locking.
MMAPV1 2.6: Allows concurrent reads to the database but single writes get exclusive access.
WiredTiger Memory: MongoDB with WiredTiger deploys a filesystem cache and an internal cache. All free memory is used by MongoDB. WiredTiger will use either 50% of RAM or 256 MB depending on which is larger.
MMAPv1 Memory: MongoDB with MMAPv1 will access as much available memory. However, MongoDB will yield cached memory when another process requires at least half of the server’s RAM.
Feature | WiredTiger | MMAPv1 |
Updates | Documents are forced to rewrite. In-place updates not supported. | High volume & in-place updates. |
CPU Performance | multi-core system performance | more CPU cores != better performance |
Transaction | Multi-document transactions | Atomic operations on a single document |
Encryption | Encryption at rest | Not possible |
Memory | Internal & filesystem cache | Uses all free memory as cache |
Tuning | More variables available for tuning | Less opportunities to tune |
Locks & Concurrency | Document-level locking | Collection level locking |
Journaling | Checkpoints used & journals used between checkpoints | Uses journal files for a consistent state |
Data Compression | Snappy & Zlib compression | Not supported |