A newer version of this documentation is available.

View Latest

allocator

Provides information on memory management.

Syntax

Request syntax:

cbstats [host]:11210 allocator

Description

This command is used to collect information on memory management.

Options

None

Examples

Example request:

cbstats 10.5.2.54:11210 allocator

Response (Linux, Mac OS X):

___ Begin jemalloc statistics ___
Version: 3.6.0-133-g5d9732f2cf03e8f1639e20eb327100480b3f96dc
Assertions disabled
Run-time option settings:
  opt.abort: false
  opt.lg_chunk: 22
  opt.dss: "secondary"
  opt.narenas: 1
  opt.lg_dirty_mult: 3
  opt.stats_print: false
  opt.junk: false
  opt.quarantine: 0
  opt.redzone: false
  opt.zero: false
  opt.tcache: true
  opt.lg_tcache_max: 15
CPUs: 1
Arenas: 1
Pointer size: 8
Quantum size: 16
Page size: 4096
Min active:dirty page ratio per arena: 8:1
Maximum thread-cached size class: 32768
Chunk size: 4194304 (2^22)
Allocated: 88575408, active: 91492352, mapped: 100663296
Current active ceiling: 92274688
chunks: nchunks   highchunks    curchunks
             24           24           24

Merged arenas stats:
assigned threads: 22
dss allocation precedence: N/A
dirty pages: 22337:0 active:dirty, 12 sweeps, 58 madvises, 256 purged
            allocated      nmalloc      ndalloc    nrequests
small:       22769072       253860       113977      3007127
large:       65806336        10460         8231        23352
huge:               0            0            0            0
total:       88575408       264320       122208      3030479
active:      91492352
mapped:      96468992
bins:     bin  size regs pgs    allocated      nmalloc      ndalloc    nrequests       nfills     nflushes      newruns       reruns      curruns
            0     8  512   1         6272         4932         4148        26475           80          111            3           20            3
            1    16  256   1        12848         2485         1682        32210           58           77            7           20            4
            2    32  128   1      2153472        89831        22535       238581         1072          448          601         1682          587
            3    48  256   3       683232        38951        24717      1211220          621          425          105          837           98
            4    64   64   1       518720        20070        11965       548921          372          530          215          946          174
            5    80  256   5       863840        39444        28646       104597         1423          525           87         1028           86
            6    96  128   3      1069344        17587         6448       164558          423          304          106          583          104
            7   112  256   7       287392         5651         3085        12320          226          201           13           59           11
            8   128   32   1       312704         2703          260        16912          118           72           80           56           77
            9   160  128   5        62400         2873         2483        12622          245          192            7           30            7
           10   192   64   3       250944         2569         1262        10779           98          135           26          113           23
           11   224  128   7       567616         5965         3431        11739          130          283           30           92           29
           12   256   16   1       530432         2201          129        10945          159           54          133           32          130
           13   320   64   5       408960         1885          607        15375           50           68           23           46           21
           14   384   32   3       735744         2163          247         5814           87           51           62           29           61
           15   448   64   7       203392          951          497         4618           30           55           11           20            8
           16   512    8   1      3054080         6328          363        29682          919          154          751          261          747
           17   640   32   5       395520         1145          527       531287           50           67           27           23           21
           18   768   16   3       228864          402          104         3358           36           36           20           16           20
           19   896   32   7       236544          568          304         2305           35           56           12           28           11
           20  1024    4   1       144384          181           40         1750           66           38           37           20           37
           21  1280   16   5       245760          352          160         1792           41           51           18           15           15
           22  1536    8   3      3245568         2178           65         2820          280           36          268           21          265
           23  1792   16   7        75264          182          140          391           21           43            7           15            5
           24  2048    2   1       120832           83           24         3747           53           30           36           11           30
           25  2560    8   5        53760           82           61          177           18           37            7            7            5
           26  3072    4   3      6297600         2071           21         2087          519           24          518            2          513
           27  3584    8   7         3584           27           26           45            6           24            3            1            1
