swap file

Discussion in 'LiquidFiles General' started by JoLodewyckx, Jun 11, 2024.

  1. JoLodewyckx

    JoLodewyckx New Member

    Joined:
    Jan 29, 2018
    Messages:
    8
    Likes Received:
    1
    Yesterday I was in trouble with migrating to our new vm (OVF on esxi).
    Services that didn't start and weird behavior.

    However, when rolling out a new machine with lesser specs (3Gb ram, 2 cpu's) resolved the issue.
    When we configerd the ip, first user, nfs storage, we turned off the machine, increased the ram and cpu's and it happened again. However, this time around we noticed that the swap file filled our entire root fs.

    So after increasing the diskspace, we noticed that by default the swap file get's increased to double the size of the ram. (32Gb in ourd case). Is this necessary?
     
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    803
    Likes Received:
    31
    Since LF appliance v4.0 the swap file is generated dynamically accordingly to the actually assigned RAM size.
    For bigger RAM sizes the swap is equal only 1xRAM size.

    16GB RAM is quite lot for most of common instances. But if you have experimentally verified from provisioning of your previous LF server this RAM size was needed then fine.
    Yes, in this case you will need then resize the system disk accordingly so the swap file will fit there.
     
  3. JoLodewyckx

    JoLodewyckx New Member

    Joined:
    Jan 29, 2018
    Messages:
    8
    Likes Received:
    1
    Well, we tested it twice and it takes twice the size. So 32gb in our case. That’s not default Ubuntu behaviour. And if we delete it and create a new smaller one, after a reboot; it recreates a 32gb one. Can this be adjusted of at least given Control to the admins for choosing a size?
     
  4. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    803
    Likes Received:
    31
    The swap file is configured during reboot by LF appliance accordingly to the RAM size. Currently this can't be manually changed.
    You have basically two options either set smaller RAM. In most of cases 2 - 4GB RAM is sufficient for LF appliances.
    Then smaller swap space will be created. Or you can keep 16GB RAM then please extend the system disk.
     

Share This Page