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..[:)]
  • Hi Mark,

    Here is the vmstat file.


    thanks for providing the information!

    Two questions: at roughly which time did you start the command? Did you experience any performance problems during the time the vmstat command ran?

    Cheers,
    Kai
  • Here is the vmstat file.


    Taking a look at it, I can say that your system isn't under memory pressure. The maximum that got swapped out was 160 kilobytes (in only one of those 3 minute periods). And most of the time, there is no swapping activity at all.

    I took the time and moved the data into a spreadsheet to generate a graph of it: blue line corresponds to si, green line to so. The X-axis shows the 24 hours that we recorded, on the Y-axis you find the kilobytes swapped.

    I'm really curious how Williams vmstat would compare to this, once he publishes his stats!

    Cheers,
    Kai

    PS: I found this link to a Linux Journal article that explains a little bit of the vmstat background.
  • Oh, and btw: if you don't trust me, you can easily check for your own. This command replaces the whitespace with ';', so you can import the .CSV file into Excel or whatever you use. You maybe have to delete the first to lines manually with a text editor, depending on your spreadsheet.
    perl -lpe 's/\s+/;/g' vmstat.txt > vmstat.csv


    Have fun!
    Kai


  • Taking a look at it, I can say that your system isn't under memory pressure. The maximum that got swapped out was 160 kilobytes (in only one of those 3 minute periods). And most of the time, there is no swapping activity at all.

    I took the time and moved the data into a spreadsheet to generate a graph of it: blue line corresponds to si, green line to so. The X-axis shows the 24 hours that we recorded, on the Y-axis you find the kilobytes swapped.

    I'm really curious how Williams vmstat would compare to this, once he publishes his stats!

    Cheers,
    Kai

    PS: I found this link to a Linux Journal article that explains a little bit of the vmstat background.


    Once there is an upgrade from v8 I'll see what happens...since we are near GA I've deleted my beta vms.

    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've deleted my beta vms.


    Do you suggest that I close this thread then?

    Cheers,
    Kai
  • Hi Kai

    Quote
    "Two questions: at roughly which time did you start the command? Did you experience any performance problems during the time the vmstat command ran?"

    1. Started around 13:00 (from memory)
    2. I did not notice any real change in "normal" Astaro performance. 

    I have done/tired a lot of performance tuning

    ps I have a 100Mb cable link with Astaro I get a maximum of 20Mb downloads. At the cable modem directly I get 70Mb downloads.

    In the next month I will be building a new FW based on top of the range hardware to see if that changes overall throughput performance.

    Mark
  • ...While waiting, please log out from the SSH shell, and don't use the webadmin to constantly look at your memory....

    I am running the command right now and will probably have similar numbers to Mark. However I don't agree with the testing methodology. In a regularly used system, there would not only be webadmin logins, there will also be user portals that will become active at certain times. Depending on how the sytem is setup, a lot of users might log in at the same time. I also think it would be normal for an admin to look at user activity using webadmin to tweak certain settings or allow access to certain blocked pages.

    Just because all the core daemons are finished swapping doesn't mean that there won't be any additional paging by admin while using webadmin for thing like configuration changes, creating reports and alike. As I mentioned before, I am fairly satisfied with this final version, however measuring the paging without using webadmin at all is not really a true representation of how much paging is going to take place if multiple admins log into webadmin and start tinkering with the system.

    Regards
    Bill
  • Hi Bill,

    However I don't agree with the testing methodology...


    I probably should have been more clear: what I meant is that you don't sit in front of the webadmin refreshing the dashboard every second while at the same time constantly checking every section of the reporting and looking at the traffic monitor on your third monitor. You wouldn't get paid for that on your real day job too, right? Just normal usage, and if this includes the Portal and checking the logs once or twice a day, I'm fine. 

    Cheers,
    Kai
  • Thanks for the clarification. Here are my results and I had the max so of 58KB during one interval as my system load is very low. This looks good on my machine, lets see how it does when we put it in production under heavy loads[;)]
    Regards
    Bill
  • ps I have a 100Mb cable link with Astaro I get a maximum of 20Mb downloads. At the cable modem directly I get 70Mb downloads.


    I'm only guessing here, but do you have IPS enabled? If so, tweak the settings to only include the settings that you need, ie. turn those rules off that don't apply to your network.

    Cheers,
    Kai