N2W Software

            How to improve CPM’s performance or overcome high memory consumption by creating a swap partition


            Please make sure your CPM complies with the recommended instance sizes regardless of creating the swap file.

            In certain environments, CPM may suffer from performance issues or high memory consumption even though the recommended instance sizes are followed.
            In such cases it is advised to create a swap partition.
            Please follow the below steps:
            • Login to cpm via ssh using cpmuser and your private key
            • Create a swap file with the desired size:
              sudo fallocate -l 4G /swapfile 
              This example will create a 4G swap file named swapfile under the root directory.
              Generally, an amount equal to or double the amount of RAM on your system is a good starting point.

            • Restrict the file permissions to read/write only for the root user:
              sudo chmod 600 /swapfile
              sudo chown root:root /swapfile

            • Verify that the correct permissions are applied:
              ls -lh /swapfile
            • Create the swap file. 
                       sudo mkswap /swapfile
            • Tell the system to set up the swap space by typing:
              sudo swapon /swapfile
            • Verify that procedure was successful by typing:
              sudo swapon -s
              Output should look like the below:
                              Type        Size    Used    Priority
              /swapfile               file        4194300 0       -1
            • Make the swap file permanent (it will retain after reboot):
              sudo vim /etc/fstab
              At the bottom of the file, you need to add a line that will tell the operating system to automatically use the file you created:
              /swapfile   none    swap    sw    0   0
              Save and exit.
            Please note- currently, this setting will not be retained when upgrading the CPM via ami.

            If you upgrade using ami, you will have to follow this KB again after the upgrade


            Link to Release Notes and the latest patch –


            Help us to make this article better
            0 0