Impact of vm. swappiness on databases

Source: Internet
Author: User

Impact of vm. swappiness on databases
The default vm. swappiness value of centos is 60. You can reduce the size of the database to reduce the load of swap, and improve the system performance.
In linux, once swap partition is used, swap switching is triggered only when pages are missing. Otherwise, swap is used all the time, resulting in extremely high hard disk I/O.
For oracle, 10 is generally set. For mysql, 1 is generally set. Do not use swap partitions as much as possible. If it is set to 0, linux will also use swap partitions,
If the value of the kernel after 3.5 and the kernel after redhat 2.6.32 is set to 0, swap is disabled, causing mysql oom.


View swappiness in your system
$ Cat/proc/sys/vm/swappiness
If nothing happens, you should see 60.
Temporarily change the value of swappiness to 10
$ Sudo sysctl vm. swappiness = 10
After the system is restarted, the default 60 is restored.
$ Sudo gedit/etc/sysctl. conf
Add the following line at the end of this document:
Vm. swappiness = 10
Save and restart.

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.