How to increase the swap to 4GB (UTM)

  • Article ID: 119721
  • Rating:
  • 1 customers rated this article 6.0 out of 6
  • Updated: 31 Jul 2014

NOTE: Increasing the size of the swap can result in losing support and it will influence the behavior of the system.

This article explains how to increase the swap from default 1GB to 4GB. This prevents the UTM from running out of swap memory.

The following commands need to be entered on the command line of your UTM as root user. 

 

Known to apply to the following Sophos product(s) and version(s)

Sophos UTM

What To Do in <= UTM v9.1

  1. Create 3GB swap file on /var/storage/ 
  2. dd if=/dev/zero of=/var/storage/swapfile bs=1024 count=3145728

  3. Change directory to /var/storage/
  4. cd /var/storage/ 

  5. Set up a Linux swap area
  6. mkswap /var/storage/swapfile 

  7. Enable files for swapping  
  8. swapon /var/storage/swapfile 

  9. Check if everything worked. You should now see a total Swap around 4000
  10. free -m 

  11. Display swap usage summary.  You should see a 2nd entry showing /var/storage/swapfile from type file with a size around 3145728.
  12. swapon -s 

  13. Edit /etc/fstab
  14. vi /etc/fstab 

  15.  Change to Insert Mode
  16. i

  17. Insert at the end of the file:
  18. /var/storage/swapfile swap swap defaults 0 0

  19. ​Safe changes and exit vi
  20. [ESC] :wq


What To Do in UTM 9.2

If  you want to increase the swapfile please follow the steps:

  1. Login to the shell of the UTM as root 

  2. Open the ConfdClient with the command: 
    cc 

  3. Now type: 
    settings

  4. Set the object extra_swap$(this is the extra swap to the default swap size) to an integer value between 1 and 8:
    extra_swap$
    =<1-8>
    (a value of 3 is recommended as this will increase it to =4)
     

Note: In case you have a new installation with a image of v9.2 the swap is by default the same size as the available RAM. The minimum swap size is 2 GB, the maximum swap size is 4 GB.


 
If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent

Comments