Skip to main content

DEBATE on PHP-FPM I feel that it's a layer on top of an other layer

Comments

6 comments

  • cPRex Jurassic Moderator
    Hey there! PHP-FPM does get enabled on servers running the WordPress Toolkit software, so there are likely many users running it that don't even notice. It could be that your particular machine doesn't have enough resources to properly run PHP-FPM, as we require at least 2G of RAM, or 30M of RAM per domain on the machine, for that to be an efficient service. Details on the configuration values are outlined here:
    0
  • Jintor
    Hi @cPRex , Wordpress is not a good example because I prefer creating my own library from scratch. ( over the years, I've tried other libs, but with my homemade ones, I always get better performance ) for argument sake let's stay with the most basic example : index.php with the following : // no ob_start, flush, ob_flush.... for this example : php.ini have output_buffer to off and implicit_flush on ** in real world it would be more like move_uploaded_file stuff then shell_exec(ffmpeg....) nested within a while loop that echos status every x seconds..... I tested many configurations : even 8 CPU with 16 GIG RAM with SSD (all the good stuff) dedicated servers..... What I noticed during ALL tests I performed is the following : "" NO matter what CPU, RAM, Disk (even 1cpu vs 16 cpu) when I hit index.php 3 scenarios : ""1"" php-fpm present in the server (installed and set to on) => I wait, wait, then 12, after it's a bit ok, wait 3, then 3, wait 3 than 4 ""2"" php-fpm present in the server (installed and set to off) => I wait, wait, then 12, after it's a bit ok, wait 3, then 3, wait 3 than 4 ==>> the EXCAT SAME on or off have the same issue ""3"" php-fpm completely removed WHM tells me php-fpm "unavailable" => NO wait : 1, then wait 3, 2 wait 3, and so on Do you see a bit more clearer my point ? Just the fact that php-fpm exists in the server => there is a wait. **** an other point : one of my site is a RSS aggregator... some rss feed points to images that don't exists, => when that happens, php-fpm hang and CPU goes 1000% without stop (if you have access to consult tickets see ID : 94334980 ) A level 2 pointed out this "It is possible that this is simply being held open which is causing the load and the process to never complete."
    0
  • cPRex Jurassic Moderator
    WordPress was just one example I picked to indicate that many users probably have PHP-FPM running and may not even know it, as the WordPress Toolkit tools are dependent on PHP-FPM. I know there was a large amount of performance testing done on our side before PHP-FPM was released, but I don't have any specific data I can share in that regard. Our technician in ticket 94334980 also determined that the scripts in question had been running for several hours and recommended reviewing those to see if they are working as intended.
    0
  • Jintor
    @cPRex The script was not faulty because the moment I remove php-fpm : the same script without modifications worked all ok.
    0
  • Handssler Lopez
    I just add that on different servers running the latest version of cPanel + cloudlinux or centos7 + cpanel I decided to use php-fpm since almost all accounts use cms like joomla / worpress / prestashop / drupal, etc. Actually, if there is an improvement in the speed of loading and execution of the sites when activating fpm, logically the configuration was adjusted based on the needs and resources of each server. * I have another server where I don't run fpm as it performs better without fpm as I mentioned @cPRex it is best to evaluate when to use php-fpm or not.
    0
  • jndawson
    Point of information: If you are runing CloudLinux and lsapi, do not use php-fpm - they basicallydo the same thing and the CL docs specifically say don't run both.
    0

Please sign in to leave a comment.