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

Btree depth for oplog grows faster than expected

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.0-rc9, 3.1.0
    • Affects Version/s: 3.0.0-rc7
    • Component/s: WiredTiger
    • None
    • Fully Compatible
    • ALL

      While doing perf testing of an insert only workload, I noticed that the oplog collection's btree was deepening faster than expected. After only ~1 minute, the tree depth grows to 4 and after ~2 minutes it grows to 5.

      I'm not sure this is a problem per se, but seems abnormal.

      I couldn't seem to reproduce this with an oplog size of 1GB or 3GB, but happens very quickly with 5GB. Tested with rc7 and latest master (git hash: e4c60053b2967e16f765fa25d16aa6d629faa196)

      Running mongodb with --master and --oplogSize 5000:

      ./mongod --dbpath /home/dan/wt-data/ --storageEngine wiredTiger --master --oplogSize 5000
      

      Run workload:

      mongo deep_tree.js
      

      Tracking the btree depth here:

      > use local
      switched to db local
      > while(1) {print(""+ Date()+" " + db.oplog.$main.stats().wiredTiger.btree['maximum tree depth']);sleep(5000)}
      Wed Feb 04 2015 15:32:58 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:32:59 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:00 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:05 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:10 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:15 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:20 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:25 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:30 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:35 GMT-0500 (EST) 3
      Wed Feb 04 2015 15:33:40 GMT-0500 (EST) 4
      .
      .
      .
      Wed Feb 04 2015 15:34:37 GMT-0500 (EST) 5
      

      Workload generated using dead simple insertion of identical 565 byte docs.

        1. deep_tree.js
          1 kB
          Daniel Pasette

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: