Checking the working of SWAP

Asked by mayur arora

I've recently upgraded to Ubuntu 10.10. Now my system hangs after regular intervals . The terminal has also been responding very slowly. I think there is something wrong with the swap. Is there any command that could check the working of swap or improve its performance?
Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You can use:

free -m

To see how much swap is being used

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

You can also set vm.swappiness to a lower value and keep apps in RAM more often, the default is quite high (60 I believe), If you have more than 1Gb RAM then a swappiness of 0 will mean the OS will keep the apps in RAM and ONLY use swapp when absolutely necessary. You can do this by running:

gksudo gedit /etc/sysctl.conf

and add this line:

vm.swappiness = 0

save the new file, close gedit then run:

sudo sysctl -p

and it will reload the setting (or you can reboot)

Can you help with this problem?

Provide an answer of your own, or ask mayur arora for more information if necessary.

To post a message you must log in.