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

Write Slow in WiredTiger Database

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.3
    • Component/s: WiredTiger, Write Ops
    • Labels:
      None

      Hi Team ,

      There is a performance issue with write operations , data insert to the database very slow in a sudden and will get back to normal in some seconds .

      Strange Logs like this :

      2015-06-16T10:23:58.212+0800 I COMMAND  [conn287864] command ISH_Fact.$cmd command: insert { insert: "FactAppLoginLog", ordered: true, documents: [ { _id: ObjectId('557f88bda310a27a4f3893eb'), userid: "557f5befa310c0e3f3324e2d", username: "15026835043", passauthtime: 578, locationinfo: { height: 0.0, precision: 43.0, gps: [ 31.21235656738281, 121.4836959838867 ] }, ispass: true, uuid: "58a41e3c-2392-3e97-be73-0a4542c3ff0f", os: "Android", type: "PAD", version: "9", eventtime: new Date(1434421366267), eventt: 6, ct: new Date(1434421437738) } ] } keyUpdates:0 writeConflicts:0 numYields:0 reslen:80 locks:{ Global: { acquireCount: { w: 3 } }, Database: { acquireCount: { w: 3 } }, Collection: { acquireCount: { w: 2 } }, oplog: { acquireCount: { w: 1 } } } 474ms
      
      2015-06-16T10:23:58.213+0800 I COMMAND  [conn287789] command ISH_Fact.$cmd command: insert { insert: "FactPortalADPresent", ordered: true, documents: [ { _id: ObjectId('557f88bda310a27a4f3893ef'), spotid: "new_ishmobile_rotate_B03", batchid: "9aa09df5-4929-8bfc-13af-556fbe1dd41c", os: "iOS 7", type: "Smartphone", op: "telecom", buv: "14dfa2e18f0-067523f0-e621-4f96-8df9-39e78e4ba0c7", un: "13501880398", site: "i-shanghai", et: new Date(1434421437899) } ] } keyUpdates:0 writeConflicts:0 numYields:0 reslen:80 locks:{ Global: { acquireCount: { w: 3 } }, Database: { acquireCount: { w: 3 } }, Collection: { acquireCount: { w: 2 } }, oplog: { acquireCount: { w: 1 } } } 290ms
      

      As you can see , the op only locks the db for 2 or 3 ms but it cost 300ms to finish , there is only _id index on those tables , about 4,000 write ops every minute on those tables.

      Could you advise how to trouble shooting the issue ?

      Thanks,

      Carl Dong

        1. db.log
          38 kB
        2. OpsManager.jpg
          OpsManager.jpg
          72 kB

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            carl.dong@windfindtech.com carl dong
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: