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

[BP of MB-26282] - MemoryInUse() stalls eviction with large number of writer contexts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • 5.1.2, 5.1.3
    • storage-engine
    • Untriaged
    • No

    Description

      As part of eviction, the first step is to determine if the current MemoryInUse is greater than a threshold. However the call to compute the MemoryInUse() walks through all the plasma writer contexts to sum up the stats. This is ok when there are a small number of writers instances. However if the number of writer instances is large and we enter memory pressure often, then this very task of computing the MemoryInUse() ends up being too expensive and hogging up CPU eventually slowing down eviction.

      One solution might just be to use a global atomic to have each writer update its memory in use so that there is no need for looping over other writer contexts to obtain the usage.

       

      Attachments

        Issue Links

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

          Activity

            People

              mihir.kamdar Mihir Kamdar (Inactive)
              sundar Sundar Sridharan (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