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

10% Performance Regression in update path between 3.1.2 and master (Update.IncFewDocs, Update.IncNoIndex, Update.IncWithIndex, MultiUpdate.Uncontended.TwoDocs.NoIndex...)

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance, Write Ops
    • Storage Execution
    • Fully Compatible
    • ALL
    • 0

      Mongo-perf shows a large regression on all of the update tests sometime between 3.1.2 and 3.1.4 on wiredTiger, probably over multiple commits, and another ~4% drop since 3.1.4. On WiredTiger and MMAPv1, although the regression shows earlier on wiredTiger.

      WiredTiger Results
      MMAPv1 Results

      Two simplified shell based reproductions.

      Update.MultiUpdate.Uncontended.TwoDocs.NoIndex

      var setupTestUncontendedTwoDocs = function( collection ) {
          collection.drop();
          var docs = [];
          for ( var i = 0; i < 4800; i++ ) {
              docs.push( { _id : i , x : 0 } );
          }
          collection.insert(docs);
          collection.getDB().getLastError();
      };
      use test0
      setupTestUncontendedTwoDocs(db.MultiUpdate_Uncontended_TwoDocs_NoIndex0)
      benchRun({"ops":[{"op":"update","multi":true,"query":{"_id":{"$in":[{"#RAND_INT_PLUS_THREAD":[0,100]},{"#RAND_INT_PLUS_THREAD":[0,100]}]}},"update":{"$inc":{"x":1}},"ns":"test0.MultiUpdate_Uncontended_TwoDocs_NoIndex0","safe":false,"w":0,"j":false,"writeCmd":true}],"seconds":5,"host":"127.0.0.1:27017","parallel":8})
      

      Update.FieldAtOffset

      var setup = function( collection ) {
                        collection.drop();
      
                        var kFieldCount = 512;
      
                        // Build the document and insert several copies.
                        var toInsert = {};
                        for (var i = 0; i < kFieldCount; i++) {
                            toInsert["a_" + i.toString()] = "a";
                        }
                        
                        var docs = [];
                        for (var i = 0; i < 100; i++) {
                            docs.push(toInsert);
                        }
                        collection.insert(docs);
                        collection.getDB().getLastError();
                    }
      use test0
      setup(db.Update_FieldAtOffset0)
      benchRun({"ops":[{"op":"update","multi":true,"query":{},"update":{"$set":{"a_256":"a"}},"ns":"test0.Update_FieldAtOffset0","safe":false,"w":0,"j":false,"writeCmd":true},{"op":"update","multi":true,"query":{},"update":{"$set":{"a_256":"aa"}},"ns":"test0.Update_FieldAtOffset0","safe":false,"w":0,"j":false,"writeCmd":true}],"seconds":5,"host":"127.0.0.1:27017","parallel":8})
      

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            david.daly@mongodb.com David Daly (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: