[PATCH] hgwebdir: return memory to the OS after each request

Antoine Pitrou solipsis at pitrou.net
Tue Jul 3 14:41:14 CDT 2012


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 :-)

> 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.


More information about the Mercurial-devel mailing list