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

Magma buffer memory usage hangs backfills for large values in OSO mode

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      When doing KV range scans or DCP backfills using OSO (using Magma's ByKeyIterator), Magma brings a value into memory and doesn't release it until we invoke Next or destroy the iterator. If KV happens to snooze the backfill for any reason and move onto another backfill (for another vbucket), this memory will continue being held.

      This is similar to what we solved in MB-52668, which was for bySeq scans.

      The solution for byId scans is similar.

      We should also add memory accounting on Magma side for the temporary buffers used during byKey scan.

       

      To repro:

      1) Load about 2000 items of size 1MB each into a collection with 1.5GB of quota.

      ./magma/tools/kvloader/kvloader -numDocs 5000 -numOps 5000 -json -host 172.23.103.51 -workload load -docSize 1000000 -docKeyPrefix a -concurrency 1 -numCollections 1

      2) Start range scan for all vbuckets. Note the -c 8 flag below is the internal collection id.

      for i in $(seq 0 1023); do ./rangescan -h 172.23.103.51 -p 11210 -b default -u Administrator -P password -d --start 'a' --end 'z' --vbucket $i -c 8 --continue-item-limit 1 &; done

      See the memory_secondary bloat and stay there for 180s, until all range scans get auto-cancelled.

      Attachments

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

        Activity

          People

            ankush.sharma Ankush Sharma
            rohan.suri Rohan Suri
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty