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: 4.0.4-0-g91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180
Assertions disabled
Run-time option settings:
  opt.abort: false
  opt.lg_chunk: 21
  opt.dss: "secondary"
  opt.narenas: 1
  opt.lg_dirty_mult: 3 (arenas.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: 2097152 (2^21)
Allocated: 133274368, active: 136114176, metadata: 4850792, resident: 140333056, mapped: 148897792
Current active ceiling: 136314880

Merged arenas stats:
assigned threads: 23
dss allocation precedence: N/A
min active:dirty page ratio: N/A
dirty pages: 33231:11 active:dirty, 27 sweeps, 241 madvises, 7866 purged
                            allocated      nmalloc      ndalloc    nrequests
small:                       48057088       443230       313384      4111736
large:                       60051456        11080         8979        18963
huge:                        25165824            7            4            7
total:                      133274368       454317       322367      4130706
active:                     136114176
mapped:                     146800640
metadata: mapped: 3088384, allocated: 678056
bins:           size ind    allocated      nmalloc      ndalloc    nrequests      curregs      curruns regs pgs  util       nfills     nflushes      newruns       reruns
                   8   0         8864         8145         7037        28589         1108            3  512   1 0.721          232          244            6           60
                  16   1        24976        24176        22615        68591         1561           10  256   1 0.609          495          395           11          424
                  32   2      1298848        96543        55954       422453        40589          373  128   1 0.850         4552          951          612         1418
                  48   3       861600       104327        86377      1376835        17950          109  256   3 0.643         5277         1116          261         1771
                  64   4       745792        46538        34885       704283        11653          220   64   1 0.827         2867          812          591         1419
                  80   5      1096240        51554        37851       150010        13703          100  256   5 0.535         2446          602          103         1727
                  96   6      1321632        23152         9385       175064        13767          127  128   3 0.846         1041          420          132          838
                 112   7       289408        17434        14850       115357         2584           12  256   7 0.841         1338          354           60           69
                 128   8        55552         8812         8378       114201          434           16   32   1 0.847         1069          503          243          143
                 160   9        98880        24071        23453        30598          618           10  128   5 0.482         2377          437          159           74
                 192  10       252864         3481         2164        11180         1317           21   64   3 0.979          108          196           31          311
                 224  11       111104         3110         2614        82212          496            5  128   7 0.775          116          166            6           20
                 256  12      1057024         6546         2417        14862         4129          305   16   1 0.846          680          323          334          353
                 320  13       450880         2301          892        18966         1409           24   64   5 0.917           66           98           26           35
                 384  14      1115136         3139          235         7310         2904           91   32   3 0.997          112           70           92           46
                 448  15       194880          960          525         4663          435            8   64   7 0.849           18           59            9           16
                 512  16      3626496         7870          787       114975         7083          891    8   1 0.993          957          231          895          528
                 640  17       388480         1314          707       636959          607           20   32   5 0.948           77          121           29           42
                 768  18       240384          488          175         2666          313           21   16   3 0.931           39           61           22           30
                 896  19       206080          604          374         2171          230            9   32   7 0.798           24           70           14           23
                1024  20       143360          498          358         1474          140           38    4   1 0.921          121          160           78          166
                1280  21      2862080         2399          163         3357         2236          141   16   5 0.991          168           72          144           30
                1536  22       241152          246           89          436          157           22    8   3 0.892           33           58           23           27
                1792  23        51968          152          123          135           29            3   16   7 0.604           17           55            6           13
                2048  24      4337664         2456          338         8594         2118         1060    2   1 0.999          310          142         1167          125
                2560  25        38400           82           67           28           15            3    8   5 0.625           14           48            7            6
                3072  26         9216           42           39            7            3            2    4   3 0.375            5           34           10            3
                3584  27            0           30           30            4            0            0    8   7 1                3           31            6            0
                4096  28        49152           72           60          173           12           12    1   1 1               15           46           72            0
                5120  29        35840           42           35            9            7            2    4   5 0.875            4           33           11            2
                6144  30       104448           31           14           19           17            9    2   3 0.944            3           31           16            2
                7168  31            0           10           10            1            0            0    4   7 1                1           31            3            0
                8192  32       999424          204           82          179          122          122    1   2 1               29           53          204            0
               10240  33       327680          299          267        13321           32           17    2   5 0.941          110           97          104          107
               12288  34     25411584         2102           34         2054         2068         2068    1   3 1              211           39         2102            0
                     ---
large:          size ind    allocated      nmalloc      ndalloc    nrequests      curruns
               16384  36       229376           29           15          109           14
               20480  37       163840            8            0            8            8
                     ---
               28672  39     59379712         2100           29         2100         2071
               32768  40       196608           49           43         7852            6
               40960  41        81920         2069         2067         2069            2
                     ---
               65536  44            0           51           51           51            0
                     ---
              131072  48            0            3            3            3            0
              163840  49            0         6768         6768         6768            0
                     ---
              262144  52            0            1            1            1            0
                     ---
              524288  56            0            1            1            1            0
                     ---
             1048576  60            0            1            1            1            0
                     ---
huge:           size ind    allocated      nmalloc      ndalloc    nrequests   curhchunks
             2097152  64      4194304            3            1            3            2
                     ---
             4194304  68            0            1            1            1            0
             5242880  69            0            1            1            1            0
                     ---
             8388608  72            0            1            1            1            0
                     ---
            20971520  77     20971520            1            0            1            1
                     ---
--- 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