I am using mongodb replicatset with the following configuration
Version : v4.0.28
oplogSizeMB: 614400
storageEngine : wiredTiger
I have a problem when mongodb uses too much Memory. I check tcmalloc and see the parameters as below.
Looks like Bytes in page heap freelist is too much.
I want to ask about how to solve this problem?
kymongodb:SECONDARY> db.serverStatus().tcmalloc.tcmalloc.formattedString
------------------------------------------------
MALLOC: 98175938288 (93627.9 MiB) Bytes in use by application
MALLOC: + 136393015296 (130074.5 MiB) Bytes in page heap freelist
MALLOC: + 2417782424 ( 2305.8 MiB) Bytes in central cache freelist
MALLOC: + 293952 ( 0.3 MiB) Bytes in transfer cache freelist
MALLOC: + 39110200 ( 37.3 MiB) Bytes in thread cache freelists
MALLOC: + 992469248 ( 946.5 MiB) Bytes in malloc metadata
MALLOC: ------------
MALLOC: = 238018609408 (226992.2 MiB) Actual memory used (physical + swap)
MALLOC: + 52531675136 (50098.1 MiB) Bytes released to OS (aka unmapped)
MALLOC: ------------
MALLOC: = 290550284544 (277090.3 MiB) Virtual address space used
MALLOC:
MALLOC: 3141932 Spans in use
MALLOC: 102 Thread heaps in use
MALLOC: 4096 Tcmalloc page size
------------------------------------------------