MongoDB 3.0 Configuration

Source: Internet
Author: User

MongoDB 3.0 is a revolutionary version, thanks to the new storage engine Wiredtiger, which greatly improves performance while improving data compression (300%).


Performance comparison See: https://comerford.cc/2015/02/04/mongodb-3-0-testing-compression/


Installation Documentation: https://docs.mongodb.org/manual/administration/install-on-linux/


If you just installed MongoDB and then started it, I'm sorry, it's still running slowly, the default storage engine is still old MMAPV1


Default configuration etc/mongo.conf, it is really bland, it is actually a yaml format of text, quickly replace it with the following configuration, you can immediately implement the Niaoqianghuanpao.


Systemlog:

Destination:file

Path:/var/log/mongodb/mongod.log

Logappend:true


Processmanagement:

Fork:true

Pidfilepath:/var/run/mongodb/mongod.pid


Net

bindip:127.0.0.1

port:27017


Storage

Journal

Enabled:true

DbPath:/var/lib/mongo

Directoryperdb:true

Syncperiodsecs:60

Engine:wiredtiger

Wiredtiger:

Engineconfig:

Cachesizegb:1

Directoryforindexes:false

Journalcompressor:snappy

Collectionconfig:

Blockcompressor:snappy

Indexconfig:

Prefixcompression:true



It is important to note that YAML-formatted files do not support tab tabs, so you should pay special attention to paragraph file alignment, or MongoDB will fail to start.



This article is from the "Focus on Linux Operations" blog, please be sure to keep this source http://purplegrape.blog.51cto.com/1330104/1675434

MongoDB 3.0 Configuration

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.