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

inMemory spins CPU when cache fills with dirty data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Storage, WiredTiger
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      1. Start Enterprise mongod:
      ./mongod --dbpath=/tmp --storageEngine=inMemory --replSet rs
      2. Run initiate in a shell:
      ./mongo
      rs.initiate()
      3. Run a benchrun load to trigger lots of inserts:
      3a. clone git@github.com:mongodb/mongo-perf.git
      3b.
      python benchrun.py --includeFilter 'Insert.JustID' -f ./testcases/insert.js --trialTime 60 --trialCount 1 --writeCmd=true -w 1 -t 24 -s /path/to/mongo/shell/mongo}
      4. After about 30 seconds, observe that a few threads in mongod are spinning in eviction. Even after the benchrun completes, the threads continue to spin.

      Show
      1. Start Enterprise mongod: ./mongod --dbpath=/tmp --storageEngine=inMemory --replSet rs 2. Run initiate in a shell: ./mongo rs.initiate() 3. Run a benchrun load to trigger lots of inserts: 3a. clone git@github.com:mongodb/mongo-perf.git 3b. python benchrun.py --includeFilter 'Insert.JustID' -f ./testcases/ insert .js --trialTime 60 --trialCount 1 --writeCmd=true -w 1 -t 24 -s /path/to/mongo/shell/mongo } 4. After about 30 seconds, observe that a few threads in mongod are spinning in eviction. Even after the benchrun completes, the threads continue to spin.

      Description

      If you set up a one-node replica set with the inMemory storage engine and continuously write data, eventually you will trigger eviction threads to spin hard at 100% cpu consumption.
      Part of this bug is that oldest_timestamp is never updated, so the cache eventually fills with update data. However, whenever the cache fills, the inMemory storage engine should either start using a LAS file, or it should abort. (I don't think it will be logistically possible to block, as it would probably be a deadlock.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-storage-engines Backlog - Storage Engines Team
              Reporter:
              milkie Eric Milkie
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: