This is a discussion on Re: Reducing memory usage using fewer cgi programs - modperl ; On 25.10.2008 13:34 Clinton Gormley wrote: > I think there was some confusion here about what was being said. > > Michael Peters' comment about memory reuse was saying that: > - if at runtime, you load a large memory ...
On 25.10.2008 13:34 Clinton Gormley wrote:
> I think there was some confusion here about what was being said.
> Michael Peters' comment about memory reuse was saying that:
> - if at runtime, you load a large memory structure
> - then let those variables go out of scope
> - then that memory will be come available for reuse by Perl
> - if you load that same large memory structure at server startup
> - and the variables don't go out of scope,
> - then that memory stays used
Indeed, looks like I misunderstood what Michael Peters was saying.
> This makes forking a new child very fast, thanks to copy-on-write in
This is what I am after.
> Unfortunately, in Perl, there is no way to make sure that
> data-that-will-never-change and compiled code is stored on a separate
> page from data-that-will-change. So, it is likely that, while your
> config data starts out completely shared, over time, it will become less
Good hint. I will have to see how I can limit this non-shared memory, if
need be by restarting the server from time to time to restore the
initial state with almost all memory shared.
(Or better by reducing MaxRequestsPerChild as you suggest)
> You may want to look at Linux::Smaps
I am not that far, yet. I am doing all my development work under Windows
and only for production I will use Linux (or Solaris if it needs bigger
Thanks (also to André)