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..[:)]
  • 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 
  • So it seems the mem and disk "features" of the http proxy aren't "tuned" to really stay in ram in terms of other proxy portions..which decreases the overall benefit of using those settings....I'm running proxy in ram and two snorts...i really don't want to go back to cloudy proxy...but it seems to avoid the disk i/0 slowdown swapping gives i now have to roll the dice with the cloudy proxy?  Considering my client are averaging 100 ms plus that's not good.  I'm wondering why swap is being used at all expecialy when you and i have plenty of ram.

    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'm running http proxy db mem and two snorts btw.  i've got 32% swap going right now in a lightly loaded environment..i shudder to think what my church is going to experience once i put 25 on their machine.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • This is with 2 gigs of ram btw...i'll see if it incrases at all.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow


  • loginuser@gw:/home/login > uptime; free -m
     15:10pm  up 2 days 16:40,  1 user,  load average: 0.00, 0.02, 0.05
                 total       used       free     shared    buffers     cached
    Mem:          1002        916         85          0        325        294
    -/+ buffers/cache:        296        705
    Swap:         1023          0       1023


    O.o!
  • loginuser@firewall:/home/login > free
                 total       used       free     shared    buffers     cached
    Mem:       2055192    1832492     222700          0      15900     574192
    -/+ buffers/cache:    1242400     812792
    Swap:      1048572     465988     582584

    !!

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • common stats on all firewalls:

    http proxy mem
    ibm, vm have two snorts.  dell and atom have one snort.
    none of the v8 machines swap..at all..period.
    yes technically I am running an unsupported configuration...but i'm doing this due to the fact iv'e been assured by Astaro this is an official feature....whenever.
    only the vm(mine) is running v9 and you saw the swap usage i posted.

    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 am also very concerned about the swap file usage.
    I have an Intel Server MB with 4Gb installed running a 32b Astaro, after a number of days the 1Gb swap file is in full use.
    I'm about to build a new box that will have at least 8-16Gb ram.
    I will upload stats like the other when I get a spare moment.

    Mark
  • http proxy swappingquite a bit then snort:

    top - 07:14:53 up 1 day, 19:37,  2 users,  load average: 0.13, 0.11, 0.13
    Tasks: 147 total,   2 running, 143 sleeping,   0 stopped,   2 zombie
    Cpu(s):  4.3%us,  2.3%sy,  0.0%ni, 91.9%id,  0.6%wa,  0.0%hi,  0.9%si,  0.0%st
    Mem:   2055192k total,  2007504k used,    47688k free,    14648k buffers
    Swap:  1048572k total,   470712k used,   577860k free,   776344k cached

      PID USER      PR  NI  VIRT  RES  SHR S   %CPU %MEM    TIME+  SWAP COMMAND
     4374 httpprox  20   0 1653m 689m 3000 S      1 34.3  21:42.80 964m httpproxy
     5221 snort     19  -1  406m  43m 9152 S      0  2.2  13:44.03 362m snort_inline
     4736 snort     19  -1  406m  48m 9156 S      0  2.4   9:39.99 357m snort_inline
     3352 rrdcache  20   0  122m 1128  724 S      0  0.1   1:45.48 120m rrdcached
     3485 postgres  20   0 80160  820  724 S      0  0.0   1:44.77  77m postgres
     3486 postgres  20   0 80576 1376  804 S      0  0.1   0:44.58  77m postgres
     5279 postgres  20   0 82624 3492 2988 S      0  0.2   0:00.09  77m postgres
    24455 postgres  20   0 82648 4600 3464 S      0  0.2   0:33.41  76m postgres
     3481 postgres  20   0 80160 2256 2136 S      0  0.1   0:33.51  76m postgres
     4203 postgres  20   0 83040  10m 9468 S      0  0.5   1:07.52  70m postgres
     4553 afcd      19  -1 71920 6848 2220 S      0  0.3   1:34.01  63m afcd
     3544 root      20   0 70540  15m 1988 S      0  0.8   0:09.96  53m mdw.plx
     2355 root      20   0  272m 230m 2916 S      0 11.5   0:15.76  42m cssd
     3484 postgres  20   0 80160  43m  43m S      0  2.2   1:03.73  34m postgres
     3144 root      20   0 43576 8932 1188 S      0  0.4   0:10.61  33m confd.plx
     7526 root      20   0 54008  20m 2616 S      0  1.0  36:15.58  31m acc-agent.plx
     6183 root      20   0 44556  14m 1888 S      0  0.7   0:00.50  28m confd.plx
     2980 root      20   0 43756  13m 1800 S      0  0.7   0:04.48  28m confd.plx
     4920 root      20   0 30492 3528 1032 S      0  0.2   0:19.77  26m smtpd.bin
     4558 root      20   0 30624 5756 1060 S      0  0.3   2:53.62  24m smtpd.bin
     3304 root      20   0 13844 3544 1572 S      0  0.2   0:00.05  10m notifier.plx

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

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

    PfSense w/Suricata, ntopng, 

    Other addons to follow