[SERVER-55035] Mongo Write Lock shows 100 %, even there are no write operations shown in mongostat output Created: 08/Mar/21  Updated: 06/Dec/22  Resolved: 09/Mar/21

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kokila Soumi Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Write_lock_Graph.png     PNG File mongostat.png     PDF File mongotop.pdf    
Assigned Teams:
Server Triage
Operating System: ALL
Steps To Reproduce:

Participants:

 Description   

mongostats shows 100 % write lock during some specific period. However, during the same period mongotop shows zero write operations on a mongo cluster. 

Could you please clarify how mongostat shows 100 % write lock (lrw column) when there is no write operations seen in mongotop output !

 

System Configuration

Os Version: CentOS 7
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
Mongo Version : 3.4.16
Storage Engine: mmapV1
Storage Type: Data Path in tmpfs

[sessionmgr05] out: run: df -hP -x iso9660
[sessionmgr05] out: Filesystem Size Used Avail Use% Mounted on
[sessionmgr05] out: /dev/sda2 95G 19G 71G 22% /
[sessionmgr05] out: devtmpfs 50G 0 50G 0% /dev
[sessionmgr05] out: tmpfs 50G 28K 50G 1% /dev/shm
[sessionmgr05] out: tmpfs 50G 2.1G 48G 5% /run
[sessionmgr05] out: tmpfs 50G 0 50G 0% /sys/fs/cgroup
[sessionmgr05] out: tmpfs 59G 0 59G 0% /var/data/sessions.1
[sessionmgr05] out: tmpfs 9.9G 0 9.9G 0% /run/user/0

 

Attached mongotop, mongostat outputs  for 100 % write lock periods.

 

 

 

 



 Comments   
Comment by Udaya Bhaskar chimakurthy [ 29/Mar/21 ]

Hi Dmitry - 

yes , We have upgraded the mongo to a later in the latest version of the product. However , the product in the field is running mongo db 3.4. 

 

Kokila's question was , "lrw" column in mongostat output shows which lock %. In the use case mentioned , write lock goes to 100% , eventhough no write operations are taking place.As I understand there are various locks for various entities ( refer the link here  [db.currentOp() — MongoDB Manual .

Is monitoring lrw  lock % recommended practice to know the health of the mongod instance. ( apart from the CPU & mem utilization ) .

Can you suggest monitoring any other parameter and be assured mongod instance is hale and healthy ?

 

Can you please share your comments. Your response is much appreciated !

Comment by Dmitry Agranat [ 09/Mar/21 ]

Hi kokilasoumi@gmail.com, MongoDB 3.4 reached end of life in January of 2020. For general questions like this, we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums.

Generated at Thu Feb 08 05:35:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.