Re: Perl-status shows 1 Mb for File::Find!

2001-12-10 Thread Perrin Harkins

> > I do preload the module. How do I find out what it really uses?

In addition to Paul's advice, make sure you understand the output of
your system's top command (or whatever you use to see process size).
Usually there are multiple numbers, and some indicate real memory used
while others indicate real + shared and virtual.  There's info on this
in the guide, and you can use modules like GTop or the size subs from
Apache::SizeLimit to help figure it out.

- Perrin




Re: Perl-status shows 1 Mb for File::Find!

2001-12-10 Thread Paul Lindner

On Mon, Dec 10, 2001 at 06:27:07PM -0500, Vsevolod Ilyushchenko wrote:
> 
> 
> Perrin Harkins wrote:
> > 
> > > I looked at Memory Usage at my perl-status page and was horrified: the
> > > biggest modules are:
> > >
> > > File::Find   1205208 bytes |  2597 OPs
> > > Convert::ASN1::parser1058185 bytes |  3069 OPs
> > >
> > > However, if I go inside File::Find, I can't figure out what takes up so
> > > much space:
> > 
> > It could be internal structures holding the state.  Are you pre-loading this
> > module?  It probably doesn't really use 1MB in each process.
> 
> Perrin,
> 
> I do preload the module. How do I find out what it really uses?

Can you start your server without File::Find or Convert::ASN1::parser?
Assume that you have the following commented directive in your
httpd.conf file:

 #PerlModule File::Find

Start your httpd server and look at the memory usage.  In my case I
checked out /proc/PID/status on my linux box.  In this case it shows

  VmSize: 8036 kB

Next, uncomment out the directive line, restart and look at the memory
usage...  In my case it shows as:

  VmSize: 8380 kB

So, about 300k in this instance..  YMMV


-- 
Paul Lindner   [EMAIL PROTECTED]| | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org
 Human Rights Declaration   http://www.unhchr.ch/udhr/index.htm



Re: Perl-status shows 1 Mb for File::Find!

2001-12-10 Thread Vsevolod Ilyushchenko



Perrin Harkins wrote:
> 
> > I looked at Memory Usage at my perl-status page and was horrified: the
> > biggest modules are:
> >
> > File::Find   1205208 bytes |  2597 OPs
> > Convert::ASN1::parser1058185 bytes |  3069 OPs
> >
> > However, if I go inside File::Find, I can't figure out what takes up so
> > much space:
> 
> It could be internal structures holding the state.  Are you pre-loading this
> module?  It probably doesn't really use 1MB in each process.

Perrin,

I do preload the module. How do I find out what it really uses?

Thanks,
Simon
-- 
Simon (Vsevolod ILyushchenko)   [EMAIL PROTECTED]   
http://www.simonf.com  [EMAIL PROTECTED] 

"A man who feels himself a citizen of the world whose 
loyalty is to the human race and to life, rather than 
to any exclusive part of it; a man who loves his country 
because he loves mankind, and whose judgement is not 
warped by tribal loyalties." Erich Fromm



Re: Perl-status shows 1 Mb for File::Find!

2001-12-10 Thread Perrin Harkins

> I looked at Memory Usage at my perl-status page and was horrified: the
> biggest modules are:
>
> File::Find   1205208 bytes |  2597 OPs
> Convert::ASN1::parser1058185 bytes |  3069 OPs
>
> However, if I go inside File::Find, I can't figure out what takes up so
> much space:

It could be internal structures holding the state.  Are you pre-loading this
module?  It probably doesn't really use 1MB in each process.
- Perrin