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

2.6 remove writeCmd regression (baseline: 2.4 remove writeOps + GLE)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.0-rc2
    • Component/s: Querying, Write Ops
    • None
    • ALL

      About 50% slower in my synthetic scenario. The only difference is that (I guess) 2.4 relies on writeOps + GLE while 2.6 uses writeCmd (and so, in my test I didn't call GLE after remove() call).

      2.6 testcase:

      db.dropDatabase();
      
      var ndocs = 20000;
      
      
      for (var i = 0; i < ndocs; ++i) {
          db.foo.insert({"a": i});
      }
      
      db.foo.ensureIndex({"a": 1});
      
      var before = new Date().getTime();
      for (var i = 0; i < ndocs; ++i) {
          db.foo.remove({"a": i});
      }
      print(new Date().getTime() - before);
      

      2.6 results (githash ad91eb0f75f39c1bb71b5e0ca4279b883cb9fe8d ):

      $ for i in `seq 1 5`; do ./mongo remove-26.js |grep ^[0-9]; done
      4941
      4937
      4952
      4932
      4936
      

      2.4 testcase:

      db.dropDatabase();
      
      var ndocs = 20000;
      
      for (var i = 0; i < ndocs; ++i) {
          db.foo.insert({"a": i});
      }
      
      db.foo.ensureIndex({"a": 1});
      
      var before = new Date().getTime();
      for (var i = 0; i < ndocs; ++i) {
          db.foo.remove({"a": i});
          db.getLastError();
      }
      print(new Date().getTime() - before);
      

      2.4 results:

      $ for i in `seq 1 5`; do ./mongo remove-24.js |grep ^[0-9]; done
      2782
      2741
      2737
      2751
      2755
      

        1. legacy_writes_profile.csv
          11 kB
        2. remove-24.py
          0.6 kB
        3. remove-26.py
          0.6 kB
        4. write_commands_profile.csv
          19 kB
        5. writecmd.cpp
          2 kB
        6. writeops.cpp
          2 kB

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            davide.italiano Davide Italiano
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: