上次我们分享到了 wiredTiger 引擎以及他对于以前默认的 MMAPV1 引擎的优势
关于 wiredTiger 引擎 配置这里补充一下:
storage:
journal:
enabled: true
dbPath: /data/xiaomotong/mongo1/
directoryPerDB: true
engine: wiredTiger
wiredTiger:
engineConfig:
cacheSizeGB: 1
directoryForIndexes: true
journalCompressor:none (默认snappy)
collectionConfig:
blockCompressor: zlib
indexConfig:
prefixCompression: true
-
directoryPerDB
是否一个库一个文件夹
-
engine
数据引擎指定是什么
-
cacheSizeG
wiredTiger 引擎最大使用 cache 的大小,此处配置 1 个 G , 我们可以根据实际情况来配置
-
directoryForIndexes
是否将索引也按数