This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

When should I worry about swap usage?

I've installed two new ASG 220s with HA, IPS, and web and email security on.  For the first few days RAM hovered around 65% with no swap usage.  About 5 days in swap usage suddenly jumped to 10%.  About a week later swap jumped to 20%.  3 days later takes us to today, and my swap usage has jumped to 30%.  Over this time RAM usage has been fairly stable, hovering in the mid to high 60s and occasionally hitting low 70s.

Should I be worried about the increase in swap usage?


This thread was automatically locked due to age.
  • Thanks, Alan, that all makes sense.  It sounds like you are using some method that makes some processes "sticky" and others "swappy" instead.  I'm relieved to know that this isn't simply a Least-Recently-Used algorithm that swaps anything older than x milliseconds.

    In his last post above, Barry commented, "When I see my swap file dramatically grow, its because of an active process using a lot of memory, or something that ran at night such as accounting, and the swap is left 'open' as the kernel sees fit."  If that's the only time, then I say, "no harm, no foul."

    It's curious that the new "Current" for each period is the height of the previous peak; witness the attached most-recent monthly for my company.

    Anyway, it appears that we've belled this cat, so on to the next mystery!

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • i ahve never seen a swapiness value of zero ever cause packet delays of any kind.  I ahve used swappiness zasero in astaro as well as untangle and other linux based servers.  I have seen an increase in overall system performance becuase the system DOES NOT SWAP IF SUFFICIENT MEMORY IS INSTALLED FOR THE PROCESSES.  With naything other than zero you can get the system to swap BEFORE it has reclaimed all cache ram(not active process ram which is what a packet processing engine uses) then that WILL cause the system to swap AND could and has impacted even the process packet engines(or some other critical engine).  

    if you want to balance you can go with 30 but frankly the only way to make sure the maximum amount of physical ram is dedicated to processes and not filesystem cache swappiness zero is the only easily tweakble way.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • William, I am glad that you have not seen any issue, and as long as you have enough physical RAM you won't. But I HAVE seen significant performance loss when physical ram is exhausted. Setting swappiness to 0 only makes this happen faster.
  • allowing the system to swap craters system performance even faster than vm.swappiness=0

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow