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