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..[:)]
Parents Reply Children
  • 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
  • I see no reason to be in use Swap ... ASG120!

    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    
    root     30684  1.2  1.6  44680 16800 ?        S    21:08   0:00      \_ confd [worker[:P]rpc:acc-agent]
    root     30686 15.0  2.0  47680 21156 ?        S    21:08   0:04      \_ confd [worker[:P]rpc:webadmin]
    root     30746  100  0.0   2552   912 ?        R    21:08   0:00      |   \_ ps auxwf
    root     30732  6.3  0.0      0     0 ?        Z    21:08   0:00      \_ [confd.plx] 
    root      3497  0.0  6.4  71080 65480 ?        S    Jun14   0:42 /var/mdw/mdw.plx
    root      4502  0.3  1.7  30624 17728 ?        Ss   Jun14  13:42 smtpd [master]
    root      4601  0.0  1.6  30492 17136 ?        S    Jun14   0:50  \_ smtpd [queue manager]
    wwwrun   30497  8.1  6.0  63400 61228 ?        S    21:06   0:12  |   \_ /var/webadmin/webadmin.plx
    root      7736  2.5  5.4  63488 55016 ?        S    Jun14 111:40 /usr/sbin/acc-agent.plx --verbose=2 --daemon
    snort     8703  0.4 15.3 375704 155728 ?       S


    loginuser@UTM120:/home/login > free -m
    
                 total       used       free     shared    buffers     cached
    Mem:           993        953         40          0        213        271
    -/+ buffers/cache:        468        525
    Swap:         1023         52        971

    loginuser@UTM120:/home/login > uptime
     21:15pm  up 3 days  1:33,  1 user,  load average: 0.78, 0.33, 0.29
  • Probably it also would be interesting to list the processes which swap most.

    In my case top swapper is snort, followed by httpproxy (swapping amount depends heavily on sc_local_db setting..."mem" swaps a lot, "disk" too, "none" swaps nearly zero). I guess snort starts swapping a lot after reload due new patterns...

    Rest of the processes are not swapping too much...

    In my case with 4 gigs of memory and two CPU cores and nearly all features active in ASG it looks  like:

    Snort (num_instances$=2) / Webproxy (sc_local_db$=none) == ~30%
    Snort (num_instances$=2) / Webproxy (sc_local_db$=mem) == swap up to >50%
    Webproxy (sc_local_db$=mem) / Snort (num_instances$=1) == swap ~20...40%
    Webproxy (sc_local_db$=none) / Snort (num_instances$=1)  = swap