[Catalyst] Catalyst needing LOTS of RAM

Alejandro Imass alejandro.imass at gmail.com
Sat Feb 21 04:06:54 GMT 2009


Although this does not directly address your issue it just might give
you some new ideas for scaling up Catalyst. I agree with many here
that you should profile your app for leaky culprits. Since you don't
give much detail on you platform or other details it's little what one
can recommend.

Anyway, this aside I just want to share that I have had
___excellent___ experience with Apache mod_worker instead of pre-fork.
If your app is designed for a large number of concurrent requests you
will benefit greatly from multi-threaded Apahe mod_worker and Catalyst
with mod_perl. You will be able to spawn many, many more threads with
a lot less overall consumption of RAM. The catch is that you have to
be more careful with leaks, but you can use the special worker MPM
directives like MaxRequestsPerChild which will kill and restart a
child after N requests as safeguard for non-thread safe or leaky
modules.

Best,
Alejandro Imass

On Wed, Feb 18, 2009 at 10:14 AM, Neo [GC] <neo at gothic-chat.de> wrote:
> Hello guys,
>
> after fiddling around with Catalyst+DBIx starup time, here comes my next
> issue:
>
> Is there some way to tune Catalyst to use less RAM? Is there even some kind
> of explanation for the really FAT memory footprint?
>
> Currently, our project allocates 330MB RAM right after startup (with
> myproject_server.pl or fastcgi). Over the time this is getting worse; some
> month after the projects start it used about 80MB and we think with some
> additional controllers and stuff it will need over 500MB. I know there is
> some advent calendar entry about restartig the catalyst-process when it
> reaches a memory limit (what is good - our processes tend to grow up to
> 1GB), but this doesn't help at startup.
> Is this normal behaviour?
>
> The problem is, we use multiple instances of the application. So every
> customer has his own catalyst instance with own database and - of course -
> own fastcgi-process. Currently we are running it on a machine with 16GB of
> RAM and will soon get to the physical and budgetary limits.
> Is Catalyst just not intended for this kind of use (and more like "one
> server, one site") or is there some black magic we just haven't found yet?
>
>
> Btw: Neither reducing the count of the DBIx-models nor disabling the
> debug-mode does have an impact on memory footprint.
>
>
> Thanks and regards,
> Thomas Weber
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



More information about the Catalyst mailing list