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

inMemory spins CPU when cache fills with dirty data

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage, WiredTiger
    • Labels:
      None
    • Storage Engines
    • ALL
    • 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.

      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.)

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: