When a linux (Centos) server is running, it often encounters some accesses that exceed the server's physical memory limit. to maintain normal server operation, you can configure swap partitions for the server and use hard disks to buffer memory shortage. However, the data allocated to the SWAP partition will not be automatically released after the peak access. when the SWAP usage exceeds 30%, the system performance will be affected. In this case, you need to manually refresh the system's SWAP partition to transfer the slow data read from the SWAP partition to the physical memory.
When a linux (Centos) server is running, it often encounters some accesses that exceed the server's physical memory limit. to maintain normal server operation, you can configure swap partitions for the server and use hard disks to buffer memory shortage.
However, the data allocated to the SWAP partition will not be automatically released after the peak access. when the SWAP usage exceeds 30%, the system performance will be affected. In this case, you need to manually refresh the system's SWAP partition to transfer the slow data read from the SWAP partition to the physical memory.
Command to refresh SWAP partition:
Swapoff-a & swapon-
Instance:
Note: disable the swap command:
Swapoff-
Run the following command to enable swap:
Swapon-