[users@httpd] Understanding Memory Usage Per Process

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

 



Hi,

I ran into a situation where I would like to understand how exactly memory is handled in apache process. 
I'm using 1.3.33 apache on a freebsd box having 1GB or RAM. The box has only apache and postgresql servers running. 
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. 

Thank you,


Jerry

---------------------------------------------------------------------
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