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

Locking and Slow Query issues after upgrading from Mongo 2.0.7 to 2.2.3

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.2.3
    • Component/s: Querying
    • Labels:
      None
    • Environment:
      debian squeeze 6.0.3

      After upgrading from Mongo 2.0.7 to Mongo 2.2.3 we started experiencing a 6,500% increase in slow logs and we went from under 5% locking to over 20% locking on the entire instance.

      We suspect that the root cause is that Mongo 2.2.3 collects and reports more statistics than 2.0.7 and as a result these locking issues have now become visible whereas in 2.0.7 they were also happening but not being reported.

      The majority of slow queries reported are updates to documents by object_id. We also have a legacy process that is reading the oplog in order to extract changes and push them into mysql. The constant processing of the oplog creates read locks on the oplog which in turn causes updates in the database to wait on the locks intermittently.

      Does this theory sound plausible that we always had this issue but now it has become visible as a result of the upgrade?

      Sanitized version of typical slow log entry.

      Tue Apr 2 19:59:58 [conn313] update db.Collection query:

      { _id: "sanitized" }

      update: { $set:

      { sanitized_data: BinData, sanitized_time: new Date(1364957998272) }

      } nscanned:0 nupdated:1 fastmodinsert:1 keyUpdates:0 locks(micros) w:390138 390ms

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            eric.hernandez@sellingsource.com Eric Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: