Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-56926

Daemon allocations >8MB not included in stats

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Morpheus
    • 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.4, 7.0.5, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 7.1.3
    • memcached
    • Untriaged
    • 0
    • Yes

    Description

      Allocations over 8MB made while not associated with a bucket are not reflected in the daemon memory stats.

      This is a result of the handling of huge/oversized allocations by jemalloc:

       opt.oversize_threshold (size_t) r-
       
          The threshold in bytes of which requests are considered oversize. Allocation requests with greater sizes are fulfilled from a dedicated arena (automatically managed, however not within narenas), in order to reduce fragmentation by not mixing huge allocations with small ones. In addition, the decay API guarantees on the extents greater than the specified threshold may be overridden. Note that requests with arena index specified via MALLOCX_ARENA, or threads associated with explicit arenas will not be considered. The default threshold is 8MiB. Values not within large size classes disables this feature.
      

      Daemon memory usage is determined from per-arena jemalloc stats; in this case huge allocations do not get accounted against the arena for the current client, so do not appear in the daemon metrics.
      Per-bucket metrics are unaffected; an arena is explicitly identified with MALLOCX_ARENA in that case, so the above special handling does not occur.

      These oversized allocations are reflected in other jemalloc metrics, but would not be reflected in the exposed daemon metrics.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-56926
          # Subject Branch Project Status CR V

          Activity

            People

              vesko.karaganev Vesko Karaganev
              james.harrison James Harrison (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty