[wellylug] Odd memory usage

Pete Black pete at marchingcubes.com
Mon Apr 11 14:22:43 NZST 2005


Linux uses almost all free memory as file cache - so you can't reliably 
look at total memory usage and determine anything useful at all.

tarring your files will result in a bunch of entries being loaded into 
the file cache and this memory won't be freed until some other process 
tries to allocate a large amount of memory at which time long-unused 
file cache entries will be purged. Unfortunately I am not an expert in 
the precise workings of the VM subsystem, but I do know that you are not 
looking at your stats in enough detail to be able to tell if your 
machine is low on memory or not.

This behaviour is also the reason why in many cases idle applications 
(e.g. overnight) get swapped out of system memory resulting in a 
swap-storm when you return to your PC in the morning.

There are things you can do to tune your VM's behaviour, but I don't 
remember them off the top of my head.

-Pete



>Andrej
>
>You're looking at the graphs "back to front" they are showing FREE memory,
>not used memory, thus the lower they are the more of a worry it is. (I
>looked at them the same way to start with until I realised this)
>I have since found that the culprit it the TAR command, as soon as I run
>tar to backup my mail files my available memory drops to around 14MB. I
>think it might be time to find an alternative to TAR.
>
>  
>
>>>determine why it should, there are no scheduled jobs apart from a mail
>>>backup at 1:15am and pop checks every 5 minutes, can anyone suggest what
>>>I can check to see what the memory hogging culprit is?
>>>      
>>>
>>With only 100M of 320M used I wouldn't be speaking of
>>a memory-hogging culprit in the first place ... :)
>>
>>And the question I'd be asking is: why is the memory
>>usage DROPPING when I run my backup?
>>
>>But that aside: you could run a batch execution of
>>top, for instance, in the time that you find the memory
>>usage to be high, and pipe that to a file ... sort by
>>memsize ...
>>
>>
>>Cheers,
>>Andrej
>>
>>
>>--
>>Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
>>To Leave:  http://lists.wellylug.org.nz/mailman/listinfo/wellylug
>>
>>
>>
>>    
>>
>
>
>
>  
>




More information about the wellylug mailing list