Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Current statistics affirm that:

100Mb of RAM are used out of 312Mb and 31Mb of Virtual Mem are used too.

Anyway I can stop the OS from using virtual memory instead of RAM? I know that this happens when RAM becomes saturated, and OS has nowhere else to store data other than the hard disk. But the Virtual mem doesn't seem to go down, instead it looks like it prefers staying there.

I'm not sure if this is a problem or not, as maybe it doesn't necessarily mean that the virtual mem is being used over the ram.

Help would be much appreciated! Thanks! :)

share|improve this question

migrated from Mar 3 '10 at 2:30

This question came from our site for professional and enthusiast programmers.

Check out your swappiness value in /proc/sys:

$ cat /proc/sys/vm/swappiness

You can force Ubuntu not to use swapfile until absolutely necessary by changing this value to zero:

$ sudo sysctl vm.swappiness=0
vm.swappiness = 0

I wrote a pretty extensive blog post about this a while ago, along with tips for how to manage everything. Check it out here.

share|improve this answer

You can clear out the swap by using these two commands in order:

sudo swapoff -a
sudo swapon -a
share|improve this answer
This clears the swap, but doesn't prevent anything from immediately reclaiming it. Also, it can be a Very Bad Idea if there isn't enough space to write the swap back out. – John Feminella Mar 3 '10 at 1:54

To quote you :

100Mb of RAM are used out of 312Mb and 31Mb of Virtual Mem are used too.

You've not yet mentioned SWAP usage and have only mentioned that a 1/3 of your RAM is used.

Onee important thing to keep in mind on Linux systems, is that you're RAM will often times look "more used" that it really is since the Kernel will use ram for whatever it can to make your life faster ( ex.: filesystem information / inode cache / etc... ). This is not overly problematic as this buffered information is considered as being a second class citizen and will be bumped down if need be..

share|improve this answer
isn't the Virtual Mem usage => SWAP usage ? – RadiantHex Mar 18 '10 at 2:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .