Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26988

Secondary delay causes large drop in insert rate on the primary due to cache full condition

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: WiredTiger
    • Operating System:
      ALL
    • Sprint:
      Storage Engines 2019-05-06
    • Case:
    • Story Points:
      5

      Description

      With a heavy insert load and a secondary that is delayed the cache on the primary fills to 100% and operation rates drop. Here's a run showing behavior on the primary with the secondary delayed due to lag, but a similar effect is seen if the secondary is intentionally delayed using slaveDelay.

      • from D-E the cache is 95% full and insert rate drops considerably, possibly due to application threads doing evictions?
      • F-G and H-I seem to be seem to be related to checkpoints, possibly also in combination with the full cache?
      • the rate of pages walked for eviction is generally very high, about 6k times the rate of pages actually evicted, suggesting that the issue is difficulty finding pages to evict to keep the cache at target levels

      The high rate of pages walked for eviction suggests a connection to SERVER-22831, which also showed that symptom in connection with a full cache; however the above run was on 3.2.5-rc1 where SERVER-22831 was fixed, so it seems there is a different issue here.

      The above test involved

      • 3.2.5-rc1
      • 2-node replica set
      • 25 GB cache
      • 100 GB oplog
      • 5 threads inserting 800 byte documents into 5 separate collections

      for t in $(seq 5); do
          mongo --eval "
              x = ''
              for (var i=0; i<800; i++)
                  x += 'x'
              docs = []
              for (var i=0; i<1000; i++)
                  docs.push({x:x})
              ops = [{
                  op: 'insert',
                  ns: 'test.c' + '$t',
                  doc: docs,
              }]
              res = benchRun({
                  ops: ops,
                  seconds: 10000,
                  parallel: 1
              })
          " &
      done
       
      wait
      

        Attachments

        1. lagging.png
          lagging.png
          370 kB
        2. slave_delay_metrics.png
          slave_delay_metrics.png
          392 kB

          Issue Links

            Activity

              People

              Assignee:
              alex.cameron Alex Cameron (Inactive)
              Reporter:
              michael.cahill Michael Cahill
              Participants:
              Votes:
              2 Vote for this issue
              Watchers:
              15 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: