Quantcast
Channel: DOCU - Foren
Viewing all articles
Browse latest Browse all 6559

Administration - Installation - Core: Re(3): Apache 2.4 MPM Worker mode and PHP-FPM

$
0
0
hi!
My experiences with FPM were mostly bad. I am not shure if ILIAS is threadsafe. Does anyone know about that?

The next problem was for me to get the best value for pm.max_children. I tried this on Ubuntu:



  • free -hl

  • Value A: Note the value High/used. Example: 2.3G. This the value that says how many the server needs for itselfe

  • Value B: Note the value Mem/total. Example: 4.0G.

  • cd /opt/scripts

  • Vistit https://github.com/pixelb/ps_mem/blob/master/ps_mem.py

  • Copy the script to clippboard

  • nano ps_mem.py

  • Paste in the script code

  • Save and exit nano

  • chmod +x ps_mem.py

  • Run it: python ps_mem.py | grep php-fpm

  • Value C: Note the result. Example: 2.2 MiB +   6.1 MiB =   8.2 MiB. Its the fpm process size. Repeat this step when your server is on load.

  • Value D: Calculate value for pm.max_children: (B-A)/C=D . Round the values. Do not mess with the units! GiB and MiB (1 GiB=1024 MiB)



The problem here was that a fpm process size can have very different values, deppending on the server load. Value D diifered between 300 MB or 8 GB. And I run often into timeouts with FPM. 

So I decided to optimize prefork and with that I am very happy and successfull. I documented my way here: https://bbs-ilias.de/ilias/goto.php?target=pg_105_187&client_id=info

I
 have 96 GB RAM and the server consumes never more than 38GB with 400 Users and the server always very fast. The 32 threads  are loaded with 20%. No more timeouts.



Viewing all articles
Browse latest Browse all 6559

Trending Articles