A newer version of this documentation is available.

View Latest

memory

    +
    Gets memory-related statistics.

    Syntax

    Request syntax:

    cbstats [host]:11210 memory

    Description

    This command provides various memory-related statistics including the ones from tcmalloc.

    tcmalloc stats are not available on operating systems (such as Windows) that do not support tcmalloc.
    Stat Description

    mem_used (deprecated)

    Engine’s total memory usage

    bytes

    Engine’s total memory usage

    ep_kv_size

    Memory used to store item metadata, keys and values, no matter the vbucket’s state. If an item’s value is ejected, this stat will be decremented by the size of the item’s value.

    ep_value_size

    Memory used to store values for resident keys.

    ep_overhead

    Extra memory used by transient data like persistence queue, replication queues, checkpoints, etc.

    ep_max_size

    Max amount of data allowed in memory

    ep_mem_low_wat

    Low water mark for auto-evictions

    ep_mem_high_wat

    High water mark for auto-evictions

    ep_oom_errors

    Number of times unrecoverable OOMs that happened while processing operations,

    ep_tmp_oom_errors

    Number of times temporary OOMs that happened while processing operations.

    ep_mem_tracker_enabled

    If smart memory tracking is enabled

    tcmalloc_allocated_bytes

    Engine’s total memory usage reported from tcmalloc.

    tcmalloc_heap_size

    Bytes of system memory reserved by tcmalloc.

    tcmalloc_free_bytes

    Number of bytes in free, mapped pages in page heap.

    tcmalloc_unmapped_bytes

    Number of bytes in free, unmapped pages in page heap. These are bytes that have been released back to OS.

    tcmalloc_max_thread_cache_bytes

    A limit to how much memory TCMalloc dedicates for small objects.

    tcmalloc_current_thread_cache_bytes

    A measure of some of the memory TCMalloc is using for small objects.

    total_allocated_bytes

    Engine’s total memory usage.

    total_fragmentation_bytes

    Number of fragmentation bytes.

    total_free_mapped_bytes

    Number of bytes in free, mapped pages.

    total_free_unmapped_bytes

    Number of bytes in free, unmapped pages.

    total_heap_bytes

    Number of of bytes in a heap.

    Options

    None

    Example

    Request

    cbstats 10.5.2.54:11210 memory

    Response

     bytes:                               23716184
     ep_blob_num:                         0
     ep_blob_overhead:                    0
     ep_item_num:                         1364
     ep_kv_size:                          0
     ep_max_size:                         524288000
     ep_mem_high_wat:                     445644800
     ep_mem_low_wat:                      393216000
     ep_mem_tracker_enabled:              true
     ep_oom_errors:                       0
     ep_overhead:                         18344996
     ep_storedval_num:                    0
     ep_storedval_overhead:               0
     ep_storedval_size:                   0
     ep_tmp_oom_errors:                   0
     ep_value_size:                       0
     mem_used:                            23716184
     tcmalloc_current_thread_cache_bytes: 18642072
     tcmalloc_max_thread_cache_bytes:     33554432
     total_allocated_bytes:               211297528
     total_fragmentation_bytes:           33069832
     total_free_mapped_bytes:             5283840
     total_free_unmapped_bytes:           7684096
     total_heap_bytes:                    257335296