Ubuntu hard disk temperature and memory usage

Source: Internet
Author: User
In Ubuntu, the size of the swappiness value is closely related to how to use the swap partition. When swappiness is set to 0, the physical memory is used to the maximum extent, and then the swap space is used. When swappiness is set to 100, the swap partition is actively used, in addition, the data in the memory is promptly moved to the swap space. Two extremes. For Ubuntu's default settings, this value is equal to 60. We recommend that you change it to 10. I use 4G memory (i386 uses 3G) and change it

In Ubuntu, the size of the swappiness value is closely related to how to use the swap partition. When swappiness is set to 0, the physical memory is used to the maximum extent, and then the swap space is used. When swappiness is set to 100, the swap partition is actively used, in addition, the data in the memory is promptly moved to the swap space. Two extremes. For Ubuntu's default settings, this value is equal to 60. We recommend that you change it to 10. I use 4G memory (3G for i386) and change it to 0. Specifically:

1. View swappiness in your system

Cat/proc/sys/vm/swappiness

If nothing happens, you should see 60.

2. Change the value of swappiness to 0.

Sudo sysctl vm. swappiness = 0

However, this is only temporary modification. After you restart the system, the default value of 60 will be restored. Therefore, we need to do one step:

Sudo gedit/etc/sysctl. conf

Add the following line at the end of this document:

Vm. swappiness = 0

Save and restart. OK. Your settings will take effect.

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.