Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-2488

cbstats allocator documentation wrong since switch to jemalloc

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1, spock, 4.5, 4.0.x, 4.6
    • vulcan
    • cli

    Description

      The memory allocator was switched from tcmalloc to jemalloc for Linux/Mac in 4.0, and for Windows in 4.6.

      The cbstats allocator documentation needs updating accordingly, as it currently still show tcmalloc information for all platforms/versions.

      Sample output from 4.6.1:

      $ /opt/couchbase/bin/cbstats localhost:11210 allocator -b beer-sample
      ___ Begin jemalloc statistics ___
      Version: 4.1.1-3-g6ddfb081019d2c0b8da89f385a565067756d2b2d
      Assertions disabled
      config.malloc_conf: ""
      Run-time option settings:
        opt.abort: false
        opt.lg_chunk: 21
        opt.dss: "secondary"
        opt.narenas: 1
        opt.purge: "ratio"
        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: 122005840, active: 124227584, metadata: 4277296, resident: 127926272, mapped: 134217728
      Current active ceiling: 125829120
       
      Merged arenas stats:
      assigned threads: 22
      dss allocation precedence: N/A
      min active:dirty page ratio: N/A
      purging: dirty: 16, sweeps: 42, madvises: 212, purged: 5871
                                  allocated      nmalloc      ndalloc    nrequests
      small:                       36800848       442780       300573      4865005
      large:                       60039168         9760         7660        19878
      huge:                        25165824            7            4            7
      total:                      122005840       452547       308237      4884890
      active:                     124227584
      mapped:                     132120576
      metadata: mapped: 2506752, allocated: 647472
      bins:           size ind    allocated      nmalloc      ndalloc    nrequests      curregs      curruns regs pgs  util       nfills     nflushes      newruns       reruns
                         8   0         9280         9314         8154       133231         1160            4  512   1 0.566          325          360            4           20
                        16   1        26336         7455         5809        76025         1646            8  256   1 0.803          266          326           10           53
                        32   2      1250656       101103        62020       384962        39083          355  128   1 0.860         8934         1032          553         1219
                        48   3       862944       101748        83770      1018848        17978          104  256   3 0.675         8580         1209          204         1028
                        64   4      1146880        37028        19108      1220349        17920          287   64   1 0.975          984          753          427         1213
                        80   5      1453200        54206        36041       135198        18165          100  256   5 0.709         4617          740          105         1185
                        96   6      1284576        23775        10394       452298        13381          118  128   3 0.885         1972          513          123          708
                       112   7       693280        35149        28959        40009         6190           27  256   7 0.895         1777          561          121          179
                       128   8        56192        24221        23782        48207          439           14   32   1 0.979         2321          991          709          222
                       160   9       189920         7300         6113        13003         1187           13  128   5 0.713          616          378           23           99
                       192  10       334656         4823         3080        47939         1743           28   64   3 0.972          175          293           39          278
                       224  11       173824         3800         3024        19887          776            7  128   7 0.866           65          140           31           37
                       256  12      1074944         7396         3197        23050         4199          302   16   1 0.868         1495          510          325          630
                       320  13       548800         2489          774        21053         1715           29   64   5 0.924           72          117           32           25
                       384  14       779904         2262          231         8450         2031           64   32   3 0.991           82           77           65           38
                       448  15       307328         1308          622         7797          686           12   64   7 0.893           36           89           13           12
                       512  16      3111936         7071          993        48612         6078          762    8   1 0.997         1197          348          766          763
                       640  17       379520         1266          673      1126333          593           19   32   5 0.975           77          128           27           40
                       768  18       326400          620          195         4390          425           28   16   3 0.948           55           92           30           39
                       896  19       344960          705          320         2496          385           13   32   7 0.925           40           98           17           15
                      1024  20       234496          786          557         1941          229           58    4   1 0.987          199          258          117          316
                      1280  21      3014400         2558          203         3160         2355          149   16   5 0.987          183           91          152           32
                      1536  22       377856          419          173          531          246           32    8   3 0.960           59           84           42           45
                      1792  23       290304          302          140          185          162           12   16   7 0.843           36           80           14           15
                      2048  24      4450304         3827         1654         5273         2173         1099    2   1 0.988          665          356         1438         1179
                      2560  25       163840          140           76           31           64            9    8   5 0.888           22           64           13            9
                      3072  26         9216           50           47            7            3            1    4   3 0.750            5           53           12            3
                      3584  27            0           40           40            5            0            0    8   7 1                4           49            8            0
                      4096  28        61440           90           75          241           15           15    1   1 1               20           67           90            0
                      5120  29        25600           40           35            7            5            2    4   5 0.625            4           51           10            2
                      6144  30       104448           45           28           19           17            9    2   3 0.944           10           56           23            1
                      7168  31        71680           10            0            0           10            3    4   7 0.833            1           45            3            0
                      8192  32       860160          226          121          143          105          105    1   2 1               43           79          226            0
                     10240  33       174080          146          129        20307           17           12    2   5 0.708           29           86           63           31
                     12288  34     12607488         1062           36         1018         1026         1026    1   3 1              107           53         1062            0
                           ---
      large:          size ind    allocated      nmalloc      ndalloc    nrequests      curruns
                     16384  36       311296           39           20           52           19
                           ---
                     28672  39     59351040         2115           45         2115         2070
                     32768  40       294912           67           58        10172            9
                     40960  41        81920         1027         1025         1027            2
                           ---
                     65536  44            0           94           94           94            0
                           ---
                    131072  48            0            4            4            4            0
                    163840  49            0         6408         6408         6408            0
                           ---
                    262144  52            0            2            2            2            0
                           ---
                    524288  56            0            2            2            2            0
                           ---
                   1048576  60            0            2            2            2            0
                           ---
      huge:           size ind    allocated      nmalloc      ndalloc    nrequests   curhchunks
                   2097152  64      4194304            6            4            6            2
                           ---
                  20971520  77     20971520            1            0            1            1
                           ---
      --- End jemalloc statistics ---
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            This is still wrong for everything pre-5.5.

            5.0/5.1 are active releases, 4.6 is supported until next August, and 4.0/4.1/4.5 are supported until April.

            malarky Chris Malarky added a comment - This is still wrong for everything pre-5.5. 5.0/5.1 are active releases, 4.6 is supported until next August, and 4.0/4.1/4.5 are supported until April.
            simon.dew Simon Dew added a comment - - edited

            Backported jemalloc output to release/5.1, release/5.0, and release/4.6. Backported jemalloc output to release/4.5, release/4.1, and release/4.0, with separate section for tcmalloc output under Windows.

            simon.dew Simon Dew added a comment - - edited Backported jemalloc output to release/5.1, release/5.0, and release/4.6. Backported jemalloc output to release/4.5, release/4.1, and release/4.0, with separate section for tcmalloc output under Windows.

            Lovely, thanks Simon Dew!

            malarky Chris Malarky added a comment - Lovely, thanks Simon Dew !
            simon.dew Simon Dew added a comment -

            Updated the example jemalloc output to give the correct versions for all releases.

            simon.dew Simon Dew added a comment - Updated the example jemalloc output to give the correct versions for all releases.

            People

              simon.dew Simon Dew
              malarky Chris Malarky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty