nginx, worker_processes, and passenger_max_pool_size

2,550 views
Skip to first unread message

Trevor Turk

unread,
Sep 18, 2009, 10:45:40 AM9/18/09
to Phusion Passenger Discussions
I wondered if someone could clarify the relationship between the
number of nginx workers and passenger workers. If I have a config like
this:

worker_processes 6;
http { passenger_max_pool_size 20; }

...will there still be a limit of 20 passenger workers among the 6
nginx workers, or is the passenger limit a per-nginx-worker value? It
looks like the passenger_max_pool_size value is maintained no matter
how many nginx worker process you have, but I wanted to check in any
case.

Thanks,
- Trevor

Hongli Lai

unread,
Sep 23, 2009, 11:09:35 AM9/23/09
to phusion-...@googlegroups.com

The Phusion Passenger pool size is independent from the number of
Nginx worker processes that you have.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Trevor Turk

unread,
Sep 23, 2009, 11:38:33 AM9/23/09
to Phusion Passenger Discussions
On Sep 23, 10:09 am, Hongli Lai <hon...@phusion.nl> wrote:
> The Phusion Passenger pool size is independent from the number of
> Nginx worker processes that you have.

Thanks very much for the reply. I wonder if you (or anyone else) knows
of some rough guides about how the two sets of workers relate to each
other. I'm currently using 6 nginx workers to 20 passenger workers,
but I have no idea how to tell if this is a good relationship or not.
What I mean is, perhaps 4 nginx workers to 20 passenger workers would
be better, but I don't know how to tell what is a good balance.

Thanks!
- Trevor

Hongli Lai

unread,
Sep 23, 2009, 12:18:30 PM9/23/09
to phusion-...@googlegroups.com
On Wed, Sep 23, 2009 at 5:38 PM, Trevor Turk <trevo...@gmail.com> wrote:
> Thanks very much for the reply. I wonder if you (or anyone else) knows
> of some rough guides about how the two sets of workers relate to each
> other. I'm currently using 6 nginx workers to 20 passenger workers,
> but I have no idea how to tell if this is a good relationship or not.
> What I mean is, perhaps 4 nginx workers to 20 passenger workers would
> be better, but I don't know how to tell what is a good balance.

Setting the number of Nginx workers to the number of CPU cores should
be sufficient.

Trevor Turk

unread,
Sep 23, 2009, 12:29:37 PM9/23/09
to Phusion Passenger Discussions
On Sep 23, 11:18 am, Hongli Lai <hon...@phusion.nl> wrote:
> Setting the number of Nginx workers to the number of CPU cores should
> be sufficient.

Thanks very much. This is really helpful information.

Thanks,
- Trevor
Reply all
Reply to author
Forward
0 new messages