Description
In the scenario of ZStack Enterprise Distributed Storage and Hyper-Fused Storage, the underlying physical machines do not set up SWAP partitions, because once the storage nodes use SWAP partitions, it will seriously affect the cloud host business. How can SWAP partitions be closed without affecting the business for physical machines that already have SWAP installed?
Environment
Cloud Platform Environment: ZStack Enterprise 3.6.0
Main Storage Environment: ZStack Enterprise Hyperfusion
Network Environment: Flat Network
Mirror Server: Ceph type mirror server
Cause
Swap partitions free up a portion of the hard disk memory for use by currently running programs when the system is running out of physical memory. In hyperconvergence scenarios, if the entire cluster performance degrades dramatically when storage nodes use SWAP partitions, you need to migrate the cloud hosts and turn off SWAP partitions to improve cluster performance.
Resolution
Executing free-h within the operating system will show that 8G SWAP partitions are assigned

(Figure 1 View memory usage and disk partitions)
Shut down swap partitions using swapoff-a (virtual machines on computing nodes need to be migrated before switching off SWAP to ensure that no data is written to the SWAP partition)

(Figure 2 Execute swapoff -a Turn off swap partition)
Remove mount information about swap partitions in/etc/fstab

(Figure 3 modifies the/etc/fstab configuration file)
Modify/etc/sysctl. Conf joins vm. Swappiness=0, execute sysctl-p to make the configuration permanent.

(Figure 4 modifies the/etc/sysctl.conf configuration file)
Execute sysctl-p

(Figure 5 Execute sysctl-p to make the configuration permanent)
Comments
0 comments
Please sign in to leave a comment.