Welcome! Log In Create A New Profile

Advanced

Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

June 15, 2010 11:39AM
First - all my servers are running fine. Thanks a ton to nginx! Lately, I have been brainstorming a lot on 3 configuration variables to squeeze maximum performance that I can get from my hardware.

[b]3 variables of my interest are:[/b]
[list=1]
[*] worker_processes
[*] worker_connections
[*] PHP_FCGI_CHILDREN
[/list]

I searched extensively on Google, mailing lists, wiki, etc but till date couldn't find any robust guide as on how these affects performance and other aspects of my webserver/webapp.

As I am aiming for very-very high traffic configuration, I will first move all images/js/css load to CDN.
So my nginx will be mostly busy in dealing PHP stuff.
[list]
[*] So will it make more sense to increase PHP_FCGI_CHILDREN or worker_processes?
[*] Is it good to make [i]PHP_FCGI_CHILDREN = 1[/i] if I am using APC for PHP opcode caching?
[/list]

If I want to achieve number of 100,000, then what is difference between following arithmetic:
[list]
[*] 10 worker_processes * 10,000 worker_connections * 1 PHP_FCGI_CHILDREN
[*] 10 worker_processes * 1,000 worker_connections * 10 PHP_FCGI_CHILDREN
[*] 10 worker_processes * 100 worker_connections * 100 PHP_FCGI_CHILDREN
[*] 1 worker_processes * 1000 worker_connections * 100 PHP_FCGI_CHILDREN
[*] 1 worker_processes * 100,000 worker_connections * 1 PHP_FCGI_CHILDREN
[/list]
I know this arithmetic is not straight-forward as 3 variable controls 3 different aspects. But how does they impact each other? How amount of RAM, traffic pattern, PHP/non-PHP traffic ratio affects them?

In short, what are all parameters I must consider?

Sorry if some of my questions sounds lame. But I really wants to dig deeper into nginx config for high traffic load.
Also if you think I am totally going in wrong direction, please feel free to correct me.

Thanks,
-Rahul

--
Rahul Bansal
EasyEngine - https://github.com/rtCamp/easyengine
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: 228
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