3 messages in ru.sysoev.nginxoptimizing worker processes usage
FromSent OnAttachments
Manlio PerilloSep 24, 2007 4:45 am 
Igor SysoevSep 24, 2007 12:21 pm 
Manlio PerilloOct 1, 2007 2:31 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:optimizing worker processes usageActions...
From:Manlio Perillo (manl@public.gmane.org)
Date:Sep 24, 2007 4:45:31 am
List:ru.sysoev.nginx

Hi.

Doing some tests with mod_wsgi, I have found some "problems" with worker processes usage.

I have worker_processes set to 2 (and I have a Dual Core CUP).

When a WSGI app "quickly" return a chunk of data (and write it at once), nginx seems to use only one process, serializing all the requestes.

How can I optimize the code so that nginx can use all the worker processes?

I have found that if the WSGI app calls, as an example, sleep(0.01), then nginx will use all of its worker processes (but this slow down the response time: 159.52 req/sec vs 2848.19 req/sec)