I'll outline some difference between your php and node implementation and 
share my results

1) Apache runs multiple workers / threads. You'll need to use cluster in 
your node script to match this.
2) mysql_connect in php does implicit connection pooling. Use 
"createPool()" in node script

My results using cluster/pool  and wrk as load generator ( "wrk -t 10 -c 
100 -d 100s http://localhost:9615/"; ) - 
https://gist.github.com/sidorares/5f90ecb853c902786338

php ~500 resp/sec
node ~3000 resp/sec


On Sunday, 1 March 2015 09:24:17 UTC+11, Anirban Bhattacharya wrote:
>
> Tom, 
> Thanks for taking yourbtime going through the code. 
> I did add connection.createPool as you suggested when I startes this post. 
> But didn't see much difference so removed. 
>
> You are right i mixed up my two thkughts in one i tried to test with 
> default of both, in other i was assuming they are having similar 
> configuration. 
>
> So the failures in apache for 15 mins run is probably due to Apache 
> started rejecting new proccesses as anymore proceas could maxout runtime 
> memory. 
>
> I didn't understand the point you said the query size is greater than 1 in 
> node. What is that? 
>
> Yes I may do pool in both and see again.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/1acca32e-9ec8-4842-b419-e4fbf33dd2f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to