Sorry for the late reply to everyone was at the track with my Kids all
weekend racing so now to play catchup :).

I probably didn't word that very well at all. I was saying that since each
instance of Node will run in a separate process that the # of cores matters
more than processor speed from what I have seen.  Now I will say that we
have our code separated into service families with each family running in a
different instance of node and communicating either over IPC (local), TCP
(in network remote), and REST over HTTP (public remote) for RPC.  (on
second read that seems more complex LOL)

We have matched down our stack per machine to 2 node processes per core +1
(each) for OS and MongoDB usage.  Nearness is used to decide what gets
turned on on each stack (everything gets deployed but machines don't run
the full stack), so two families that are likely to call between each other
(hopefully one high load and one low) are placed on the same physical
machine.  Things that don't call one another are placed on completely
separate machines.  Replication is handled by MongoDB.

When we placed it all on one single "machine" (I have to admit its a VM in
a service center and I have no idea what "it" is) having the same # of
cores, RAM, etc the server actually ran slower than when it was balanced
across multiple "smaller" machines totaling the same specifications (# of
cores and RAM).

Thinking about this (and going back some years so my info is dated) this
makes perfect sense as you should be lowering the task switch (even if it
is pico seconds per switch) and there is no need to balance across multiple
processors since in the case of i series processors the cores are on the
same silicon pointing at the same IO Bus.  In the server I'm guessing (4x4,
4x8, or 8x8) that we are running into the VM "load balancing" across the
processors thus causing more latency than we experience on the multiple
machines config.  Course I could be wrong :)

But, I digress, what I'm really interested in is what others
experiences have been with hardware setups and hosting?

 - Jeremy

On Fri, Apr 20, 2012 at 12:04 PM, Tim Caswell <t...@creationix.com> wrote:

> Jeremy, are you saying that 3 node processes on three dedicated machines
> is faster than one node process on one beefy machine?
>
> If you want to use all n cores on a machine you need n node processes on
> that machine.  And yes, node is mostly single threaded.  Some things like
> fs.* and zlib.* use a thread-pool so that they don't block the main thread,
> but your js code will always run in the main thread.
>
>
> On Fri, Apr 20, 2012 at 12:00 PM, Ryan Schmidt <google-2...@ryandesign.com
> > wrote:
>
>>
>> On Apr 20, 2012, at 07:40, Jeremy Darling wrote:
>>
>> > Just curious what experiences others have had with hardware and hosting
>> multi-process Node app stacks using MongoDB (or similar)?  So far my
>> testing has shown that a cluster of smaller (3 - i5's with 8GB Ram and
>> 120GB SSD's) machines out performs a single massive server (4x4 with 64GB
>> Ram and 120GB NAS fiber attached storage).  This isn't too surprising
>>
>> It is to me.. why would that be the case?
>>
>> > since node basically allocates a single core per running process,
>>
>> What do you mean? I didn't think node "allocates" anything; I thought
>> *you* allocate node processes by using cluster to start as many of them as
>> is appropriate for the size of your server.
>>
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> 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 post to this group, send email to nodejs@googlegroups.com
>> To unsubscribe from this group, send email to
>> nodejs+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> 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 post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to