In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
How to change the Linux system, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Swappiness is a Linux kernel attribute, and its main function is to balance between swapping pages from physical memory to swap space and deleting pages from the page cache. It basically defines how often the system uses swap space. So how do you change swappiness?
Check Swappiness valu
To check the current swappiness value on the system, use the following cat command:
The default swappiness value for cat / proc/sys/vm/swappiness on most Linux distributions is 60:
sixty
Although the swappiness value of 60 is suitable for most users, in some cases, you may need to set a lower value.
Another command that you can use to determine the swappiness value is sysctl:
Sysctl vm.swappiness vm.swappiness = 60 change the Swappiness value
Swappiness can have a value between 0 and 100. A value of 0 indicates that the kernel actively avoids swapping for as long as possible. A value of 100 will actively swap the process out of physical memory.
A lower value will make the kernel avoid swapping as much as possible, while a higher value means that the kernel will try to use swap space more actively.
Accessing swap memory is much slower than accessing physical memory directly. A lower value of the swappiness parameter is likely to improve overall system performance. For regular desktop installations, the recommended value is 10. For most database servers, a swappiness value of 0 or 1 is recommended.
The best swappiness value depends on your system workload and the size of your RAM memory. You should adjust this parameter in small increments to find the best value.
For example, to set the swappiness value to 10 at run time, type the following command as the root or sudo user:
Sudo sysctl vm.swappiness=10 to keep the swappiness parameter unchanged after reboot, open the file / etc/sysctl.conf using a text editor:
Sudo nano / etc/sysctl.conf finds the vm.swappiness parameter and changes its value. If this parameter does not exist, append the following line to the file / etc/sysctl.conf
Vm.swappiness=10 what is Linux system Linux is a free to use and freely spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.