mongodb指定引擎并设置内存使用大小

storage:
  dbPath: /www/server/mongodb/data
  directoryPerDB: true
  engine: wiredTiger
  wiredTiger:
    engineConfig:
      cacheSizeGB: 4

WiredTiger 存储引擎:默认的存储引擎为 WiredTiger 存储引擎,非常适合大多数工作负载,建议用于新部署。WiredTiger 提供文档级并发模型、检查点和数据压缩等功能。
In-Memory 存储引擎:In-Memory 存储引擎在 MongoDB Enterprise 中可用。它不是将文档存储在磁盘上,而是将它们保留在内存中以获得更可预测的数据延迟。

虽然默认引擎就是wiredTiger 但是非常有必要知道应该怎么设置引擎

猜你喜欢

转载自blog.csdn.net/hangbobo/article/details/143396930