Re: Query on deletion of Request pool
Hi All, Thanks a lot for such a detailed help.It simple awesome!.Will update you about the behavior once I do the testing. Regards -A On Sat, Mar 29, 2008 at 10:53 AM, Chris Kukuchka [EMAIL PROTECTED] wrote: From: Arnab Ganguly [EMAIL PROTECTED] It up to the OS to mark the freed areas as free or use it as a filesystem buffer or whatever buffer, as long as the memory isn't needed by applications. Thanks for the update.Actually when I do top -p on the process id I do see memory consumed by Apache is very less but over the time when I do free -m the RAM gets reduced. As Robert indicated, a running Linux system will attempt to make use of all physical memory. This is because it is undesirable to leave memory unused (wasted) when it can be put to good use for things such as disk cache. Google linux memory management for more information. I wonder can be this case happen free -m is 0 and the machine will crash or something Typically, you will see free memory get close to 0 and stay there. It will usually not go past that point unless you have your machine overloaded in some fashion. In most cases, even if free memory dips to 0, you will still have your swap memory available. At that point, system performance will start to degrade, but you will still be running. I was thinking may be the Apache was eating up the RAM To see how much physical memory (in kilobytes) is being used by Apache, use this command sequence: ps -e -o rss,comm | fgrep httpd | awk '{sum+=$1} END {print sum}' It is not unusual to see memory go up as an Apache process matures. This is especially true if you are running modules like PHP or Perl which have the potential to load many helper modules. A quick review of a handful of running machines available to me show 2-18MB per process is not unusual. Of those, PHP users are typically 10-12MB higher than non-PHP users. YMMV. Regards, Chris Kukuchka Sequoia Group, Inc.
Re: Query on deletion of Request pool
Hi, On Wed, Mar 26, 2008 at 10:51 PM, Arnab Ganguly [EMAIL PROTECTED] wrote: In the particular box only Apache is running no other application process is running.Also one more observation was when the Apache is stopped the free -m doesn't result to the original memory restore.We have to reboot the box to restore the original RAM. It up to the OS to mark the freed areas as free or use it as a filesystem buffer or whatever buffer, as long as the memory isn't needed by applications. with kind regards, Robert Schulze
Re: Query on deletion of Request pool
From: Arnab Ganguly [EMAIL PROTECTED] It up to the OS to mark the freed areas as free or use it as a filesystem buffer or whatever buffer, as long as the memory isn't needed by applications. Thanks for the update.Actually when I do top -p on the process id I do see memory consumed by Apache is very less but over the time when I do free -m the RAM gets reduced. As Robert indicated, a running Linux system will attempt to make use of all physical memory. This is because it is undesirable to leave memory unused (wasted) when it can be put to good use for things such as disk cache. Google linux memory management for more information. I wonder can be this case happen free -m is 0 and the machine will crash or something Typically, you will see free memory get close to 0 and stay there. It will usually not go past that point unless you have your machine overloaded in some fashion. In most cases, even if free memory dips to 0, you will still have your swap memory available. At that point, system performance will start to degrade, but you will still be running. I was thinking may be the Apache was eating up the RAM To see how much physical memory (in kilobytes) is being used by Apache, use this command sequence: ps -e -o rss,comm | fgrep httpd | awk '{sum+=$1} END {print sum}' It is not unusual to see memory go up as an Apache process matures. This is especially true if you are running modules like PHP or Perl which have the potential to load many helper modules. A quick review of a handful of running machines available to me show 2-18MB per process is not unusual. Of those, PHP users are typically 10-12MB higher than non-PHP users. YMMV. Regards, Chris Kukuchka Sequoia Group, Inc.
Re: Query on deletion of Request pool
On Wed, Mar 26, 2008 at 10:51 PM, Arnab Ganguly [EMAIL PROTECTED] wrote: In the particular box only Apache is running no other application process is running.Also one more observation was when the Apache is stopped the free -m doesn't result to the original memory restore.We have to reboot the box to restore the original RAM.Should I try using smaller value for MaxMemFree? Thanks and regards -A It sounds like you're tracking the wrong numbers if memory isn't free when the application terminates. -- Eric Covener [EMAIL PROTECTED]
Re: Query on deletion of Request pool
It sounds like you're tracking the wrong numbers if memory isn't free when the application terminates. Not clear to me.Can you please add some more lights to it. Thanks A On Thu, Mar 27, 2008 at 7:54 PM, Eric Covener [EMAIL PROTECTED] wrote: On Wed, Mar 26, 2008 at 10:51 PM, Arnab Ganguly [EMAIL PROTECTED] wrote: In the particular box only Apache is running no other application process is running.Also one more observation was when the Apache is stopped the free -m doesn't result to the original memory restore.We have to reboot the box to restore the original RAM.Should I try using smaller value for MaxMemFree? Thanks and regards -A -- Eric Covener [EMAIL PROTECTED]
Query on deletion of Request pool
Hi All, I am getting a serious memory issue with my Apache webserver. Initially I was allocating buffer from by using apr_palloc from the request pool assuming the allocated memory is going to be released but not sure what is the problem the memory grows infinitely. I then tried with own malloc and then added a clean up function on apr_pool_cleanup_run.Which on debugging showed the free is being called for the allocated memory but still the behavior is same.On each request there is a increase in memory. Is there any way to release explicitly the memory of the request pool?I tried with apr_pool_cleanup_register and added a clean up function internally I was calling apr_pool_destroy(request_rec-pool).For the first request it worked correctly but on the later there was a crash and restart on the Apache process. It seems I may be doing something silly.Any help would be very much appreciated.BTW my webserver is heavily loaded and it is MPM=Worker Apache version 2.2.8 and OS is Red-Hat 3.0. What are the other possibilities where memory leak can looked into. Looking forward for response. Thanks -A
Re: Query on deletion of Request pool
On Wed, Mar 26, 2008 at 11:39 AM, Arnab Ganguly [EMAIL PROTECTED] wrote: Hi All, I am getting a serious memory issue with my Apache webserver. Initially I was allocating buffer from by using apr_palloc from the request pool assuming the allocated memory is going to be released but not sure what is the problem the memory grows infinitely. How are you measuring memory use? Have you tried MaxMemFree? By default, apache won't continuously return this storage to the native heap because it's likely going to be needed again anyway. -- Eric Covener [EMAIL PROTECTED]