1.默认的分配策略
Starting in 3.4, the WiredTiger internal cache, by default, will use the larger of either: 50% of RAM minus 1 GB, or 256 MB.
即(总内存×50%-1GB)和(256MB)两者中的较大值。
2.配置内存
storage: dbPath: /var/lib/mongodb journal: enabled: true # engine: mmapv1: smallFiles: true wiredTiger: engineConfig: configString : cache_size=160M
3.查看mongodb对内存的使用:
> db.serverStatus().mem { "bits" : 64, "resident" : 7316, "virtual" : 9530, "supported" : true }
标签:cache,mongodb,50%,内存,使用,true From: https://www.cnblogs.com/abclife/p/17098052.html