How to disable a Ram Swap permanently

Hakan Koseoglu hakan at koseoglu.org
Sun Mar 7 10:58:30 UTC 2010


Lawrence,

On 07/03/10 10:46, Steve wrote:
>> (1) Is the Ram Swap still necessary? If not, how to remove it.
>> (2) How to increase the priority of the Swap Partition.
If you have enough memory on your environment you can permanently turn it
off (although you might still like to have swap for a lot of reasons) by
taking both lines off /etc/fstab.

Simply remove the swap line you don't want from /etc/fstab and reboot.

If you want to do it w/o a reboot, and disable that swap partition right
away, sudo swapoff /dev/ramzswap0 should do the trick.

To increase the prioirity, change the last column of your /etc/fstab swap
definitions. Currently one of them is set to 100 and the other set to -1
(which would be the minimum priority. Swap them around if you want to
preserve both. If you have only one swap partition/file, the priority
doesn't mean anything and can be left at anything.




More information about the ubuntu-users mailing list