I'm on Linux. I've also tried to use agents but there was no
difference (but I'm not doing frequent requests to the same server
many times).

I have some progress with this problem: I wrongly assumed Node uses
truly asynchronous DNS resolution via c-ares. This turned out not to
be the case - the documentation says it uses getaddrinfo(3) system
call in a thread pool.

My hypothesis is that this is the same thread pool that handles I/O
and I've hit some limit of this thread pool with DNS resolution, so
the requests there - for both DNS and I/O - have been queued.

I switched to doing the DNS resolution using dns.resolve4 which uses c-
ares and now the delay in disk I/O is happening at much higher load in
terms of requests per second; the network may actually be saturated.
But it still happens.

Nikola



On Mar 5, 2:45 pm, mscdex <[email protected]> wrote:
> On Mar 5, 4:43 am, Nikola Toshev <[email protected]> wrote:
>
> > Http requests also begin to take a while to complete even though the
> > network pipe is not saturated. I'm using local DNS caching and it does
> > help somewhat, but I'm still not able to go beyond 100 or so http
> > requests per second, with CPU usage <10% and network not being
> > saturated. I use agent:false for the http requests. Again, I expect to
> > be able to saturate the network connection before such slowdowns start
> > happening.
>
> What OS are you on and have you tried using agent(s) instead in order
> to reuse sockets?

-- 
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