On 15/10/12 20:14, David Gerard wrote:
> On 15 October 2012 06:04, Tim Starling <[email protected]> wrote:
> 
>> That's processes, not memory. I would think that the effect on memory
>> would not be so large.
> 
> 
> Memory taken appears to be processes * PHP memory_limit . Unless I'm
> ludicrously wrong about that.

Memory allocated from the PHP request pool (which is limited to
memory_limit) is returned to the system with munmap() after each
request finishes. PHP allocates only as much memory as is required for
the request. So your formula is the maximum amount of memory the
processes could possibly use, it will never actually be reached.

We have noticed that memory allocated by the DOM extension persists
after the request terminates, but the amount of it is not limited by
PHP's memory_limit. Maybe that's what you're seeing. We reduced
MaxRequestsPerChild to 4 to mitigate the effect, and I wrote this:

https://gerrit.wikimedia.org/r/#/c/23923/

> Would Varnish achieve much the same? I'm slightly familiar with
> Varnish (we use it at work and it makes our much-less-stressed LAMP
> box quite happy with no KeepAlive.

Yes, I would expect so.

> We're quite fond of our "This article has been viewed x times" at the
> bottom of the pages, though I'm quite aware that's an expensive
> affectation that we may well have outgrown. *sigh*

You could collect page view statistics with UDP and then incorporate
them into the page with ESI or JavaScript.

-- Tim Starling



_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to