httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Understanding Memory Usage Per Process
Date Tue, 05 Apr 2005 15:19:05 GMT
On Apr 5, 2005 11:11 AM, Jerry Lam <> wrote:
> What I did is I ran a script on the command line which will take 180M of memory to finsih,
then I tried running the same script within apache by using mod_websh to serve the request.
The apache child process goes up to 200M (from the top command) and it never drops back to
its initial value even after the script is done.
> The script doesn't have memory leak. My understanding is that the mod_websh will run
the tcl interpreter and execute the script. After it is done, it kills the tcl interpreter
and memory should be returned back to the OS (I supposed). But it doesn't seem this is the
case. I'm sure the memory is not lock up. If I ran the same script over and over while true
it within the request, the memory usage stays exactly 200M even after some hours of execution
within the process.
> - Can someone explain this to me clearly what is happening here? I would like to know
how memory is allocated within apache? Though the only explanation I have is that mod_websh
request memory from apache, and apache assigns some blocks of memory to mod_websh after mod_websh
is done, it returns the memory back to apache (in this case 200M) but the memory is kept within
the process to serve the next request. Please add / modify / correct this explanation if you
think something not quite true about it.

I don't know anything about mod_websh, but the point of modules like
this is usually to retain the interpreter in memory between requests
to speed execution.  If you really want something that will execute
and then get completely cleaned up, you should try the CGI interface.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message