php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62160 Add process.priority to set nice(2) priorities
Submitted: 2012-05-25 17:26 UTC Modified: 2012-05-26 16:26 UTC
From: geeky at geeky dot de Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.4.4RC1 OS: Debian 6.0
Private report: No CVE-ID: None
 [2012-05-25 17:26 UTC] geeky at geeky dot de
Description:
------------
It would be nice if a pool could be set to "low priority pool" (or even set a 
priority).

Example: a website consisting of two parts:
(1) frontend: responsive-time is essential here
(2) background-synchronisation: should not slow down frontend, response-time is 
not important.

In this case the background-pool should only use minimal/unused cpu-time in order 
to keep the frontend-pool at full speed.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-25 19:27 UTC] fat@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: fat
 [2012-05-25 19:29 UTC] fat@php.net
FPM is not design to manage priority between its processes. It just 
stop/start/restart/watch them.

One thing which can be done is to play with nice(2) or setpriority(2).

We can add a priority=[-19,20] parameter in the configuration file for each pool 
and the corresponding priority will be set when processes will be created.

Is that something that can fit your needs ?

thx for the answer.

++ fat
 [2012-05-25 19:44 UTC] geeky at geeky dot de
Yes, that would be perfect
 [2012-05-26 16:21 UTC] fat@php.net
-Summary: Add Option: Low-Priority Pool +Summary: Add process.priority to set nice(2) priorities
 [2012-05-26 16:24 UTC] fat@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f6655b62d8273a4d1276d98491bf49bb197821fe
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2012-05-26 16:24 UTC] fat@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=decc394a2089b955a175aed0091044d0fc3d1aab
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2012-05-26 16:24 UTC] fat@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7127135c8705d947a01ee637444c1db2adf37b1d
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2012-05-26 16:26 UTC] fat@php.net
-Status: Analyzed +Status: Closed
 [2012-05-26 16:26 UTC] fat@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Added process.priority to [general] and to pools section in the configuration 
file.

[general]
...
process.priority = 4
...
[pool_high_prio]
...
process.priority = -15
...
[pool_low_prio]
...
process.priority = 15
...
 [2012-05-29 10:27 UTC] ab@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f6655b62d8273a4d1276d98491bf49bb197821fe
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2012-05-29 10:27 UTC] ab@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=decc394a2089b955a175aed0091044d0fc3d1aab
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2012-07-24 23:35 UTC] rasmus@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7127135c8705d947a01ee637444c1db2adf37b1d
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2013-11-17 09:32 UTC] laruence@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7127135c8705d947a01ee637444c1db2adf37b1d
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2014-10-07 23:24 UTC] stas@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=decc394a2089b955a175aed0091044d0fc3d1aab
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2014-10-07 23:24 UTC] stas@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=f6655b62d8273a4d1276d98491bf49bb197821fe
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2014-10-07 23:35 UTC] stas@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=decc394a2089b955a175aed0091044d0fc3d1aab
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 [2014-10-07 23:35 UTC] stas@php.net
Automatic comment on behalf of fat
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=f6655b62d8273a4d1276d98491bf49bb197821fe
Log: - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC