How to increase or decrease swap Print

  • 0


How can I increase or decrease swap on my server?



The swap size can be changed without rebooting the server using the create-swap script.

  1. Turn off swap.
    swapoff -a
  2. Edit /etc/fstab and comment out the swap line.
    #/usr/swpDSK swap swap defaults 0 0
  3. Run the create-swap script to resize the swap file. Please replace # with the size in Gigiabytes that the new swap file should be.
    /usr/local/cpanel/bin/create-swap --size #G -v

To verify that swap was resized correctly, use the free command.

Was this answer helpful?

« Back

Join us on Telegram channel


Send Message