Re: [users@httpd] Understanding Memory Usage Per Process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 5, 2005 11:11 AM, Jerry Lam <jlam@xxxxxxxxxxxx> 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.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux