1753452 Members
5752 Online
108794 Solutions
New Discussion юеВ

swap memory

 
admin1979
Super Advisor

swap memory

Hi,

We have SuSE Linux 9.0 on a old system.
Recently we had few problems with this system. The system becomes unresponsive regularly. Then we hard boot and the sytem come back again.
We suspect its a memory issue. It has 500 MB Phy RAM and 1 GB of swap. But most of the time the free memory is in the range of 50 MB - 8 MB. We also noticed that the system is not at all using the SWAP space allotted.

Here are the facts,

# cat /etc/fstab
/dev/hda3 / ext3 acl,user_xattr 1 1
/dev/hda1 /boot ext2 acl,user_xattr 1 2
/dev/hda4 /usr ext3 acl,user_xattr 1 2
/dev/hda2 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0


# free -m
total used free shared buffers cached
Mem: 494 486 7 0 97 132
-/+ buffers/cache: 256 238
Swap: 1027 0 1027

# cat /proc/swaps
Filename Type Size Used Priority
/dev/hda2 partition 1052248 0 42



Do you also think that its the memory/swap issue?

If yes then how do we make the system use the swap space?

Please suggest.



Thanx,
admin
4 REPLIES 4
Srimalik
Valued Contributor

Re: swap memory

High memory usage and not using swap is not a problem for linux, the memory is used for buffers and will be freed when you need it for applications.
abandon all hope, ye who enter here..
J. Maestre
Honored Contributor

Re: swap memory

Check the "-/+ buffers/cache" line, you actually have 238 free MB, not counting cached stuff (which will be freed as soon as it's needed by a running process). That's quite reasonable for a 500MB system.

Regarding the use of swap, you can change that throught /proc/sys/vm/swappiness, but if anything you would want a low value there so the system uses as few swap as possible, as long as it's not really needed.

Long story short: your issues have nothing to do with the amount of free memory, or at least not with the memory usage you have posted.
Ivan Ferreira
Honored Contributor

Re: swap memory

I suggest you to install collectl or at least enable sar. Collecting performance statistics would help to diagnose the problem.

If the system is totally unresponsive, then you may have a hardware problem, you should check the messages file and dmesg output.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
admin1979
Super Advisor

Re: swap memory

As mentioned above.