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: 49464208, active: 52137984, mapped: 67108864
Current active ceiling: 54525952
chunks: nchunks   highchunks    curchunks
             18           17           16

Merged arenas stats:
assigned threads: 20
dss allocation precedence: N/A
dirty pages: 12729:0 active:dirty, 35 sweeps, 249 madvises, 8470 purged
            allocated      nmalloc      ndalloc    nrequests
small:       13992848       428517       345285      2825262
large:       35471360         6355         5217        15300
huge:               0            0            0            0
total:       49464208       434872       350502      2840562
active:      52137984
mapped:      62914560
bins:     bin  size regs pgs    allocated      nmalloc      ndalloc    nrequests       nfills     nflushes      newruns       reruns      curruns
            0     8  512   1         5440         6892         6212        17479           80          162            3           20            3
            1    16  256   1         9888         2621         2003        12127           36           83            6           25            5
            2    32  128   1      1125152       127560        92399       313121         6066         1143          708         1669          324
            3    48  256   3       398976       113219       104907       748500         5019         1265          228          918           76
            4    64   64   1       326208        16508        11411       592503          388          490          147          809           94
            5    80  256   5       512480        36261        29855        92551         1143          558           68          808           68
            6    96  128   3       655680        12885         6055       184348          274          308           64          720           61
            7   112  256   7       313488        56432        53633        60885         3976          694          191          240           18
            8   128   32   1       192000        25993        24493        36259         2717          843          802          182           51
            9   160  128   5        37920         4040         3803        11455          107          208            7          100            5
           10   192   64   3       430656         6608         4365        14040          169          283           57          417           51
           11   224  128   7       131264         3773         3187         6322           70          151            8           12            5
           12   256   16   1       529152         2179          112        10047          145           65          131           26          130
           13   320   64   5       381440         1742          550        13535           41           80           21           22           20
           14   384   32   3       728832         2110          212         6000           73           63           60           46           60
           15   448   64   7       163072          896          532         4456           17           65            9           25            7
           16   512    8   1      1846784         3886          279        13672          547           96          458           96          453
           17   640   32   5       374400          991          406       674248           41           79           26           13           20
           18   768   16   3       215040          386          106         3647           25           52           21           12           20
           19   896   32   7       215936          534          293         2424           21           69           13           13           11
           20  1024    4   1       134144          156           25         1827           41           47           37           11           35
           21  1280   16   5       231680          312          131         1837           32           69           14           20           13
           22  1536    8   3      1671168         1150           62         1795          149           54          139           15          138
           23  1792   16   7        66304          162          125          365           15           57            7            7            4
           24  2048    2   1        98304           70           22          528           51           44           30           12           25
           25  2560    8   5        48640           83           64          177           19           54            8            7            3
           26  3072    4   3      3148800         1042           17         1079          261           39          260            1          257
           27  3584    8   7            0           26           26           35            5           40            3            1            0
large:   size pages      nmalloc      ndalloc    nrequests      curruns
         4096     1           24           14           24           10
         8192     2           64           27          115           37
        12288     3           18           11         3602            7
        16384     4           57           31           59           26
        20480     5            4            0            4            4
[1]
        28672     7         1071           30         1071         1041
        32768     8           59           52         5367            7
        36864     9         1034         1034         1034            0
[1]
        45056    11            2            0            2            2
[4]
        65536    16           57           57           57            0
        69632    17            1            0            1            1
[7]
       102400    25            4            3            4            1
[6]
       131072    32            5            5            5            0
       135168    33         3933         3933         3933            0
[30]
       262144    64            4            4            4            0
[63]
       524288   128            4            4            4            0
[127]
      1048576   256            4            4            4            0
[173]
      1761280   430            4            4            4            0
[81]
      2097152   512            6            4            6            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