large:   size pages      nmalloc      ndalloc    nrequests      curruns
         4096     1           48           34           52           14
         8192     2          112           44          153           68
        12288     3           24           15         6058            9
        16384     4          105           61          155           44
        20480     5            8            0            8            8
[1]
        28672     7         2080           13         2080         2067
        32768     8           60           49         6823           11
        36864     9         2066         2066         2066            0
[1]
        45056    11            3            0            3            3
[4]
        65536    16           16           16           16            0
        69632    17            2            0            2            2
[7]
       102400    25            4            3            4            1
[6]
       131072    32            2            2            2            0
       135168    33         5928         5928         5928            0
[478]
      2097152   512            2            0            2            2
[484]
--- End jemalloc statistics ---

Response (Windows):

------------------------------------------------
MALLOC:      211296632 (  201.5 MiB) Bytes in use by application
MALLOC: +     11730944 (   11.2 MiB) Bytes in page heap freelist
MALLOC: +     10833696 (   10.3 MiB) Bytes in central cache freelist
MALLOC: +      3404400 (    3.2 MiB) Bytes in transfer cache freelist
MALLOC: +     18832632 (   18.0 MiB) Bytes in thread cache freelists
MALLOC: +      1781920 (    1.7 MiB) Bytes in malloc metadata
MALLOC:   ------------
MALLOC: =    257880224 (  245.9 MiB) Actual memory used (physical + swap)
MALLOC: +      1236992 (    1.2 MiB) Bytes released to OS (aka unmapped)
MALLOC:   ------------
MALLOC: =    259117216 (  247.1 MiB) Virtual address space used
MALLOC:
MALLOC:           8855              Spans in use
MALLOC:             16              Thread heaps in use
MALLOC:           8192              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.
------------------------------------------------
Total size of freelists for per-thread caches,
transfer cache, and central cache, by size class
------------------------------------------------
class   1 [        8 bytes ] :     7825 objs;   0.1 MiB;   0.1 cum MiB
class   2 [       16 bytes ] :     1149 objs;   0.0 MiB;   0.1 cum MiB
class   3 [       32 bytes ] :    47076 objs;   1.4 MiB;   1.5 cum MiB
class   4 [       48 bytes ] :    51137 objs;   2.3 MiB;   3.9 cum MiB
class   5 [       64 bytes ] :     3987 objs;   0.2 MiB;   4.1 cum MiB
class   6 [       80 bytes ] :     5528 objs;   0.4 MiB;   4.5 cum MiB
class   7 [       96 bytes ] :    18530 objs;   1.7 MiB;   6.2 cum MiB
class   8 [      112 bytes ] :    39207 objs;   4.2 MiB;  10.4 cum MiB
class   9 [      128 bytes ] :    25812 objs;   3.2 MiB;  13.6 cum MiB
class  10 [      144 bytes ] :      399 objs;   0.1 MiB;  13.6 cum MiB
class  11 [      160 bytes ] :      321 objs;   0.0 MiB;  13.7 cum MiB
class  12 [      176 bytes ] :      201 objs;   0.0 MiB;  13.7 cum MiB
class  13 [      192 bytes ] :      162 objs;   0.0 MiB;  13.7 cum MiB
class  14 [      208 bytes ] :       70 objs;   0.0 MiB;  13.7 cum MiB
class  15 [      224 bytes ] :       77 objs;   0.0 MiB;  13.8 cum MiB
class  16 [      240 bytes ] :       72 objs;   0.0 MiB;  13.8 cum MiB
class  17 [      256 bytes ] :       81 objs;   0.0 MiB;  13.8 cum MiB
class  18 [      288 bytes ] :       38 objs;   0.0 MiB;  13.8 cum MiB
class  19 [      320 bytes ] :       52 objs;   0.0 MiB;  13.8 cum MiB
class  20 [      352 bytes ] :      112 objs;   0.0 MiB;  13.9 cum MiB
class  21 [      384 bytes ] :       44 objs;   0.0 MiB;  13.9 cum MiB
class  22 [      416 bytes ] :       18 objs;   0.0 MiB;  13.9 cum MiB
class  23 [      448 bytes ] :       60 objs;   0.0 MiB;  13.9 cum MiB
class  24 [      480 bytes ] :       77 objs;   0.0 MiB;  13.9 cum MiB
class  25 [      512 bytes ] :     2726 objs;   1.3 MiB;  15.3 cum MiB
class  26 [      576 bytes ] :      114 objs;   0.1 MiB;  15.3 cum MiB
class  27 [      640 bytes ] :       84 objs;   0.1 MiB;  15.4 cum MiB
class  28 [      704 bytes ] :       99 objs;   0.1 MiB;  15.4 cum MiB
class  29 [      768 bytes ] :      125 objs;   0.1 MiB;  15.5 cum MiB
class  30 [      832 bytes ] :      124 objs;   0.1 MiB;  15.6 cum MiB
class  31 [      896 bytes ] :       43 objs;   0.0 MiB;  15.7 cum MiB
class  32 [      960 bytes ] :       24 objs;   0.0 MiB;  15.7 cum MiB
class  33 [     1024 bytes ] :       45 objs;   0.0 MiB;  15.7 cum MiB
class  34 [     1152 bytes ] :       29 objs;   0.0 MiB;  15.8 cum MiB
class  35 [     1280 bytes ] :       42 objs;   0.1 MiB;  15.8 cum MiB
class  36 [     1408 bytes ] :       29 objs;   0.0 MiB;  15.9 cum MiB
class  37 [     1536 bytes ] :       30 objs;   0.0 MiB;  15.9 cum MiB
class  38 [     1792 bytes ] :      213 objs;   0.4 MiB;  16.3 cum MiB
class  39 [     2048 bytes ] :      523 objs;   1.0 MiB;  17.3 cum MiB
class  40 [     2304 bytes ] :       14 objs;   0.0 MiB;  17.3 cum MiB
class  41 [     2560 bytes ] :        7 objs;   0.0 MiB;  17.3 cum MiB
class  45 [     4096 bytes ] :       31 objs;   0.1 MiB;  17.5 cum MiB
class  46 [     4608 bytes ] :        5 objs;   0.0 MiB;  17.5 cum MiB
class  47 [     5120 bytes ] :        1 objs;   0.0 MiB;  17.5 cum MiB
class  49 [     6656 bytes ] :        4 objs;   0.0 MiB;  17.5 cum MiB
class  50 [     8192 bytes ] :       36 objs;   0.3 MiB;  17.8 cum MiB
class  51 [     9216 bytes ] :       38 objs;   0.3 MiB;  18.1 cum MiB
class  55 [    16384 bytes ] :       11 objs;   0.2 MiB;  18.3 cum MiB
class  56 [    20480 bytes ] :        4 objs;   0.1 MiB;  18.4 cum MiB
class  58 [    26624 bytes ] :        2 objs;   0.1 MiB;  18.4 cum MiB
class  59 [    32768 bytes ] :        9 objs;   0.3 MiB;  18.7 cum MiB
class  60 [    40960 bytes ] :        4 objs;   0.2 MiB;  18.9 cum MiB
class  63 [    65536 bytes ] :        9 objs;   0.6 MiB;  19.4 cum MiB
class  71 [   131072 bytes ] :        9 objs;   1.1 MiB;  20.6 cum MiB
class  72 [   139264 bytes ] :        4 objs;   0.5 MiB;  21.1 cum MiB
class  87 [   262144 bytes ] :        9 objs;   2.2 MiB;  23.3 cum MiB
------------------------------------------------
PageHeap: 3 sizes;   11.2 MiB free;    1.2 MiB unmapped
------------------------------------------------
     1 pages *     84 spans ~    0.7 MiB;    0.7 MiB cum; unmapped:    0.7 MiB;    0.7 MiB cum
    14 pages *      1 spans ~    0.1 MiB;    0.8 MiB cum; unmapped:    0.1 MiB;    0.8 MiB cum
    53 pages *      1 spans ~    0.4 MiB;    1.2 MiB cum; unmapped:    0.4 MiB;    1.2 MiB cum
>255   large *      1 spans ~   11.2 MiB;   12.4 MiB cum; unmapped:    0.0 MiB;    1.2 MiB cum