[SERVER-38905] slow log questions, why global lock(timeAcquiringMicros) is large, there is no pressure in my mongo service(I/O is low, and have many free memory, There is also very little data,all query use the index), Created: 09/Jan/19 Updated: 10/Jan/19 Resolved: 09/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Performance |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | yxyxz123456 | Assignee: | Danny Hatcher (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
slow log as following:
system.profile as following:
The problem doesn't come up very often, it comes up once in a while,who can help me, thanks! There is also very little data。
all the request use the index, It shouldn't be so slow,There is also very little data
|
| Comments |
| Comment by yxyxz123456 [ 10/Jan/19 ] | |
|
daniel.hatcher , thanks for you reply, but there is No cause was reported in the log about what happening on the database that slowed the query down. so I can not find the reasion.
Adjacent log: 2019-01-10T09:49:28.544+0800 I ACCESS [conn778798] Successfully authenticated as principal root on admin , driver: { name: "MongoDB Internal Client", version: "3.6.3" }, os: { type: "Linux", name: "CentOS Linux release 7.2.1511 (Core) ", architecture: "x86_64", version: "Kernel 3.10.0-514.16.1.el7.x86_64" } } , driver: { name: "MongoDB Internal Client", version: "3.6.3" }, os: { type: "Linux", name: "CentOS Linux release 7.2.1511 (Core) ", architecture: "x86_64", version: "Kernel 3.10.0-514.16.1.el7.x86_64" } } , driver: { name: "MongoDB Internal Client", version: "3.6.3" }, os: { type: "Linux", name: "CentOS Linux release 7.2.1511 (Core) ", architecture: "x86_64", version: "Kernel 3.10.0-514.16.1.el7.x86_64" } } , shardVersion: [ Timestamp(0, 0), ObjectId('000000000000000000000000') ], $readPreference: { mode: "secondaryPreferred" }, $clusterTime: { clusterTime: Timestamp(1547084980, 156), signature: { hash: BinData(0, 867415345C8D172820EA6365202D404615D11C66), keyId: 6639872680583495699 }}, $client: { driver: { name: "mongo-java-driver", version: "3.4.0" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "2.6.32-642.6.2.el6.toav3.x86_64" }, platform: "Java/Oracle Corporation/1.7.0_79-mockbuild_2015_07_24_09_26-b00", mongos: { host: "fd-mongos-p01.gz01:27024", client: "100.69.81.52:30140", version: "3.6.3" } }, $configServerState: { opTime: { ts: Timestamp(1547084977, 178), t: 2 }}, $db: "liangjian" } planSummary: IXSCAN { _id: 1 } keysExamined:1 docsExamined:1 cursorExhausted:1 numYields:0 nreturned:1 reslen:454 locks:{ Global: { acquireCount: { r: 2 }, acquireWaitCount: { r: 1 }, timeAcquiringMicros: { r: 282527 } }, Database: { acquireCount: { r: 1 }}, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 282ms , shardVersion: [ Timestamp(0, 0), ObjectId('000000000000000000000000') ], $readPreference: { mode: "secondaryPreferred" }, $clusterTime: { clusterTime: Timestamp(1547084980, 136), signature: { hash: BinData(0, 867415345C8D172820EA6365202D404615D11C66), keyId: 6639872680583495699 }}, $client: { driver: { name: "mongo-java-driver", version: "3.4.0" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "2.6.32-573.18.1.el6.toa.x86_64" }, platform: "Java/Oracle Corporation/1.7.0_75-b13", mongos: { host: "fd-mongos-p01.gz01:27024", client: "100.69.111.51:52036", version: "3.6.3" } }, $configServerState: { opTime: { ts: Timestamp(1547084977, 178), t: 2 }}, $db: "liangjian" } planSummary: IXSCAN { _id: 1 } keysExamined:1 docsExamined:1 cursorExhausted:1 numYields:0 nreturned:1 reslen:454 locks:{ Global: { acquireCount: { r: 2 }, acquireWaitCount: { r: 1 }, timeAcquiringMicros: { r: 283219 } }, Database: { acquireCount: { r: 1 }}, Collection: { acquireCount: { r: 1 }} } protocol:op_msg 283ms | |
| Comment by Danny Hatcher (Inactive) [ 09/Jan/19 ] | |
|
Hello, Thanks for your report. As a starting point for your investigation, you may wish to look at the metrics we provide at the end of slow queries:
Every value is low except for timeAcquiringMicros. This indicates that the issue is not with the query itself but there is something happening on the database that slowed the query down. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. Thank you, Danny |