mongodb集群性能優化
在前面兩篇文章,我們介紹了如何去搭建mongodb集群,這篇文章我們將介紹如何去優化mongodb的各項配置,以達到最優的效果。
警告不做任何的優化,集群搭建完成之后,使用命令連接mongodb終端,一般會遇到以下的警告信息:
如何你是用的是我最新一版集群搭建的腳本,估計警告會少幾個,因為里面已經做了一些優化
2017-08-16T18:33:42.985+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2017-08-16T18:33:42.985+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2017-08-16T18:33:43.024+0800 I CONTROL [initandlisten] 2017-08-16T18:33:43.024+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2017-08-16T18:33:43.024+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. 2017-08-16T18:33:43.024+0800 I CONTROL [initandlisten] 2017-08-16T18:33:43.025+0800 I CONTROL [initandlisten] 2017-08-16T18:33:43.025+0800 I CONTROL [initandlisten] ** WARNING: You are running on a NUMA machine. 2017-08-16T18:33:43.025+0800 I CONTROL [initandlisten] ** We suggest launching mongod like this to avoid performance problems: 2017-08-16T18:33:43.025+0800 I CONTROL [initandlisten] ** numactl --interleave=all mongod [other options] 2017-08-16T18:33:43.026+0800 I CONTROL [initandlisten] 2017-08-16T18: