Re: Question abou PHP 8.2/8.3 in Kubernetes/OpenShift

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-10-08 (Di.) 15:28, AllenJB wrote:
On 08/10/2024 11:29, Alex wrote:
We run CraftCMS in OpenShift and have no limits defines, that means that PHP can use the whole 8 CPUs and 32 GB RAM.

The Problem is that we see that PHP only uses ~200M-500M.

Have anybody some tips how to check what's the limiting factor in PHP is so that we can tune it?

Do you have an actual performance problem (beyond "not using a lot of memory") you're trying to solve? (If so, what?)

The Problem is that the CraftCMS response time isn't that fast as expected.
I know, that's not very helpful :-/

eg. Are specific requests "slow"? Are you getting error messages or undesired behavior?

Well that's what we now need to investigate.

PHP won't use memory unless it's actually needed. The default php-fpm/mod_php run model means that each request starts PHP scripts from scratch with no knowledge of other requests. Most requests will need no more than around 2MB of memory. More will only be required for specific tasks such a working with image files or large imports/exports.

Thank you for your answer, with that can we check how to debug the behavior so that it's possible to ask better question.

I Just was not sure if PHP/PHP-FPM have an internal limiting factor besides the memory_limit .

Individual PHP-FPM workers will only hold onto the maximum system memory ever used by any request that specific worker handled (so resets if either process idle timeout or max requests pm. settings are reached, depending on which pm mode is used).

Unlike some server software (eg. databases), PHP doesn't keep a lot in memory in the name of performance. This is something PHP scripts and applications are expected to handle themselves - for example, by utilizing caches such as memcached/redis/valkey or alternative application architectures (long running application servers)

Given you're working with a specific application/framework (CraftCMS), you may get better answers about configuration tuning or specific performance issues from their community resources and support.

Regards
Alex



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux