Ubuntu10.04wubi hard disk flash after installation

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.