[PATCH] hgwebdir: return memory to the OS after each request
Augie Fackler
raf at durin42.com
Tue Jul 3 20:36:54 CDT 2012
On Jul 3, 2012, at 3:41 PM, Antoine Pitrou wrote:
> On Tue, 03 Jul 2012 14:09:13 -0500
> Matt Mackall <mpm at selenic.com> wrote:
>>
>> I'm afraid I think this patch is about three steps backwards.
>>
>> a) we should eventually share repo objects across requests
>> b) ..so that we can actually take advantage of their caches
>
> Well, uncontrollable caching is not something we would like. We have
> zero CPU problems, however we've had some memory consumption
> problems :-)
Can you enable one of the many WSGI middleware tools for doing heap analysis to see what newly-reapable cycles are lurking after running some requests?
>
>> c) we should avoid relying on the cyclic garbage collector
>>
>> If you've found evidence of a reference cycle on repo objects, that's
>> newsworthy around here, and something we should properly find and fix,
>> not paper over.
>>
>> Are you using any extensions? What does your WSGI configuration look
>> like? How many threads?
>
> eol is enabled on a per-repo basis. There are also pager, progress,
> hgcia, interhg, graphlog and color, but they don't sound likely to
> interfere.
>
> The WSGI configuration is a mod_wsgi daemon process group with 12
> processes and 4 threads per process:
>
> WSGIDaemonProcess hgweb user=hg group=hg \
> python-path=/data/hg/lib/python \
> threads=4 processes=12 \
> inactivity-timeout=300 \
> display-name=hgweb
>
> Note that this came after migrating hg.python.org from a 32-bit to a
> 64-bit system (and probably a newer kernel and glibc), ballooning
> memory consumption quite a bit.
>
> Regards
>
> Antoine.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list