Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Newbie
    Join Date
    May 2020
    Posts
    5

    Default Swap usage is high

    I keep getting email errors that "Swap usage is high". I get them very often the last few days. It is a virtual (VMware) appliance running software version 16.3.2.

    The current system state is: [ Load (1-minute): 0.6, Load (5-minute): 0.48, Load (15-minute): 0.43, Memory Free: 11744MB, Disk Free: 193053MB, Swap Used: 826MB ]

    Event Details:
    active hosts = 41
    cpu system = 0.03663004
    cpu user = 0.08424909
    disk free = 188G
    disk free percent = 61%
    disk total = 310G
    disk used = 122G
    disk used percent = 39%
    load1 = 0.6
    load15 = 0.43
    load5 = 0.48
    mem buffers = 0
    mem cache = 43M
    mem free = 11G
    mem free percent = 73%
    mem total = 15G
    mem used = 4G
    mem used percent = 27%
    swap free = 2G
    swap free percent = 72%
    swap total = 2G
    swap used = 826M
    swap used percent = 28%
    time stamp = 2021-09-04 10:03:50.943

    I've upgraded to 16GB memory, but it appear that it is not able to use more than 4GB. All alerts say "mem total 15GB - mem used 4GB".

    It is a 64-bit appliance.

    uptime: 16d 7h 36m
    Server: VMware
    CPU Count: 2
    CPU Type: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
    Architecture: amd64
    Memory: 16.82 GB
    Disk: 333.6 GB

    Does anyone know how to make it use more than 4GB memory? Any help is tremendously appreciated.

  2. #2
    Untangler
    Join Date
    May 2008
    Posts
    398

    Default

    How big is your swap? I don't know about vmware but on proxmox I turn off swap. Swap on vm's is not a good thing. How much memory does vmware have and what version might also be useful to others that are familiar with it. Also how many devices and connection speed.
    Last edited by donhwyo; 09-04-2021 at 06:49 AM.

  3. #3
    Newbie
    Join Date
    May 2020
    Posts
    5

    Default

    According to the stats the swap size is 2GB. I can't find any options to change the swap size though. Do you know where to do that?

    swap total = 2G
    swap used = 826M

    The VMware host has 128GB memory installed. The Untangle firewall is currently assigned 16GB. The ESXi version is v6.7 (with the latest and greatest patches installed).

    AFAIK, swap is only used as memory "overrun" - ie. if all memory is exhausted, it will start using disk space as ram instead (swap). I am just finding it odd that each and every email alerts says "mem used = 4G" - it is as if it cannot use more than 4GB. Which would make sense for a 32-bit OS, but this is a 64-bit one...

    I have a standby Untangle as well (using VRRP between the two) and that uses no swap at all. It's only the primary in the VRRP setup which is throwing these alerts.

    I have about 40 servers behind it - the connection speed is 1Gbit/s both up and down. It only has about 4-5000 active sessions at the time the alert is thrown.
    Last edited by mfpoulsen; 09-04-2021 at 10:22 PM.

  4. #4
    Untangler jcoffin's Avatar
    Join Date
    Aug 2008
    Location
    Sunnyvale, CA
    Posts
    9,699

    Default

    Linux which Untangle is based on uses swap memory much differently that most OSes. Swap is used on all system whether physical memory is all used or not.

    Changing the memory virtually will not change the base system. You need to reinstalled if you are using a VM environment to see the additional memory assigned.
    mfpoulsen likes this.
    Attention: Support and help on the Untangle Forums is provided by
    volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  5. #5
    Newbie
    Join Date
    May 2020
    Posts
    5

    Default

    Oh no, I just reinstalled 3 weeks ago to add more disk space... Uh well, I'll do another one with the 16GB assigned upfront - guess this is why I made 2 of them in a VRRP setup ;-)

    Thanks for your help mate - very appreciated!

  6. #6
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    26,174

    Default

    The reinstall isn't required... RAM will be used if installed, the more RAM you install the less likely you're to need swap.

    Now... if you want more swap that means re-partitioning the drive THAT is most easily done via reinstall.

    P.S. Swap in a VM is NOT bad... However in VMWare it's a little silly because VMWare has its own swap mechanism for guests. So generally speaking you want to let it handle that.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  7. #7
    Newbie
    Join Date
    May 2020
    Posts
    5

    Default

    Quote Originally Posted by sky-knight View Post
    The reinstall isn't required... RAM will be used if installed, the more RAM you install the less likely you're to need swap.
    That's how I thought it worked too. It recognised all 16GB so why could it never use more than 4GB?

    Quote Originally Posted by sky-knight View Post
    P.S. Swap in a VM is NOT bad
    I agree - but getting 50+ emails daily about high swap usage drives me crazy to put it mildly...

    I ended up reinstalling as @jcoffin suggested - this time creating the VM with 16GB memory from the beginning - and it has solved the problem. The memory usage happily goes over 4GB now and it uses next to no swap.

    Thanks so much for the help!

  8. #8
    Untangler
    Join Date
    May 2008
    Posts
    398

    Default

    Quote Originally Posted by sky-knight View Post
    P.S. Swap in a VM is NOT bad... However in VMWare it's a little silly because VMWare has its own swap mechanism for guests. So generally speaking you want to let it handle that.
    Dueling os's sounds bad to me.

  9. #9
    Untangle Ninja jcoehoorn's Avatar
    Join Date
    Mar 2010
    Location
    York, NE
    Posts
    1,867

    Default

    I suspect the problem was the postgresql configuration. Postgresql needs to be told via configuration how much RAM it can use, and this is set via the installer. Add RAM after the fact and the configuration is never updated.
    jcoffin likes this.
    Five time Microsoft ASP.Net MVP managing a Lenovo RD330 / E5-2420 / 16GB with Untangle 16.2 to protect 500Mbits for ~450 residential college students and associated staff and faculty

  10. #10
    Untangler
    Join Date
    Jul 2017
    Location
    Midlands, UK
    Posts
    69

    Default

    Where is the Postgresql RAM usage setting stored?

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2