Bug->Req #68824 [Opn]: php-rpm pm=static causes load peaks when pm.max_requests is reached

From: Date: Sat, 04 Dec 2021 21:12:25 +0000
Subject: Bug->Req #68824 [Opn]: php-rpm pm=static causes load peaks when pm.max_requests is reached
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238178@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68824&edit=1

 ID:                 68824
 Updated by:         bukka@php.net
 Reported by:        rainer-phpbugs at 7val dot com
 Summary:            php-rpm pm=static causes load peaks when
                     pm.max_requests is reached
 Status:             Open
-Type:               Bug
+Type:               Feature/Change Request
 Package:            FPM related
 Operating System:   linux
 PHP Version:        5.6.4
-Assigned To:        
+Assigned To:        bukka
 Block user comment: N
 Private report:     N

 New Comment:

This is the way how the accept scheduling works - this could be improved by using epoll which we
might need for other things (e.g. bootstrapping) as well. See related discussion for more details in
this pr (it is for ondemand but the actual loop is not mode dependent): https://github.com/php/php-src/pull/4101

I'm changing this to request as it is more feature request though.


Previous Comments:
------------------------------------------------------------------------
[2015-01-13 11:29:19] rainer-phpbugs at 7val dot com

Description:
------------
By design, php-fpm starts all pm.max_children at the same time, and therefore, will also re-start
all children roughly at the same time when they reach  pm.max_requests. This causes the load on the
Server, as well as latencies to increase until all children are re-started, their caches warmed up
etc.

It would be preferable to randomize the number of requests until a child is reaped, instead of
always using exactly pm.max_requests. For example, a random value within  pm.max_requests plus or
minus 10% could be chosen for each child.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68824&edit=1


Thread (2 messages)

« previous php.bugs (#238178) next »