Active Memory never reclaimed please help me understand
Mulyadi Santosa
mulyadi.santosa at gmail.com
Wed Sep 23 12:07:33 EDT 2015
On Wed, Sep 23, 2015 at 4:47 AM, Prem Kumar <prem.it.kumar at gmail.com> wrote:
> also wondering if there is a way I can list Active memory map showing me
> what is cached?
>
> -regards.
>
> On Tue, Sep 22, 2015 at 3:08 PM, Prem Kumar <prem.it.kumar at gmail.com>
> wrote:
>
>> Dear All,
>>
>> I have done quite a bit of reading on Active memory reported in
>> /proc/meminfo and in short says it is never reclaimed unless absolutely
>> necessary, and it caches the recently used files/pages in memory. Although
>> I fail to understand the consequences that I face here.
>>
>> I have disk-less and swap-less nodes. So all I have to do, is play with
>> the RAM on the box. Issue that brought me here is investigating why after
>> running some applications, used memory is never available for use with any
>> other applications.
>>
>> In other words I cannot run any programs that requests memory more than
>> what is shown as free in the output of free command and MemFree in the
>> output of the cat /proc/meminfo
>> For example if I ran any program that requires more than 6GB on the first
>> node below and more than 1GB on the second node below they fail instantly,
>> and work fine if within the limist of free. There is nothing else running
>> on the system other than system processes/services.
>>
>> total used free shared buffers cached
>> Mem: 23 17 6 0 0 9
>> -/+ buffers/cache: 8 15
>> Swap: 0 0 0
>>
>> total used free shared buffers cached
>> Mem: 23 22 1 0 0 0
>> -/+ buffers/cache: 21 1
>> Swap: 0 0 0
>>
>> Since the applications that ran previously are not running any more "even
>> though they died out of memory because they requested more memory than
>> available", shouldn't the OS see that any memory used previously as useless
>> and can it not reclaim that for use with the next job/program on that
>> machine.
>>
>> On every machine that I have run into this problem the out put of
>> /proc/meminfo shows that Active memory is used up the amount shown in the
>> free command and limits my further runs.
>>
>> This is driving me insane and making me feel stupid knowing that OS is
>> smart enough to handle this, then what am I missing here to understand?
>> Please advise.
>>
>> Appreciate any insight into this.
>>
>> Best Regards,
>> Prem
>>
>>
>>
>
>
>
Dear Prem
welcome to kernelnewbies :) First of all, please don't do top posting when
replying. Follow like what I and the rest of list member do.
Btw, looking from the free output, I have a doubt about your statement that
your first application took 6 GB and secondly it took 1 GB. Assuming your
application doesn't thing like memory locking in kernel space, i guess it
takes 20+ GB of RAM.
So, before we go further, could you re run your applications and use ps or
top to see both the VSIZE and RSS they take ?
Regarding memory claiming, yes after app is killed (using any ways
possible: ctrl-c, sending kill/term/quit signal, OOM etc), any memory
allocated by this task are freed. It happen on both active and inactive
pages
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150923/2290e2ad/attachment.html
More information about the Kernelnewbies
mailing list