MongoDB's storage Engine

Source: Internet
Author: User

Objective

The storage engine is the primary component of MongoDB's management data store, and MongoDB supports a variety of storage engines, each of which fits into a specific scenario

Wiredtiger

Characteristics

1. version >= 3.2 default storage engine
2. Support for document-level concurrency
3. Implementing concurrency Control using MVCC (Multiversion Concurrency control)
4. Data can be recovered by snapshot
5. Priority write journal log to ensure data landing, stand-alone mode recommended to open Journal log
6. Support for collection and index data compression
7. Using the storage engine internal cache and file system cache

Applicable scenarios

Fits most scenes


MMAPv1

Characteristics

1. MongoDB first generation engine, based on file memory mapping (based on memory mapped files)
2. Systems that do not support Big-endian architectures
3. Recover data by writing journal log data frequently
4. Records are continuously stored on the hard disk
5. When updating, the content exceeds the allocated space, the record needs to move to the new location, the index rebuilds and produces the hard disk fragmentation, very time-consuming, try to avoid this situation
6. Record space allocation policy: 2 of the n-th side, applicable to the record may change the scene; original size, for scenarios that are not updated, such as logging
7. Use all system available cache, system control, can be recycled at any time, the higher the memory performance, the better

Applicable scenarios

High volume of reading and writing and some high volume updates


In-memory

Characteristics

1. Version >= 3.2.6 available, Enterprise Edition only support
2. The data used is stored in the cache and performs better than other storage engines
3. Support Document Lock
4. Need to allocate enough available memory
5. Persistent storage is not supported

Applicable scenarios

Small data volumes, temporary storage, data transfer scenarios


Resources

"1" MongoDB storage
https://docs.mongodb.com/manual/storage/

"2" Storage Engines
https://docs.mongodb.com/manual/core/storage-engines/

"3" Wiredtiger Storage Engine
https://docs.mongodb.com/manual/core/wiredtiger/

"4" MMAPv1 Storage Engine
https://docs.mongodb.com/manual/core/mmapv1/

"5" In-memory Storage Engine
https://docs.mongodb.com/manual/core/inmemory/

"6" Journaling
https://docs.mongodb.com/manual/core/journaling/

"7" Gridfs
https://docs.mongodb.com/manual/core/gridfs/

"8" Faq:mongodb Storage
https://docs.mongodb.com/manual/faq/storage/

MongoDB's storage Engine

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.