Guest User!

You are not Sophos Staff.

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

UTM Performance Crashes with A/V Scanning, but CPU only at 12%

I'm having an issue with Sophos UTM 9.307 that when it performs A/V scanning on large file (300 MB) downloads, my entire network comes to a screeching halt, with several machines dropping network connection or freezing up.  BTW, I'm using the dual A/V scan.

My UTM installation is on a home-built machine using an Intel i7-4790k CPU @ 4.0 GHz, hyperthreaded with 8 cores, 8 GB RAM and a 60 GB SSD, Z97 chipset.  NIC's are a single Intel i-350, 4 port (only 2 used - one WAN, one LAN) and an Intel NIC built onto the motherboard.  I wouldn't think I'd be potentially hardware limited with this setup.

Per posts here on the Sophos BBS, I've disabled Intel's "Enhanced SpeedStep" and "Turbo Boost" options in BIOS, along with the enhanced "C states".  I've also performed BarryG's recommendation at the console:

echo "performance" >/sys/devices/system/cpu/cpuN/cpufreq/scaling_governor

for each logical CPU 0-7.

The maximum CPU usage I've ever recorded in Sophos UTM during normal operation is around 12% when performing a scan on a single 300 MB download.  Note that this 12% corresponds to about 100% loading of one logical CPU core.  I was able to get around 17% CPU usage once when I tried the same download and scan operations on 2 machines (real machines, not VM's) simultaneously, but that completely locked up the network and I only had a few other machines running.  When not performing A/V scanning, my CPU hovers around 1-2%, since we don't have that much network traffic right now.

It seems like the UTM isn't taking full advantage of all the CPU horsepower that is available.  I could understand one of the connections / scans being tied to a logical CPU (with SNORT, etc) and locking it up, but it seems like the UTM would transfer other connections to other logical CPU's and not lock up the entire network.

BTW, the dual A/V scan of the 300 MB file took a couple of minutes.  Does this sound reasonable given the hardware?

It's almost as if the UTM is only using one of the available 8 logical cores to do almost all of the work in my system.

I'm aware that hyperthreading could be an issue due to the way the OS assigns the logical cores, such that logical core 0 and 1 are essentially the same physical core.  I could see this as being a problem when core 0 is at 100% load and the OS tries to give work to the next logical core (1 in this case), which is really already at 100%, but I thought that the underlying OS was "smart" enough to realize this.

Should I disable hyperthreading?  If so, will this corrupt my current Sophos UTM installation that expects to see 8 CPU's?

Does anyone have any other suggestions on setting, etc that would enable the full potential of this hardware setup or is this "normal" / to be expected?  

Thanks in advance,

- Ben


