【发布时间】:2020-11-19 16:03:45
【问题描述】:
已经查了很多关于这个话题的问题,我认为这是wiredTiger上的一个错误配置,我相信实际上根本没有使用它。
这是主节点上的内存详细信息:
------------------------------------------------
MALLOC: 9216501736 ( 8789.5 MiB) Bytes in use by application
MALLOC: + 295092224 ( 281.4 MiB) Bytes in page heap freelist
MALLOC: + 1027054880 ( 979.5 MiB) Bytes in central cache freelist
MALLOC: + 251104 ( 0.2 MiB) Bytes in transfer cache freelist
MALLOC: + 214021656 ( 204.1 MiB) Bytes in thread cache freelists
MALLOC: + 92561664 ( 88.3 MiB) Bytes in malloc metadata
MALLOC: ------------
MALLOC: = 10845483264 (10343.1 MiB) Actual memory used (physical + swap)
MALLOC: + 7447629824 ( 7102.6 MiB) Bytes released to OS (aka unmapped)
MALLOC: ------------
MALLOC: = 18293113088 (17445.7 MiB) Virtual address space used
MALLOC:
MALLOC: 1038376 Spans in use
MALLOC: 493 Thread heaps in use
MALLOC: 4096 Tcmalloc page size
------------------------------------------------
Call ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).
Bytes released to the OS take up virtual address space but no physical memory.
这是其中一个辅助节点的内存详细信息:
------------------------------------------------
MALLOC: 9324505232 ( 8892.5 MiB) Bytes in use by application
MALLOC: + 565633024 ( 539.4 MiB) Bytes in page heap freelist
MALLOC: + 333445776 ( 318.0 MiB) Bytes in central cache freelist
MALLOC: + 7680 ( 0.0 MiB) Bytes in transfer cache freelist
MALLOC: + 641961696 ( 612.2 MiB) Bytes in thread cache freelists
MALLOC: + 64053504 ( 61.1 MiB) Bytes in malloc metadata
MALLOC: ------------
MALLOC: = 10929606912 (10423.3 MiB) Actual memory used (physical + swap)
MALLOC: + 59404288 ( 56.7 MiB) Bytes released to OS (aka unmapped)
MALLOC: ------------
MALLOC: = 10989011200 (10479.9 MiB) Virtual address space used
MALLOC:
MALLOC: 809348 Spans in use
MALLOC: 773 Thread heaps in use
MALLOC: 4096 Tcmalloc page size
------------------------------------------------
Call ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).
Bytes released to the OS take up virtual address space but no physical memory.
如果我错了请纠正我,但似乎缓存中有7GB的内存,可以清理,对吗?
当前使用的mongodb服务器版本是4.0.6。
这是 mongod.conf 上与存储相关的部分:
storage:
dbPath: /var/lib/mongodb
wiredTiger 使用的最大 GB 没有配置,所以我相信它会使用 50%(RAM - 1 GB),对吧?机器的 RAM 为 16GB。所以这将是 7.5GB 的缓存,可能太多了,我不知道,对这个问题有什么见解吗?
每隔几天就需要重新启动节点,如果能找到解决此问题的方法会很棒。
谢谢。
【问题讨论】:
-
我看不出你的问题中有什么表明需要重新启动任何东西。
标签: mongodb memory memory-leaks wiredtiger