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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Performance, Write Ops
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Linked BF Score:
      0

      Description

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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: