Req #81536 [Com]: Add ini option to not retain cached allocator chunks across requests

From: Date: Tue, 31 Jan 2023 11:15:12 +0000
Subject: Req #81536 [Com]: Add ini option to not retain cached allocator chunks across requests
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243597@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81536&edit=1

 ID:                 81536
 Comment by:         neskemiquel at gmail dot com
 Reported by:        dev at alepe dot com
 Summary:            Add ini option to not retain cached allocator chunks
                     across requests
 Status:             Open
 Type:               Feature/Change Request
 Package:            Performance problem
 Operating System:   Linux
 PHP Version:        7+
 Block user comment: N
 Private report:     N

 New Comment:

The APC extension from retaining cached allocator chunks between requests and will free up memory
each time a request is processed. Note that disabling this cache may have a negative impact on
performance, so it's important to carefully evaluate the trade-offs before making this change.

<https://www.portal4me.org/>github.com


Previous Comments:
------------------------------------------------------------------------
[2021-10-19 04:23:55] dev at alepe dot com

Assuming the problem comes from Zend Engine Memory management I agree with nikic@php.net, setting an
option to turn ON/OFF this feature would be useful for hosting companies.

------------------------------------------------------------------------
[2021-10-18 10:19:15] dev at alepe dot com

I forgot to mention that I also tried it directly (without the php.ini directives). It always
returns "0".

------------------------------------------------------------------------
[2021-10-18 10:16:23] dev at alepe dot com

I think the related bug report may be related, however executing gc_mem_caches()
didn't worked for me. I added it in both: auto_prepend_file and
auto_append_file directives. I confirmed the code is being executed. Tested in two
separate containers in two separate servers (hosts).

------------------------------------------------------------------------
[2021-10-18 08:48:33] nikic@php.net

It would probably make sense to add an ini option to not retain cached allocator chunks across
requests. The current caching strategy assumes that the PHP process is going to be rapidly reused,
which is not the case in this particular setup with many rarely accessed sites served by independent
PHP processes.

------------------------------------------------------------------------
[2021-10-18 08:18:59] cmb@php.net

This looks like a duplicate of bug #80108.

Also note that PHP 7.3 is no longer actively supported[1].

[1] <https://www.php.net/supported-versions.php>

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=81536


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


Thread (7 messages)

« previous php.bugs (#243597) next »