I added a block of memory to my ThinkpadE40, which is 4 GB now. The use of swap devices for such configuration is a waste of hard disks. In order to reduce hard disk wear, it is decided to cancel the switch device. In Windows 7, virtual memory cancellation can be set through the advanced settings in the system. Here we mainly talk about how to cancel the swap device under Ubuntu10.10. The swap device includes swap partition and swap file. The load of swap partition is through/etc/fstab
I added a block of memory to my Thinkpad E40, which is 4 GB now. The use of swap devices for such configuration is a waste of hard disks. In order to reduce hard disk wear, it is decided to cancel the switch device. In Windows 7, virtual memory cancellation can be set through the advanced settings in the system. Here we mainly talk about how to cancel switching devices in Ubuntu 10.10.
The swap device includes swap partition and swap file. The swap partition is loaded through the swap partition in/etc/fstab. Therefore, you can execute the following script:
Sudo gedit/etc/fstab &
Comment out the swap partition.
If there are still swap files, you can use swapoff-a to cancel all swap devices of the system, so you can execute the following script:
Sudo gedit/etc/init. d/rc. local &
Add/sbin/swapoff-a at the beginning of the file
If you need to adjust the Linux memory usage policy, you can set the vm. swappiness value. The value ranges from 0 to 100. 0 indicates the maximum memory usage, and then the swap device. indicates that the swap device is active. Therefore, you can execute the following script:
Sudo gedit/etc/sysctl. conf &
Add vm. swappiness = 0 at the end of the file.