Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
need help understanding write locks
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
arin  
View profile  
 More options Sep 7 2012, 8:57 pm
From: arin <a...@jeraff.com>
Date: Fri, 7 Sep 2012 17:57:58 -0700 (PDT)
Local: Fri, Sep 7 2012 8:57 pm
Subject: need help understanding write locks

Hey guys,

From time to time my app will exhibit, what seems to me, high lock times.
Here's an example from my mongodb.log (i'm profiling everything while I
troubleshoot this)

Sat Sep  8 00:38:36 [conn69541] insert jeraff.notification keyUpdates:0
locks(micros) w:121485 121ms
Sat Sep  8 00:40:46 [conn69259] insert jeraff.activityStream keyUpdates:0
locks(micros) w:3100666 3105ms

My notification docs' size is:

jeraffprod:PRIMARY> Object.bsonsize(db.notification.findOne());
232

And my activityStream docs' size is:
jeraffprod:PRIMARY> Object.bsonsize(db.activityStream.findOne());
226

My entire DB's index size is about 1.5GB
The DB's data size: is a hair under 2.8GB
the DB's file size is 14GB
The machine has 8GB RAM.
Mongo has 22.2g mapped & 5.75g resident.

Now - my questions is:
What should I be looking into to find out why seemingly "simple" inserts
are locking for so long?

I'm sure my code's doing something to make mongo unhappy - I just want to
know what procedures to employ to get down to the bottom of these problems.

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kenny Gorman  
View profile  
 More options Sep 7 2012, 9:13 pm
From: Kenny Gorman <k...@kennygorman.com>
Date: Fri, 7 Sep 2012 18:12:57 -0700
Local: Fri, Sep 7 2012 9:12 pm
Subject: Re: [mongodb-user] need help understanding write locks
Can you post the code that you are using for the inserts?

Thanks
Kenny

On Sep 7, 2012, at 5:57 PM, arin wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arin Sarkissian  
View profile  
 More options Sep 7 2012, 9:39 pm
From: Arin Sarkissian <a...@toodo.com>
Date: Fri, 7 Sep 2012 18:38:58 -0700
Local: Fri, Sep 7 2012 9:38 pm
Subject: Re: [mongodb-user] need help understanding write locks
Hi Kenny,  

We're using Java w/ Morphia.
The code for the inserts is super boring…

https://gist.github.com/3671210

using mongo-java-driver v 2.5
morphia version .99

- Arin

Arin Sarkissian
650-759-9272
http://well.io/phatduckk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jenna deBoisblanc  
View profile  
 More options Sep 25 2012, 3:39 pm
From: Jenna deBoisblanc <jenna.deboisbl...@10gen.com>
Date: Tue, 25 Sep 2012 12:39:28 -0700 (PDT)
Local: Tues, Sep 25 2012 3:39 pm
Subject: Re: [mongodb-user] need help understanding write locks

Hi Arin,

There could be a handful of reasons why inserts are taking a while,
especially since your data appears to exceed RAM.  It would be nice to see
additional metrics- page faults, lock percentage, etc.  Are you servers in
MMS?
https://mms.10gen.com/user/login


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David K Storrs  
View profile  
 More options Sep 25 2012, 3:45 pm
From: David K Storrs <da...@channelmeter.com>
Date: Tue, 25 Sep 2012 12:45:44 -0700 (PDT)
Local: Tues, Sep 25 2012 3:45 pm
Subject: Re: need help understanding write locks
Arin,

What version of Mongo are you using?  The <2.0 versions had real
problems with global write locking.  2.0 greatly improved this, and
2.2 (the current stable) goes much farther.  You may see significant
improvement simply upgrading.  http://docs.mongodb.org/manual/release-notes/2.2/#upgrading

Also, how many threads / processes do you have doing the writes?
About how many writes / s do you expect to see, and how many do you
typically see / do you see during a slowdown?

Do you have any externalities that might be impacting you?  (e.g. cron
jobs that run stats over the DB)

Dave

On Sep 7, 6:39 pm, Arin Sarkissian <a...@toodo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »