Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes I have observed in Ubuntu's System Manager that without the physical RAM being used completely, the swap memory starts getting used.

Why is it so?

share|improve this question
    
There is a parameter called swappiness help.ubuntu.com/community/… which can be tweaked. A lightly loaded desktop with a GB of RAM can be set at 10 (out of 100). –  aitchnyu Sep 15 '11 at 13:24
    
Check out this thread: [askubuntu.com][1] [1]: askubuntu.com/questions/157793/… –  NiCU Jan 21 '13 at 15:22

2 Answers 2

up vote 7 down vote accepted

From the Ubuntu Wiki Swap Faq

A significant number of the pages used by these large programs during its startup may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other programs or even for the disk cache. In these cases, swap will be used to help the system handle any extra load.

I feel that the linux kernel does this optimally, and quite well, so you need not worry at all. You could reduce swappiness to increase your RAM usage, but I would not recommend that.

share|improve this answer

The OS sends pages to swap just in case. It does this so that if swap is needed it can remove the "swapped" pages from memory without the delay of writing them to disk.

I have no proof of this, but I would assume it does this when it has some spare time, so it can do it without impacting normal operations.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.