Guest User!

You are not Sophos Staff.

[8.970] UTM9 Beta Performance Tweak

I've noticed that UTM9 just isn't up to par with what i'm going to call UTM8.  I've also noticed a ton of swapping being used even with vm.swappiness=0 set.  even with 3 gigs of ram installed I was still swapping 25% even though the system was caching more than 25% of physical ram.  I've seen this before in older kernels.  Back in 2.4 I filed a bug with centos and by extension redhat about a similar problem...it was later fixed in the next kernel patch.  

I decided to try something..something i did back in the 2.4x days....I disabled swap entirely.  I now have the latest beta running with 3 gigs of ram and zero swap(swapoff -a).  I've had this running for 24 hours:

 free
             total       used       free     shared    buffers     cached
Mem:       3087332    2730288     357044          0      94552     769160
-/+ buffers/cache:    1866576    1220756
Swap:            0          0          0

Within 24 hours i would have 10% swap...within 36 hours i would have 25% swap.  There's no reason for a system that is under ZERO memory pressure to be swapping to disk at a rate of 25% or higher when more than 30% of physical ram is unused.  I could go digging into the kernel deeper to find out why this is occurring but this is a development problem..not a partner/user problem.  V8 does NOT display this behavior.  I've noticed this since the first beta of UTM9.  I'm curious how many other performance regressions I've found might be addressed?  The testing begins..[:)]
  • The question is: Does this really affect what you call 'performance'?
  • when http performance goes up..megabits through wan goes up..disk usage going down...etc etc etc..that's all performance.  I know the devs don't like or listen to me..it's ok..i've been right in the past..i've been wrong too..i post what i find...once i verify if this helps anything concrete i'll post that too.  However there's no reason for a machine to be swapping 25% when nearly 33% of physical ram is available.  This was a bug fixed in the Linux kernel back in 2.4x days.  either this is a mainline kernel issue(i doubt it) or something Astaro is doing with either kernel tweaks or their own applications which are being very piggish(most likely..as this has been a steady increase in behavior for Astaro). I can tell you for sure right now I've had NO issues of any kind turning off swap at 3 gigs.  I CANNOT do this and keep the system stable with 2 gigs installed..there's jsut too much going on and i'm not even a heavy user( see my vm stats in my sig).  UTM9 is a pig and anything under 3 gigs if going to have performance issues once they get loaded up.  When you are swapping 25% or more under an exceedingly light load like mine compared to v8 it's going to get ugly for anyone who runs below 3 gig with any kind of real load on the machine.  don't believe me now?  Wait for Ga and the rollout of v9 appliances..swap is going to explode and then the complaints will spike due to various slowdowns that will occur.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • First, we're limiting v9 support to models with enough memory.

    As for the swap: My Windows is doing that since I can think of and I never had a problem with unused parts of apps or kernel being swapped 'away' while there still was plenty of free RAM. Same for my Ubuntu. Is it just the fact that swap is used at all? You already know how to disable swap completely, so if you don't accept any swap, then disable it?

    Any reproduceable figures that confirm your v8  v9 http/throughput performance assumption? I'm sure our performance guy would be very interested on how his figures compare to yours.
  • As i said i'm intending to start conducting my usual testing that i do..and i'll post the results.  but right now I can say 2 gigs isn't enough.

    As to ubuntu they have their kernel set to a swappiness of usually 40 or 60(i forget as their versioning is very quick).  Windows isn't comparable because it allocates a byte of swap for each byte of ram used by default whether the allocation actually contains data or not.  I can say i have noticed(as has my wife who is quick to let me know when performance changes) is the web proxy is "much snappier" today than yesterday before my disabling swap trick.  I never inform the family when i change something...so there's no "mental contamination" of the results.  if i get feed back one way or another i then start digging and posting here..[[[:)]]]  I've also noticed a marked decrease in disk activity on the astaro's raid 1 array since this...mostly because the system isn't writing to swap.  If the system is using the disk at 25% or more on an ongoing basis that's going to steal cycles from the cpu.

    I'll keep this updated as i test more things..[[[:)]]]  I do stand by my opinion that due to the high amount of swapping Astaro UTM9 is engaging in 3 gigs should be the minimum amount of ram for any astaro installation.  I'm Also going to try the "recommended minimum" of 2 gigs..i expect swap to take off like a rocket..hopefully i'll be proven wrong..[[[:)]]]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • so first i'm going to turn swapon and then reduce to 2 gigs..we'll see how that goes..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • interesting.  With 2 gigs installed the instant i boot i go right to 4k swap.  That is not big but it a bad portent...jsut in the few seconds i've posted it's growing larger..slowly but the march upwards continues..  will let this run for 24 hours..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • asg120:/root # free -m
                 total       used       free     shared    buffers     cached
    Mem:          2000       1611        389          0         65        663
    -/+ buffers/cache:        882       1118
    Swap:         1023         56        967


    asg120:/root # uptime
     18:04pm  up 2 days 21:15,  1 user,  load average: 0.12, 0.30, 0.28


    That's my Home-ASG: An ASG120 rev.4 prototype, upgraded to 2 GB & 30 GB SSD with almost anything enabled: HTTP/S-Proxy & AV (Avira only), SMTP & POP3-Proxy, IPS, HTTP/s-Reverse-Proxy, HTML5 Portal, Remote Access, Wireless etc.

    Not that bad?
  • is that v9?  Also with an ssd swapping isn't a real performance hit(except to the wear life on your ssd unless it sucks at 4k random writes).  one more thing..yours is a physical install mine is virtual.  i don't know if that has a bearing...hence why it's a developer's issue..[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • I also see a couple of interesting errors upon bootup which tomorrow i'll report...[:)]

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Here is mine [:D]
    gatekeeper:/home/login # free -m
    
                 total       used       free     shared    buffers     cached
    Mem:          2454       2054        399          0        227        798
    -/+ buffers/cache:       1028       1425
    Swap:         1023         10       1013
    gatekeeper:/home/login # uptime
     18:37pm  up 3 days  6:16,  1 user,  load average: 0.03, 0.15, 0.17
    gatekeeper:/home/login # 
    ESXi VM with almost identical setup to Mario other than IPS (mine is disabled...). If you tune the IPS it will take about 150 megs of ram and dual scan antivirus would take another 150 megs plus minus a few.

    Looking at the memory numbers, I just realized something. The kernel is swapping while keeping around 400megs free even though I have 500 more megs of ram compared to Mario. I think this is intentional to facilitate the load of webadmin.plx and confd processes when you start tinkering with the firewall.

    If they let the free memory go down too low, starting webadmin would force a swap which to a casual admin would look like slow frontend so they are swapping in anticipation that webadmin experience is smoother and fast. This is just a hunch but seems logical to me. 

    Regards
    Bill