db.serverStatus()
其中有这个 "storageEngine" : { "name" : "wiredTiger", "supportsCommittedReads" : true, "readOnly" : false, "persistent" : true }, 查看WiredTiger内部缓存到底占用了多少内存的方式是,在mongo shell中之行以下命令 db.runcommand( { serverStatus: 1 } ).wiredTiger.cache["bytes currently in the cache"] 如果不想重启mongoDB,可以在线修改,如下 db.adminCommand({setParameter: 1, wiredTigerEngineRuntimeConfig: "cache_size=8G"})