提问者:小点点

内存消耗高于wiredtigercachesizeg中设置的值


你好,专家们

我有一个mongodb服务器在我的2GB ec2实例上运行,使用以下命令

mongod-WiredTigerCacheSizeGb=0.5

下面是我的内存使用情况:

------------------------------------------------
MALLOC:      509658616 (  486.0 MiB) Bytes in use by application
MALLOC: +    100265984 (   95.6 MiB) Bytes in page heap freelist
MALLOC: +     10784344 (   10.3 MiB) Bytes in central cache freelist
MALLOC: +      8235328 (    7.9 MiB) Bytes in transfer cache freelist
MALLOC: +      3289712 (    3.1 MiB) Bytes in thread cache freelists
MALLOC: +      4063232 (    3.9 MiB) Bytes in malloc metadata
MALLOC:   ------------
MALLOC: =    636297216 (  606.8 MiB) Actual memory used (physical + swap)
MALLOC: +       385024 (    0.4 MiB) Bytes released to OS (aka unmapped)
MALLOC:   ------------
MALLOC: =    636682240 (  607.2 MiB) Virtual address space used
MALLOC:
MALLOC:          23555              Spans in use
MALLOC:             26              Thread heaps in use
MALLOC:           4096              Tcmalloc page size
------------------------------------------------

根据我的理解,使用的虚拟地址空间是MongoDB占用的总内存。如果有人能告诉我为什么它会超过0.5(500MB)的限制

----------------More  Info--------------------
{
    "name" : "wiredTiger",
    "supportsCommittedReads" : true,
    "oldestRequiredTimestampForCrashRecovery" : Timestamp(0, 0),
    "supportsPendingDrops" : true,
    "dropPendingIdents" : NumberLong(0),
    "supportsSnapshotReadConcern" : true,
    "readOnly" : false,
    "persistent" : true,
    "backupCursorOpen" : false
}

{
    "db" : "Database",
    "collections" : 43,
    "views" : 0,
    "objects" : 2780441,
    "avgObjSize" : 2756.87204116182,
    "dataSize" : 7665320055.0,
    "storageSize" : 2320449536.0,
    "numExtents" : 0,
    "indexes" : 58,
    "indexSize" : 156573696.0,
    "scaleFactor" : 1.0,
    "fsUsedSize" : 77780537344.0,
    "fsTotalSize" : 214746263552.0,
    "ok" : 1.0
}

内存消耗高于wiredtigercachesizeg中的设置值


共1个答案

匿名用户

Wired tiger是MongoDB的一个组件。还有很多其他的组件。预计整个服务器的内存使用量将大于对服务器的一个组件的一个方面施加的限制。