MongoDB服务会消耗Windows计算机上的所有内存

时间:2019-01-22 19:41:18

标签: windows mongodb memory-management

我正在将Mongo DB 3.2与有线Tiger存储引擎一起使用。我正在插入每个文档具有20k键和值的数据。数据插入频率为1分钟。 我观察到,两个月后,当数据大小约为90GB时,mongod服务正在消耗所有可用内存,从而使系统无法使用。

我将wiredTigerCachesizeGB限制为1GB,这与下面的代码相关,但仍然是问题。

mongodb数据库的压缩大小为14GB。

db.stats()
{
        "db" : "analyse_db",
        "collections" : 12,
        "objects" : 704061,
        "avgObjSize" : 124359.58095676369,
        "dataSize" : 87556730928,
        "storageSize" : 15406141440,
        "numExtents" : 0,
        "indexes" : 12,
        "indexSize" : 12902400,
        "ok" : 1
}
> db.serverStatus().wiredTiger.cache
{
        "tracked dirty bytes in the cache" : 1761458,
        "tracked bytes belonging to internal pages in the cache" : 189227,
        "bytes currently in the cache" : 7321700,
        "tracked bytes belonging to leaf pages in the cache" : 7132473,
        "maximum bytes configured" : 1073741824,
        "tracked bytes belonging to overflow pages in the cache" : 0,
        "bytes read into cache" : 5791384,
        "bytes written from cache" : 43242,
        "pages evicted by application threads" : 0,
        "checkpoint blocked page eviction" : 0,
        "unmodified pages evicted" : 0,
        "page split during eviction deepened the tree" : 0,
        "modified pages evicted" : 0,
        "pages selected for eviction unable to be evicted" : 0,
        "pages evicted because they exceeded the in-memory maximum" : 0,
        "pages evicted because they had chains of deleted items" : 0,
        "failed eviction of pages that exceeded the in-memory maximum" : 0,
        "hazard pointer blocked page eviction" : 0,
        "internal pages evicted" : 0,
        "maximum page size at eviction" : 0,
        "eviction server candidate queue empty when topping up" : 0,
        "eviction server candidate queue not empty when topping up" : 0,
        "eviction server evicting pages" : 0,
        "eviction server populating queue, but not evicting pages" : 0,
        "eviction server unable to reach eviction goal" : 0,
        "internal pages split during eviction" : 0,
        "leaf pages split during eviction" : 0,
        "pages walked for eviction" : 0,
        "eviction worker thread evicting pages" : 0,
        "in-memory page splits" : 0,
        "in-memory page passed criteria to be split" : 0,
        "lookaside table insert calls" : 0,
        "lookaside table remove calls" : 0,
        "percentage overhead" : 8,
        "tracked dirty pages in the cache" : 15,
        "pages currently held in the cache" : 70,
        "pages read into cache" : 69,
        "pages read into cache requiring lookaside entries" : 0,
        "pages written from cache" : 3,
        "page written requiring lookaside records" : 0,
        "pages written requiring in-memory restoration" : 0
}

无论我从该链接https://dba.stackexchange.com/questions/148395/mongodb-using-too-much-memory中看到什么,都清楚地告诉我数据大小会影响RAM消耗。 是否有任何可调参数可以限制mongodb服务的RAM使用率,而与数据大小无关? 我们非常感谢您的帮助。

0 个答案:

没有答案