On Thursday, March 1, 2012 11:50:21 PM UTC+1, Ben Noordhuis wrote:
>
> On Thu, Mar 1, 2012 at 22:16, Erik Dubbelboer <[email protected]> wrote:
> > Hi Everyone,
> >
> > I was wondering what the status is for this API. I couldn't find 
> anything in
> > the current documentation so I'm guessing it hasn't been implemented yet?
> >
> > If this is the case I guess I could take a look at it since it would 
> really
> > be nice to have this for machines with a lot of cores in them.
>
> The relevant code moved out of node and into libuv (and it's something
> of an implementation detail there, uv-win has its own thread pool).
>
> I'd be interested in benchmarks that show (or don't show as the case
> may be) when the number of threads is a bottleneck and what the sweet
> spot is. Farming out I/O to a thread pool definitely hurts performance
> but there's not enough data to make reasoned guesses about the actual
> impact or the best remedy. Is that something you feel like taking on?
>

Calling eio_set_min_parallel() from a module still seems to work (only on 
unix I guess). What exactly has moved to libuv?

I have thought about our problem and the 4 threads isn't really the issue. 
We used a mysql module that uses libmysql's mysql_query() which is a 
blocking call. So a couple of slow queries blocked our whole application. 
We have fixed this by moving to node-mysql which implements the mysql 
protocol in javascript and doesn't have this problem. So increasing the 
thread count would only delay the problem for us and won't really fix it.

I think the biggest problem here is that this nodejs behaviour isn't 
documented all to well. I was always under the assumption that nodejs would 
automatically spawn more threads when needed.
Obviously the mysql module developers that use libmysql's mysql_query() and 
the people that use these modules have no idea that this thread problem 
exists. Which makes me wonder how many more C modules there are that are 
doing blocking calls.

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to