[SERVER-15614] Implement locking statistics in db.currentOp and db.serverStatus Created: 13/Oct/14  Updated: 27/Oct/15  Resolved: 14/Jan/15

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

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-4666 rc6 - currentOp Closed
Duplicate
is duplicated by SERVER-14462 db.currentOp doesn't report locking s... Closed
Backwards Compatibility: Major Change
Participants:

 Description   

Implement locking statistics and update documentation. Here is a proposed view of what the stats would look like:

{
        "Global" : {
                "acquireCount" : {
                        "r" : NumberLong(199087),
                        "w" : NumberLong(67041),
                        "R" : NumberLong(0),
                        "W" : NumberLong(6)
                },
                "acquireWaitCount" : {
                        "r" : NumberLong(6251),
                        "w" : NumberLong(737),
                        "R" : NumberLong(0),
                        "W" : NumberLong(1)
                },
                "timeAcquiringMicros" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong("40050855895"),
                        "R" : NumberLong(0),
                        "W" : NumberLong(14087631)
                }
        },
        "MMAPV1Flush" : {
                "acquireCount" : {
                        "r" : NumberLong(397136),
                        "w" : NumberLong(179501),
                        "R" : NumberLong(2483),
                        "W" : NumberLong(0)
                },
                "acquireWaitCount" : {
                        "r" : NumberLong(414),
                        "w" : NumberLong(1969),
                        "R" : NumberLong(1403),
                        "W" : NumberLong(47)
                },
                "timeAcquiringMicros" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                }
        },
        "Database" : {
                "acquireCount" : {
                        "r" : NumberLong(199085),
                        "w" : NumberLong(66982),
                        "R" : NumberLong(4),
                        "W" : NumberLong(11)
                },
                "acquireWaitCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                },
                "timeAcquiringMicros" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                }
        },
        "Collection" : {
                "acquireCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(199101),
                        "W" : NumberLong(66984)
                },
                "acquireWaitCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(198049),
                        "W" : NumberLong(66980)
                },
                "timeAcquiringMicros" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(592931099),
                        "W" : NumberLong(153978610)
                }
        },
        "Metadata" : {
                "acquireCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(21)
                },
                "acquireWaitCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                },
                "timeAcquiringMicros" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                }
        },
        "local" : {
                "acquireCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                },
                "acquireWaitCount" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                },
                "timeAcquiringMicros" : {
                        "r" : NumberLong(0),
                        "w" : NumberLong(0),
                        "R" : NumberLong(0),
                        "W" : NumberLong(0)
                }
        }
}

After refactoring stats collection logic in storage, reenable profile4.js, which was disabled temporarily to make progress on using the lock manager in unit tests.



 Comments   
Comment by Githook User [ 13/Jan/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 Lock statistics for db.currentOp

Add deadlock counter as well.
Branch: master
https://github.com/mongodb/mongo/commit/639d69ecdf0febc91ba60118891adfedb0c0fc43

Comment by Githook User [ 13/Jan/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 Add padding to the instance-wide lock stats
Branch: master
https://github.com/mongodb/mongo/commit/08f3ea2da5c7a93ce5c7c926bd72f5b5da5686ca

Comment by Githook User [ 12/Jan/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 Lock statistics for db.serverStatus.locks
Branch: master
https://github.com/mongodb/mongo/commit/249e4c59f4e6b98a6109225f953639de4743bf6c

Comment by Githook User [ 12/Jan/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 Fix up durability metrics reporting
Branch: master
https://github.com/mongodb/mongo/commit/7596d9d7cb2e0e53d4f4adb38f613dd35862eb0a

Comment by Githook User [ 30/Oct/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 Move inProcCmd to a separate file and clean includes

It is currently in instance.cpp, which is very cluttered. This change is
in preparation for the db.currentOp fix.
Branch: master
https://github.com/mongodb/mongo/commit/bc51c5e5b20a24fcfa3e0ecb5595f563abb7086a

Comment by Githook User [ 24/Oct/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 LockerImpl changes for diagnostics

Comment by Githook User [ 23/Oct/14 ]

Author:

{u'username': u'IanWhalen', u'name': u'Ian Whalen', u'email': u'ian.whalen@gmail.com'}

Message: Revert "SERVER-15614 LockerImpl changes to support diagnostics and deadlock"

This reverts commit 629243d3ec1e0834754574d0dffb59c43d35e85e.
Branch: master
https://github.com/mongodb/mongo/commit/c86905bd4d22f14656b3b058ab0bf4880f3c7258

Comment by Githook User [ 23/Oct/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-15614 LockerImpl changes to support diagnostics and deadlock
detection

Doesn't actually implement either, just provides the support and
prerequisites.

Comment by Githook User [ 13/Oct/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-15614 Remove cc() references from d_concurrency.
Branch: master
https://github.com/mongodb/mongo/commit/a14adbe5793af16b70fb1895ab0a7f65c753bfb8

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