in reply to finding all modules used from a script

Looking in %INC and using can will help you here, but I'm not sure this approach will work as well as the MaxRequestsPerChild limit.

I'm not aware of any Perl implementation that released freed memory back to the OS. If you're really aggressive, you may be able to keep reusing the same pool of memory for big operations, but if you have one uncommon operation that requires a couple of megs (say, IO::Socket), you'll not gain much. The conventional wisdom I've seen recommends reaping mod_perl processes somewhere between 30 and 50 requests.

Let us know your results -- I'd be interested to see a comparison.

  • Comment on Re: finding all modules used from a script

Replies are listed 'Best First'.
RE: Re: finding all modules used from a script
by AgentM (Curate) on Oct 31, 2000 at 06:42 UTC
    Actually Mac OS' Memory Manager is pretty apt at detecting low mem or mem2spare and can return it to the OS during runtime- of course, this has an effect on how one uses pointers, but it's not overly complicated. This is built into the Mac OS and is taken advantage of by MacPerl. Just a note!

    Update: So it's true what everyone else says; you need to fork to actually be able to release memory back to the OS which is what Apache does in handling clients (which is configurable). Basically, the UN*X memory model is eat as much memory as allowable until crash or exit() (the max mem usage is configurable via hard and soft limits and compile-time options).

    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.