How do i get feisty to use swap then ram?

Asked by Rob Shannon

Feisty wont use my Swap at all but uses all my ram and cpu, i just want it so it will use my swap then mem so i can get it that more efficant....hope this makes sense to you guys,

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
glandux
Solved:
Last query:
Last reply:
Revision history for this message
Ralph Janke (txwikinger) said :
#1

Thanks for the question.

Ubuntu tries to always use the faster medium first. RAM is faster than swap on the HD. Therefore it will always used RAM first for its virtual memory before paging out some of the virtual memory located in RAM onto HD when memory requests are given that would not fit in the remaining RAM.

This is always done like this in OSs since the CPU can not directly load information from the HD, but always has to first transfer the data from the HD into RAM and then it can load it into the CPU.

I hope this helps

Revision history for this message
Best glandux (glandux) said :
#2

Linux 2.6 permits to do this with "swappiness", which takes a value from 0 to 100 to indicate the preference between freeing cache or swapping.
A value of 100 means the kernel privileges swapping.

To tune this to be immediately active, use this command:
sudo echo 100 > /proc/sys/vm/swappiness

To be set at boot, add this line in file /etc/sysctl.conf:
vm.swappiness = 100

Revision history for this message
Rob Shannon (50below) said :
#3

Thanks glandux, that solved my question.