Welcome! Log In Create A New Profile

Advanced

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis
June 15, 2010 03:26PM
> I will definitely try it but I still looking for equation to set numbers
> like worker_processes, worker_connections & PHP_FCGI_CHILDREN (or PHP_FPM
> counterpart) perfectly.

The basic approach usually as far as I know is to set worker_processes based
on your CPU core count (either identical or sometimes there is benefit
setting with some multiplier - 2*cores (I have seen some improvements when
using nginx as on-the-fly image resizer to utilise the box more)).

worker_connection - typical 1024 or 2048 usually is enough. Bassically the
math is based on max_clients where: max_clients = worker_processes *
worker_connections

Anyways nginx should complain in error log if the settings are too low and
all the workers are exausted (like you have thousands of keepalive/active
connections).


The same with FPM - the basic settings which come with the sample config
should be enough. If you leave the default notice error level log FPM should
tell you if all of the php pool is fully used and there is a need to
increase the setting.

So in short - both of the software products are clever enough to tell you
what could be the optimal setting for you based on the workload of the box.


p.s. remember also to tweak other system settings - like maximum open file
descriptors, tcp port range etc

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 11:39AM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis June 15, 2010 02:08PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 02:18PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

mike June 15, 2010 02:22PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 03:00PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis June 15, 2010 03:26PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Jérôme Loyet June 15, 2010 03:42PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Rahul Bansal June 15, 2010 04:02PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Jérôme Loyet June 15, 2010 04:10PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 04:32PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Piotr Karbowski June 15, 2010 04:36PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Jérôme Loyet June 15, 2010 04:38PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 04:52PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Piotr Karbowski June 15, 2010 05:02PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 05:17PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 05:28PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Piotr Karbowski June 15, 2010 05:34PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis June 15, 2010 05:10PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Jérôme Loyet June 15, 2010 05:18PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis June 15, 2010 05:46PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Jérôme Loyet June 15, 2010 05:52PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 16, 2010 08:20AM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 05:46PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 05:50PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 26, 2010 07:29PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

ericdeko411 June 26, 2010 09:45PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 27, 2010 10:04AM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 03:12PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis June 15, 2010 03:16PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 03:42PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

mike June 15, 2010 04:02PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

rahul286 June 15, 2010 04:12PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

speedway June 17, 2010 10:38PM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Jan Bujk September 09, 2011 08:36AM

Re: Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis September 09, 2011 09:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready