[Catalyst] how many RAM used is normal
Marcello Romani
mromani at ottotecnica.com
Fri Jun 6 10:10:25 BST 2008
Fayland Lam ha scritto:
> we are using Catalyst under mod_perl2. and every httpd is costing
> 130-200M. `top` shows:
>
> 1566 apache 16 0 147m 136m 6188 S 0.0 1.7 0:23.97 httpd
> 1567 apache 16 0 147m 136m 6200 S 0.0 1.7 0:28.51 httpd
> 1568 apache 16 0 143m 132m 6192 S 0.0 1.6 0:23.45 httpd
> 1569 apache 16 0 144m 133m 6192 S 0.0 1.6 0:24.36 httpd
> 1570 apache 15 0 152m 141m 6196 S 0.0 1.7 0:23.45 httpd
> 1571 apache 16 0 141m 130m 6192 S 0.0 1.6 0:24.57 httpd
> 1572 apache 16 0 143m 131m 6196 S 0.0 1.6 0:22.13 httpd
> 1581 apache 16 0 148m 137m 6184 S 0.0 1.7 0:22.56 httpd
> 1582 apache 16 0 142m 131m 6188 S 0.0 1.6 0:22.12 httpd
> 1583 apache 16 0 144m 133m 6192 S 0.0 1.6 0:21.89 httpd
> 1584 apache 16 0 141m 130m 6184 S 0.0 1.6 0:23.20 httpd
> 1587 apache 16 0 151m 139m 6184 S 0.0 1.7 0:23.87 httpd
> 1588 apache 16 0 140m 129m 6180 S 0.0 1.6 0:21.76 httpd
> 1589 apache 16 0 142m 131m 6188 S 0.0 1.6 0:20.75 httpd
> 2128 apache 16 0 138m 127m 6176 S 0.0 1.6 0:09.76 httpd
>
> is it normal under Catalyst+DBIx::Class+Template? or there is something
> wrong?
> What's your Catalyst App costs? Thanks.
>
I suppose that's a 'top' output; memory columns should be: virtual,
resident, shared.
memory usage is thus between 120 and 130 MB for each httpd instance
(e.g. 1360MB resident - 6M shared).
For example, on one of my servers I have vmware server running:
4615 root 5 -10 365m 307m 296m S 0 15.2 81:57.93 vmware-vmx
3905 root 5 -10 381m 304m 291m S 2 15.0 85:41.40 vmware-vmx
resident: 307MB, 296 of which are shared among the two processes.
If all those httpd processes run the same app I think they have should
have more shared memory.
You could probably check if you preload your app in your apache config file.
Something like:
<Perl>
use lib qw(/path/to/MyApp/lib);
</Perl>
PerlModule MyApp;
etc.
HTH
Just my 2 eurocents.
--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com
More information about the Catalyst
mailing list