[SERVER-17341] update on single doc is slower than 2.6 (both WT and mmapv1) Created: 20/Feb/15  Updated: 23/Mar/15  Resolved: 05/Mar/15

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.0.0-rc9
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Rui Zhang (Inactive) Assignee: Daniel Pasette (Inactive)
Resolution: Duplicate Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-17411 20% drop in Update perf for MMAPv1 vs... Closed
Related
is related to SERVER-17342 20% drop in throughput on a contended... Closed
Operating System: ALL
Participants:

 Description   

Test

  • standalone mongod
  • test with following benchRun script:

    var run = function() {
            var d = db.getSiblingDB("test");
            d.foo.insert({_id:1,a:0});
     
            res = benchRun( {
                    ops : [{
                                    ns : "test.foo",
                                    op : "update" ,
                                    query: {_id: 1},
                                    update : { $inc: {a: 1} } ,
                                    w: 1,
                                    writeCmd : true }],
                    seconds : 60,
                    totals : true,
                    writeCmd : true,
                    w: 1,
                    parallel : 40
            });
     
            return res
    }
     
    var s = db.serverStatus();
    var v = db.serverBuildInfo();
     
    print("Version: " + v.version)
    print("git version: " + v.gitVersion)
    if ( s.storageEngine !== undefined) {
        print("storageEngine: " + db.serverStatus().storageEngine.name)
    }
    print("Update RPS: " + run().update);

Results:

  • the throughput from both WT and mmapv1 is slower than that of 2.6.7
    test rc9 + wt rc9 + mmapv1 2.6.7 + mmapv0
    contenedUpdate (update with 40 thread) 23082 22061 25975
    update with 1 thread 8947 10849 10816

Observation

  • WT update is slow, this probably related how update is done with WT. With single thread update, it is 17.3% slower than 2.6.7, and 11.2% with 40 thread update
  • mmapv1 is slower when there is contention, and in par with mmapv0 (single thread update)


 Comments   
Comment by Rui Zhang (Inactive) [ 20/Feb/15 ]

raw output

# update with 40 thread
 
[MASTER scripts]$ /data/rc9/bin/mongo contendedUpdate.js
MongoDB shell version: 3.0.0-rc9
connecting to: test
Version: 2.6.7
git version: a7d57ad27c382de82e9cb93bf983a80fd9ac9899
Update RPS: 25975.0326484303
[MASTER scripts]$ /data/rc9/bin/mongo contendedUpdate.js
MongoDB shell version: 3.0.0-rc9
connecting to: test
Version: 3.0.0-rc9
git version: e6577bc37a2edba81b99146934cf7bad00c6e1b2
storageEngine: mmapv1
Update RPS: 22061.985665206612
[MASTER scripts]$ /data/rc9/bin/mongo contendedUpdate.js
MongoDB shell version: 3.0.0-rc9
connecting to: test
Version: 3.0.0-rc9
git version: e6577bc37a2edba81b99146934cf7bad00c6e1b2
storageEngine: wiredTiger
Update RPS: 23082.464896486552
 
 
 
# single thread update
 
[MASTER scripts]$ /data/rc9/bin/mongo contendedUpdate.js
MongoDB shell version: 3.0.0-rc9
connecting to: test
Version: 2.6.7
git version: a7d57ad27c382de82e9cb93bf983a80fd9ac9899
Update RPS:   .34870394231
[MASTER scripts]$ /data/rc9/bin/mongo contendedUpdate.js
MongoDB shell version: 3.0.0-rc9
connecting to: test
Version: 3.0.0-rc9
git version: e6577bc37a2edba81b99146934cf7bad00c6e1b2
storageEngine: mmapv1
Update RPS: 10849.852924041847
[MASTER scripts]$ /data/rc9/bin/mongo contendedUpdate.js
MongoDB shell version: 3.0.0-rc9
connecting to: test
Version: 3.0.0-rc9
git version: e6577bc37a2edba81b99146934cf7bad00c6e1b2
storageEngine: wiredTiger
Update RPS: 8947.969653615964
[MASTER scripts]$

Generated at Thu Feb 08 03:44:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.