WiredTiger vs MMAPV1 | MongoDB Engines

by Nate Coppinger on March 6, 2020

WiredTiger Storage Engine:

MongoDB’s storage engine released in version 3.0 and is now the default engine as of MongoDB version 3.2.

MMAPv1 Storage Engine:

MongoDB’s original storage engine that has since been deprecated in MongoDB 4.0.

WiredTiger vs MMAPv1 Data compression

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 vs MMAPv1 Journaling compression

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 vs MMAPV1 Locks and Concurrency

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 vs MMAPV1 Memory

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.

WiredTiger vs MMAPv1 Comparison Table

FeatureWiredTigerMMAPv1
UpdatesDocuments are forced to rewrite. In-place updates not supported.High volume & in-place updates.
CPU Performancemulti-core system performancemore CPU cores != better performance
TransactionMulti-document transactionsAtomic operations on a single document
EncryptionEncryption at restNot possible
MemoryInternal & filesystem cacheUses all free memory as cache
TuningMore variables available for tuningLess opportunities to tune
Locks & ConcurrencyDocument-level lockingCollection level locking
JournalingCheckpoints used & journals used between checkpointsUses journal files for a consistent state
Data CompressionSnappy & Zlib compressionNot supported

Get started

Try BindPlane for free. No credit card required.

Sign up
True Visibility
BindPlane for VMware vRealize Operations

True Visibility allows cloud management teams to use VMware vRealize’s powerful machine learning and capacity planning engine across their entire hybrid cloud environment.

Azure Monitor...everything
BindPlane for Microsoft Azure Monitor

Make Azure Monitor your first-pane-of-glass across your entire multi-cloud, multi-database or hybrid platform environment.

Thank you for contacting us. Your information was received. We'll be in touch shortly.