After using wubi to install Ubuntu10.04, the hard disk did not flash in a few hours. This is because the swap is 300 MB by default during wubi installation, which is obviously not enough. Therefore, we need to optimize swap. modify the value of swappiness cat/proc/sys/vm/swappiness. The default value is 60, and the value is sudosysctlvm. swappiness = 10, which is modified in the system. Otherwise, the default value gksudog is changed after restart.
After installing Ubuntu 10.04 with wubi, the hard disk did not flash much in a few hours. This is because the swap is 300 M by default during wubi installation, which is obviously not enough, so we need to optimize swap.
1. Modify the value of swappiness
Cat/proc/sys/vm/swappiness. The default value is 60.
Sudo sysctl vm. swappiness = 10, which is modified in the system. Otherwise, it is changed to the default value after restart.
Gksudo gedit/etc/sysctl. conf:
Vm. swappiness = 10
2. Adjust the swap partition size
Cd/host/ubuntu/disks/
Sudo swapoff swap. disk
Sudo rm swap. disk
Sudo dd if =/dev/zero of = swap. disk bs = 1 M count = 1 k (create 1g swap, this step is slow)
Sudo mkswap-f swap. disk
Sudo swapon/host/ubuntu/disks/swap. disk (this step is slower, less than 1 minute)
Now, run the free command, and we can see that swap is as large as memory.