Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Can somebody explain me what is lock pinger in MongoDB

[LockPinger] cluster XXXXXXX:27019 pinged successfully at Wed Feb 5 04:46:01 2014 by distributed lock pinger 'XXXXXX:27019/ip-XX-XX-XX-XX:27017:1391512883:1804289383', sleeping for 30000ms

Thanks in advance...

share|improve this question
add comment

1 Answer

There are distributed locks used in a sharded environment. The balancer takes a lock (only one migration is active at a time), the shards will take out meta data locks when doing splits also. Those live in the config.locks collection.

As for the lock pinger, the config.lockpings collection keeps track of the active components in the cluster, so it is an informational collection. The lock pinger is what populates this collection and you have pasted what looks to be the result of a successful ping.

Note: please do not use these collections for anything in your application or elsewhere. These collections (as noted on the linked pages) are considered internal only and can (and will) be changed/removed/updated without notice.

share|improve this answer
    
Can you please explain me what is actually happening when doing lock pinging? –  user2143016 Feb 6 at 7:44
    
As I said, it is keeping track of the various pieces of the cluster, when a process successfully pings it updates the timestamp in the collection, then the pinger goes back to sleep (as you can see in the log message). Perhaps if you explained why you are trying to figure this out it might be easier to answer your question, in general terms this can just be considered internal housekeeping my MongoDB and be ignored. –  Adam C Feb 6 at 9:16
    
The reason is, I have created shard cluster with 3 shard servers, 1 config and 1 router. While monitoring all the servers the router sometimes use 100% of CPU but I do not see any log regarding high CPU usage. So I thought that this lock pinging may use high CPU for pinging process. Please advise me if there is any other reason for 100% CPU usage. –  user2143016 Feb 6 at 10:03
    
It will not be the lock pings, they are very lightweight, I assume you think they are the culprit because they show up regularly, but that is just a function of them running periodically (people often think the serverStatus command is at fault on mongod processes for the same reason). If you are seeing high CPU, then I would look for large in memory sorts, hash computation on a hashed shard key, see if increasing the log level on the mongos gives more insight. Oh, and if this is a prod system, do not run with 1 config server, ever. –  Adam C Feb 6 at 10:46
    
Thank you.. Do you know any other reason behind the high CPU usage? –  user2143016 Feb 6 at 10:54
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.