APM: Apache mod_perl and large memory data cache

Evan Harris eharris at puremagic.com
Sun Sep 14 03:29:48 CDT 2003


I have a mod_perl application that I need to store a large amount of data in
ram, in the form of a huge multilevel hash.  The problem is that apache
seems to store this data in each child process, meaning I have apache child
processes with a larger than 50meg memory footprint, which is way too big.

It's my understanding that I can use a startup file to preload things,
but the functions to load the data use many of the request r-> functions,
which I don't have access to in the startup file.

I may be able to rewrite my functions not to use the request functions, but
I don't want to embark on that task unless I know for sure that the
resulting data structure will reside in shared memory space.  Does anyone
know for sure?  Is there another (better) way to do this?

Evan




More information about the Austin mailing list