Welcome! Log In Create A New Profile

Advanced

How does FPM choose a worker process?

Posted by Edward Hibbert 
Edward Hibbert
How does FPM choose a worker process?
May 29, 2012 12:52PM
Apologies if this is a FAQ.

I'm using FPM on a machine with limited memory. I have quite a few
processes because I want to avoid the performance hit of spawning new
processes. But because I have limited memory, I would prefer it to
send requests to the same small set of processes; this would reduce
the working set of memory required and therefore reduce swapping.

For example, if I have 50 processes, but my normal load only requires
5 processess, I would like it to always use processes 1-5, and only
use process 6 if processes 1-5 are busy.

So, how does FPM choose a new process to send a request to?
Jérôme Loyet
Re: How does FPM choose a worker process?
May 29, 2012 12:56PM
2012/5/29 Edward Hibbert <edwardhibbert59@googlemail.com>
>
> Apologies if this is a FAQ.
>
> I'm using FPM on a machine with limited memory.  I have quite a few
> processes because I want to avoid the performance hit of spawning new
> processes.  But because I have limited memory, I would prefer it to
> send requests to the same small set of processes; this would reduce
> the working set of memory required and therefore reduce swapping.
>
> For example, if I have 50 processes, but my normal load only requires
> 5 processess, I would like it to always use processes 1-5, and only
> use process 6 if processes 1-5 are busy.
>
> So, how does FPM choose a new process to send a request to?

The "loadbalancing" between process is done arbitrarily by the kernel
(a kind of round robin on the process in the listening state I guess).
There is no way with this implementation to achieve what you're
willing to. It would requires a lots of changes to the FPM code. sorry

++ fat
Edward Hibbert
Re: How does FPM choose a worker process?
May 29, 2012 01:12PM
Well, that's clear. Thanks.
Tyler Eaves
Re: How does FPM choose a worker process?
June 20, 2012 02:56PM
Why not address the memory situation? RAM is so dirt cheap these days
theres really no excuse for starving a server of memory.

On Tuesday, May 29, 2012 12:58:46 PM UTC-4, Edward Hibbert wrote:
>
> Well, that's clear. Thanks.
>
Przemysław Pawliczuk
RE: How does FPM choose a worker process?
June 21, 2012 10:32AM
Have you forgotten about VPSs? There’s no such amounts of RAM.



From: highload-php-en@googlegroups.com [mailto:highload-php-en@googlegroups.com] On Behalf Of Tyler Eaves
Sent: Wednesday, June 20, 2012 6:31 PM
To: highload-php-en@googlegroups.com
Subject: Re: How does FPM choose a worker process?



Why not address the memory situation? RAM is so dirt cheap these days theres really no excuse for starving a server of memory.

On Tuesday, May 29, 2012 12:58:46 PM UTC-4, Edward Hibbert wrote:

Well, that's clear. Thanks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 248
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