[Catalyst] server memory usage

Jorge Gonzalez jorge.gonzalez at daikon.es
Mon Apr 11 13:54:19 GMT 2011


You can be assured that it's being done that way. Certainly all modern 
operating systems do Copy-On-Write on memory pages, which means that 
several processes with a common set of code will share much of it.  This 
is not being done by Apache/fastcgi/Catalyst, but by the very operating 
system itself.

Linux even has a recently added capability called KSM (kernel same-page 
merging) which does this even with completely unrelated processes, based 
on the bare memory contents (which is pretty much more difficult than 
the original case, by the way).

Regarding your question, since lots of processes have lots of shared 
memory chunks, it's difficult to "blame" some process or another for 
using a memory region. You can use "top" to spot the memory usage of 
processes, looking at the VIRT, RSS and SHR columns. I'd use the RSS 
column, but certainly the sum of this column will be much greater than 
your physical RAM in a loaded server (due to shared pages).

Regards
J.

El 11/04/11 15:07, John M. Dlugosz escribió:
> Looking at the server's processes, I see three of 
> script/myapp_fastcgi.pl, which I suppose co-inside with the Apache 
> configuration option where I said to start 3 fastcgi processes to 
> handle this app.
>
> WebMin tells me "size", which can't be the actual load of server RAM 
> needed since it doesn't add up with the total usage.
>
> Some basics here... is Apache/fastcgi/Catalyst smart enough to load 
> the app and get it running to the point where it is ready to start 
> handling requests, and THEN fork it?  The Perl runtime and all the 
> loaded modules can certainly be shared!  Do I need more advanced 
> configuration or app tuning to maximize this ability?
>
> How can I tell, through WebMin or command-line tools via ssh, how much 
> memory is really being used by my apps?
>
> Thanks for any pointers!
> --John
>
>
> _______________________________________________
> 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