When I give the command 'free -g' and view the output, it says

             total       used       free     shared    buffers     cached
Mem:             1          1          0          0          0          0
-/+ buffers/cache:          1          0
Swap:            3          0          3

My swap is taking 3 GB of ram. And my system is running very slow because of this. Please let me know: how do I reduce swap using 3gb of my ram?

  • Can some one please answer this, my system is running damm sloww Jan 28, 2014 at 7:45
  • It won't help if you cry for help like this.
    – OrangeTux
    Jan 28, 2014 at 7:52
  • can you post complete data of top or htop.
    – Raja G
    Jan 28, 2014 at 7:53
  • top - 13:46:41 up 26 min, 3 users, load average: 0.15, 0.23, 0.30 Tasks: 211 total, 1 running, 209 sleeping, 0 stopped, 1 zombie %Cpu(s): 3.6 us, 1.1 sy, 0.0 ni, 95.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 1923456 total, 1750836 used, 172620 free, 56788 buffers KiB Swap: 3993596 total, 0 used, 3993596 free, 881828 cached Jan 28, 2014 at 8:16
  • An old scheduling trade-off in computers is how much time the CPU should rotate between processes. The more the CPU rotates between processes, the more responsive the system feels, but each processes takes longer to get things done (so the slower the system actually is). There is something wrong with Ubuntu because when it needs to use swap, it's scheduler rotates too much and the entire system crawls to a halt. I either do not use swap or reduce the swappiness variable. You will find much information on swappiness in this website. Jan 5, 2016 at 11:46

1 Answer 1


Your system has only 1 GB of RAM, which is fully used. In addition, you have 3 GB of swap, which will be userd by your system once it needs to free RAM for something.

Your system probably is slow because it has to swap files from the (fast) RAM to the (slow) hard disk where your swap resides.

  • No my system has 4gb ram, Jan 28, 2014 at 7:49
  • I am sorry I have 2gb of ram in my system, when I tried this command 'grep MemTotal /proc/meminfo' This is the output: MemTotal: 1923456 kB Jan 28, 2014 at 7:54
  • Then please update your post (using the edit function) to include the output of free -h, which provides more details. The rest of the comment remains valid.
    – drc
    Jan 28, 2014 at 8:24

You must log in to answer this question.

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