This thread was automatically locked due to age.
  • Barry,

    "cc get ips num_instances" returned a value of "2".

    At this point, I'm fairly convinced that a re-install with HT turned off is the best solution to my situation.  One interesting option that this would give me (since I'm using an i7) would be the ability to test with 4 "real" cores, with no HT (essentially an i5) vs. 2 "real" cores with HT enabled (essentially an i3).  In this case, the OS/UTM should always see 4 CPU cores.

    BTW, I find it interesting that the UTM's running in VM's don't seem to have this same issue with changing the number of cores available.  What VM's are you guys using?  I tried using VirtualBox awhile back when I first started trying Sophos UTM, with little success, then realized that VirtualBox wasn't really supported.

    Thoughts?

    Thanks,

    - Ben
  • Barry,

    "cc get ips num_instances" returned a value of "2".

    At this point, I'm fairly convinced that a re-install with HT turned off is the best solution to my situation.  One interesting option that this would give me (since I'm using an i7) would be the ability to test with 4 "real" cores, with no HT (essentially an i5) vs. 2 "real" cores with HT enabled (essentially an i3).  In this case, the OS/UTM should always see 4 CPU cores.

    BTW, I find it interesting that the UTM's running in VM's don't seem to have this same issue with changing the number of cores available.  What VM's are you guys using?  I tried using VirtualBox awhile back when I first started trying Sophos UTM, with little success, then realized that VirtualBox wasn't really supported.

    Thoughts?

    Thanks,

    - Ben


    I use hyper-v
  • This weekend I did a full re-install of the UTM with HT disabled, so now I have 4 "real" cores operating at 4.0 GHz.

    Prior to the re-install, I did a timed download and timed A/V scan of the NVIDIA driver that I've been testing.  These timed tests were with HT enabled (8 logical CPU cores) and "cc set ips num_instances" equal to "1", "2" and "6" (just for grins).  The results for each of these three tests were identical to within a second two (well within statistical / error margin):

    Download = 38 seconds
    Dual A/V Scan = 124 seconds

    During each download / scan, 1 CPU core would be pegged at 100% (which core was pegged would vary), while the other cores, generally idled along.

    After the full re-installation of the UTM and restoration from my backup, I re-ran the same download / scan test with "cc set ips num_instances" equal to "2" (default).  The timed results were IDENTICAL to the previous tests with 8 cores.  Also, only one core would fully engage with "httpproxy" at 100% while the other 3 cores idled along.

    I'm still going to try tests varying the number of "cc set ips num_instances" and try using 2 hyperthreaded cores, but I'm really surprised that I didn't see ANY difference when I disabled HT.

    I'm assuming that the "httpproxy" service is just that, the Proxy service (I'm operating in "transparent" mode).  Why then is this the bottleneck?  I thought that Snort itself was the offender here, but the Snort process itself doesn't appear to be using that many CPU resources.

    I know I'm beating a dead horse, but it just "seems" like this should work [;)]
  • what is your wan speed?  Also nvidia doesn't have the fastest servers around.  you are running such overkill that you probably won't be able to "push" things fast enough to do anything else.  I do not know for sure if the a/v scanners are highly MT but the proxy itself IS.  When i open 42 tabs in the morning i can easily see between 250% and 300% cpu from http proxy w/dual scan upon launch of my chrome when i open those 42 tabs.  One single download form a highly overspecced system on a slow site isn't going to do much.

    If you seeing that kind of performance degradation upon dual scan a/v you have other issues.  Either hardware inside your system that is running utm OR you have a network issue.  I would try installing hyper-v 2008 onto your hardware(unless you are running windows 8 then use hyper-v 2012) and once you have it configured then setup utm inside that and see if the issues do not go away.  If you are running intel nics you could also be having issues with bare metal installs too.  The UTM software is capable of performing well and usually does.  In this edge case i think there is either a mis configuration or a hardware incompatibility or malfunction problem as some kind...that combined with massive overspecification is causing this issue not a fault in the UTM software(yes it has plenty..
  • William,

    Thanks again for the insights and advice.  You've given me a roadmap of things to test and I appreciate it.  I will give them a try.  I agree that there's some hardware glitch or something unique to my system that's causing the other CPU cores to not fully engage (coupled with the overspecc'd system).  I would have guessed that it had something to do with being a Haswell CPU, since they're still relatively new and I've seen unique issues with Haswell i5's and i7 with other software packages.  However, you mentioned that you're currently running Haswell CPU's, so maybe Hyper-v is the difference.

    I've been looking for an excuse to learn Hyper-V, so here's my chance!  I've always been a little cautious of running a firewall/UTM in a VM, from a security standpoint, due to my experience level with properly setting up a VM to avoid opening up a security "hole" that I'm unaware of.  I know that it can be done and is run commonly as such.  However, being able to run Sophos UTM on bare metal was one of the primary drawing points for me.  

    WAN download speed is spec'd at 80 Mbps, but I actually get closer to 85 Mbps on speed tests.

    I'm a little surprised about your comment on the Intel NIC's.  I was under the impression that Sophos was most compatible with Intel NIC's (understanding that there are exceptions to the rule), especially their "server" NIC's, like the i350 I'm using.  Is this not the case?  

    Would you recommend enabling or disabling certain CPU features in BIOS, such as Intel Vt-d, execute disable bit, etc or does it not really matter?

    Thanks,

    - Ben
  • William,

    Thanks again for the insights and advice.  You've given me a roadmap of things to test and I appreciate it.  I will give them a try.  I agree that there's some hardware glitch or something unique to my system that's causing the other CPU cores to not fully engage (coupled with the overspecc'd system).  I would have guessed that it had something to do with being a Haswell CPU, since they're still relatively new and I've seen unique issues with Haswell i5's and i7 with other software packages.  However, you mentioned that you're currently running Haswell CPU's, so maybe Hyper-v is the difference.

    I've been looking for an excuse to learn Hyper-V, so here's my chance!  I've always been a little cautious of running a firewall/UTM in a VM, from a security standpoint, due to my experience level with properly setting up a VM to avoid opening up a security "hole" that I'm unaware of.  I know that it can be done and is run commonly as such.  However, being able to run Sophos UTM on bare metal was one of the primary drawing points for me.  

    WAN download speed is spec'd at 80 Mbps, but I actually get closer to 85 Mbps on speed tests.

    I'm a little surprised about your comment on the Intel NIC's.  I was under the impression that Sophos was most compatible with Intel NIC's (understanding that there are exceptions to the rule), especially their "server" NIC's, like the i350 I'm using.  Is this not the case?  

    Would you recommend enabling or disabling certain CPU features in BIOS, such as Intel Vt-d, execute disable bit, etc?

    Thanks,

    - Ben

    no if you want to run any kind of hypervisor leave everything on..and i would enable HT as well..[[:)]]  don't run more than 4 vpus though.  The extra "threads" will be useful for hyper-v self- management..[[:)]]
  • Running with and without IPS (don't forget flood protection) can help narrow down its influence on throughput.

    httpproxy debugging can shed some light on what is going on with the proxy but the volume can be overwhelming.

    Check current settings:
    cc get http debug


    Reset back to [0] (disable debugging):
    echo -e "RAW\nset([0],'http','debug')" | cc --batch


    Enable debugging with 1 and enable a few categories (more/different categories may be of interest for this situation):
    echo -e "RAW\nset([1,'hdr','req','scan'],'http','debug')" | cc --batch


    http debugging log appears in /var/chroot-http/var/tmp/httpout

    List of categories:
    all auth cache confd conn dns epoll filepool hdr module profile req resp scan ssl time