1831131 Members
2683 Online
110020 Solutions
New Discussion

Re: Memory usage .

 
Chapaya
Frequent Advisor

Memory usage .

Hello ,
I have a rp5400 with 4Gbyte physical memory .

The machine use 860Mbyte from the SWAP instead of the physical memory ( i have 1.6Gbyte free physical memory ) .
What can i do to use all physical memory ?

Eran .
3 REPLIES 3
Stefan Farrelly
Honored Contributor

Re: Memory usage .

The way to determine if your server did actually run out of RAM and start swapping/paging to disk is to check the DEV lines from swapinfo -mt (NOT the total line)

If the dev lines show any USED then this is how much memory you went over 4Gb - but this info is historical - if you since freed up memory then swapinfo -mt does NOT update well. Only a reboot will update it. All it means is at some point you may have run out of memory - it doesnt mean you are out of memory right now.

So, to check your server is ok right now firstly use vmstat and the memory free line. Its in pages, so multiply by 4096 to get current free memory in bytes. If its low - say <10Mb then check swapinfo as you are probably paging out.

If you have glance use it - its uptodate and much better for checking swap and memory usage in realtime.
Im from Palmerston North, New Zealand, but somehow ended up in London...
T G Manikandan
Honored Contributor

Re: Memory usage .

Whenever a process executes in memory it reserves the same amount in swap,incase it must be paged out.

That is the reason the swap reservation column is increasing while still you have free memory.

If you have more unused free memory on the system you can try enabled swapmem_on to 1 which will enable pseudo swap.

This will use memory as swap.
This is very useful in reducing the amount of swap on systems with huge amount of memory.

check the memory management white paper at /usr/share/doc/mem_mgt.txt.
Just do a search for "pseudo swap" which will explain you in detail
T G Manikandan
Honored Contributor

Re: Memory usage .

post the output of

#swapinfo -ta

Look at the used and reserve columns