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
80k writes/s via php cli
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
  8 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
 
MKN Web Solutions  
View profile  
 More options Mar 16 2012, 1:15 am
From: MKN Web Solutions <mich...@mknwebsolutions.com>
Date: Thu, 15 Mar 2012 22:15:35 -0700 (PDT)
Local: Fri, Mar 16 2012 1:15 am
Subject: [mongodb-user] 80k writes/s via php cli

I'm able to achieve 80k writes per second via CLI php.  The script is
basic, it simply injects a 10 char string into "x" (in this case it isn't
indexed, nor does it need to be since this is a write test only).

The machine specs are amd phenom II x4 2.2ghz @ 64bit, 4GB ram, 250GB 7200
rpm hd, running ubuntu.

CPU usage spiked around 50-70% usage by MongoDB and 20-30% by php cli.
 Mongo running as a single instance, master set on, no repl set nor slaves.

My question is, what's the next bottleneck.  The HD utilization was also
bouncing around 10-35%.  I want to get the max writes possible that the
machine can produce.  

Thanks for any tips / help.

<https://lh3.googleusercontent.com/-JKp03qVaVS4/T2LLsmoGwoI/AAAAAAAAAA...>

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/QTuYHv-zm3IJ.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.


 
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.
Max Schireson  
View profile  
 More options Mar 16 2012, 4:41 am
From: Max Schireson <mschire...@gmail.com>
Date: Fri, 16 Mar 2012 01:41:42 -0700
Local: Fri, Mar 16 2012 4:41 am
Subject: Re: [mongodb-user] 80k writes/s via php cli

I'd check the lock % in mongodb. If you are bottlenecking there you could
run multiple mongod's sharded. Others may have more suggestions.
On Mar 16, 2012 6:15 AM, "MKN Web Solutions" <mich...@mknwebsolutions.com>
wrote:

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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.
Sekine Coulibaly  
View profile  
 More options Mar 16 2012, 6:50 am
From: Sekine Coulibaly <scoulib...@gmail.com>
Date: Fri, 16 Mar 2012 11:50:42 +0100
Local: Fri, Mar 16 2012 6:50 am
Subject: Re: [mongodb-user] 80k writes/s via php cli

I'm not a mongo guru, but given your lock level around 80%, you still have room, enough to reach 100kins/s.

Did you try paralellizing php cli scripts ?

Le 16 mars 2012 à 06:15, MKN Web Solutions <mich...@mknwebsolutions.com> a écrit :

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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.
MKN Web Solutions  
View profile  
 More options Mar 16 2012, 8:41 am
From: MKN Web Solutions <mich...@mknwebsolutions.com>
Date: Fri, 16 Mar 2012 05:41:24 -0700 (PDT)
Local: Fri, Mar 16 2012 8:41 am
Subject: Re: [mongodb-user] 80k writes/s via php cli

That's what I figured.  Yea, I was running multiple php cli's with the same
script.

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/CHOl72aoJtQJ.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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.
Timothy Hawkins  
View profile  
 More options Mar 16 2012, 8:47 am
From: Timothy Hawkins <tim.hawk...@mac.com>
Date: Fri, 16 Mar 2012 20:47:11 +0800
Local: Fri, Mar 16 2012 8:47 am
Subject: Re: [mongodb-user] 80k writes/s via php cli

Can you post your simple script, so we can see if there are any bottlenecks in the code?

Also 2 other things

What version of php are you using?  5.2 => 5.3 => 5.4 have all shown sometimes significant improvements in performance.

Do you have apc enabled,in particular do you have apc cli enabled

Sent from my iPad

On 16 Mar 2012, at 20:41, MKN Web Solutions <mich...@mknwebsolutions.com> wrote:

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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.
Timothy Hawkins  
View profile  
 More options Mar 16 2012, 8:48 am
From: Timothy Hawkins <tim.hawk...@mac.com>
Date: Fri, 16 Mar 2012 20:48:29 +0800
Local: Fri, Mar 16 2012 8:48 am
Subject: Re: [mongodb-user] 80k writes/s via php cli

Also, have you checked out

http://php.net/manual/en/mongocollection.batchinsert.php

Sent from my iPad

On 16 Mar 2012, at 20:41, MKN Web Solutions <mich...@mknwebsolutions.com> wrote:

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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.
MKN Web Solutions  
View profile  
 More options Mar 16 2012, 9:59 pm
From: MKN Web Solutions <mich...@mknwebsolutions.com>
Date: Fri, 16 Mar 2012 18:59:26 -0700 (PDT)
Local: Fri, Mar 16 2012 9:59 pm
Subject: Re: [mongodb-user] 80k writes/s via php cli

I'm sure the batch insert would work best on this.  However I wanted to
stress the max # of connections / writes in a potential scenario.  

I'm running PHP 5.3 with this test.  I do have APC enabled, but remember
this is a script that's looping internally and not outside.  So the script
is already being compiled.

The script is as follows:

<?php
$db = new Mongo("mongodb://localhost");
$c = $db->winner;

while(true){
$d = "test 1 2 3";
$insert = $c->ppl->insert( array("x"=>$d) ); //single write

}

?>

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/HSgaWPXW-VoJ.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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.
MKN Web Solutions  
View profile  
 More options Mar 16 2012, 11:13 pm
From: MKN Web Solutions <mich...@mknwebsolutions.com>
Date: Fri, 16 Mar 2012 20:13:39 -0700 (PDT)
Local: Fri, Mar 16 2012 11:13 pm
Subject: Re: [mongodb-user] 80k writes/s via php cli

Using the batch script I was actually able to hit 90k w/s.  My lock ratio
is now 100%.  

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/zL5uLClG86MJ.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

 
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 « Newer topic     Older topic »