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

Slow SEC 5 response

I've found since upgrading to SEC5 the console is very slow when clicking on a computer in the status view in order to view its details.  The screen will come up blank and then just over 2mins later the details finally appear.

Anyone else have this?  I'm not sure if this is a common problem as I had a quick search through the forum but couldn't find any posts on the issue.

:21043


This thread was automatically locked due to age.
  • Hello CDC,

    this is not how it should be. How many clients, and does it happen with any computer any time? An excessive number of alerts and events could cause this, but this affects usually only viewing the particular client(s).  Is this the only function showing delays - using Events to view the different categories is there also a delay? Might be worth to check the load on the database instance and the database size.

    Christian

    :21045
  • HI Christian,

    Yes this happens on any computer that's clicked on.  We currently have about 650 clients with a database size of 414mb.  The rest of the console seems to run ok, looking at our database server it isn't under any stress under normal conditions or when opening up the PC details window.  Maybe our database has become a bit bloated through the various upgrades?

    :21101
  • Hi,

    I have significantly less than that for 3000+ clients. We know that size doesn't matter ;) but this sounds too high. As for remediation - I'm after-work already and likely won't come up with any ideas before Monday. You said that it started after the last upgrade?

    Christian
    :21111
  • Hi,

    Do you have SQL Profiler installed on the database machine?

    As the data displayed in the computer details window is the result of a number of queries, I would try and identify which component is taking the time.  Monitoring the "Duration" of the various component queries in SQL Profiler will tell you which tables perhaps should be purged?

    For example, when opening the details of a computer I see the following query of many taking place:

    exec dbo.ErrorHistoryListGet '2012-01-20 21:28:31',N'1,',N'SAV,'

    which is providing the computer details window with the SAV error history for machine with ID = 1.  I.e. the machine's computer details I opened.  What is the duration of this query for you?  note, they are in milliseconds.

    Other queries that are part of the query are:

    exec dbo.ErrorAlertOutstandingIDListGet N'1,',N'SCF,',100

    exec dbo.ErrorAlertOutstandingIDListGet N'1,',N'ALC,',100

    exec dbo.ErrorAlertOutstandingIDListGet N'1,',N'SEA,',100

    There are quite a few more but you will see them all in SQL Profiler.

    The "Duration" column is the key here to pinning down where the delay is coming from.


    Regards,

    Jak

    P.S. If you don't have SQL Profiler (You need full SQL Server rather than just SSMS), there is another way to get the information out of SQL and that is to turn on C2 Level Auditing in SQL comination with running "fn_trace_gettable" queries against the trace file: http://msdn.microsoft.com/en-us/library/ms188425.aspx .  A bit clunky and will slow down the SQL server to some degree but it will work also, you can also use clauses against the duration column to narrow down results.  Even if you have SQL Profiler you can save the Profiler trace and perform the same queries against the trace if that's easier than using the GUI of Profiler.  

    The other option and possibly simpler is free SQL Profiler like tools; you can find them by searchin on Google.

    :21125
  • Hi Jak,

    We're only running SQL express on our Sophos server but we have the full version on another server so used the profiler on that to monitor.  The queries you listed seemed to run fairly quickly between 23-35ms.  Scrolling through the logs looking for long duration times i found one query which took 62556ms which was:

    exec dbo.ComputerDescriptionAndOSUpdate 1580,34,N' '

    Is this query related to opening the computer description?

    Not being an expert on SQL, what options would i have to compact or clear up the database if it is bloated?

    Christian, it definatly has become a lot slower since the upgrade.  It wasn't quick before, but you'd see the populated window between 5-6 secs after clicking.

    Cheers

    :21281
  • HI,

    I think that long duration is a bogus reading by SQL Profiler; that stored procedure is called in response to a status message coming in from a client causing the 'computersanddeletedcomputers' table to be updated for a given machine with regards to upating the OS or description field.  It wouldn't be related to what you're experiencing.

    If you want to purge alerts you could use PurgeDB.exe (http://www.sophos.com/support/knowledgebase/article/109884.html ) but it would be nice to correlate the problem with "too much data" of one type or another to even know what to specifically purge.

    The other option to help us to understand if it's related to the amount of date might be to do as follows:

    1. Open SQL Server Management Studio and connect to the instance in use.

    2. Right click on SOPHOS50 and choose "Reports" -  "Standard Reports" - "Disk Usage by table"

    Does that report help identify any tables with more records than you would expect?  Maybe you could make that available here?

    Otherwise, it might be worth creating a support ticket so they can maybe do a remote access to witness the behavior?  If you have SQL Profiler and SQL Management Studio available they should be able to identify the problem quite quickly.  If a remote access is not possible, you could backup your SOPHOS50 database with BackupDB.bat and send that in to them.

    One more thing, http://www.sophos.com/support/knowledgebase/article/111353.html is also worth a quick read.

    Regards,

    Jak

    :21297
  • This is the output of the report.  There's a few with over 100,000 records which seems quite high but not having something to compare it against makes it hard to see whether that might be normal.  Another question regarding databases is that after upgrades the old databases are left on the server (so there now 5 sophos databases ranging from version 3 - 5)  Are these still needed?

    Table Name# RecordsReserved (KB)Data (KB)Indexes (KB)Unused (KB)
    dbo.AggregatedCompliancePolicyTypes1016880
    dbo.CCLRuleCCLMapping10328240
    dbo.ComputerEventsSummary3278040400
    dbo.ComputerGroupMapping1,1732408812032
    dbo.ComputerListViewSearchColumns62328240
    dbo.ComputerPolicyMapping10,9901,10466440040
    dbo.ComputerPolicyStates6,4791,808832872104
    dbo.ComputersAndDeletedComputers1,1732,7761,0881,288400
    dbo.ContentControlLists1852,6962,6007224
    dbo.ContentControlListTagMapping00000
    dbo.DashboardConfiguration7488400
    dbo.DashboardConfigurationEvents4328240
    dbo.DashboardDefaultEventThresholds4328240
    dbo.DataPoints26,2242,7041,584904216
    dbo.DataPolicyNonCompliant176,81312,1766,1925,840144
    dbo.DataProtectedCount311,37421,26410,83210,256176
    dbo.Defaults20328240
    dbo.DeployedPackages00000
    dbo.EmailAlertRecipients1488400
    dbo.EmailAlertsSMTPParameters1328240
    dbo.EMLibraryServers00000
    dbo.Enumerations266168644856
    dbo.EnumNames3488400
    dbo.EnumValueNames11328240
    dbo.ErrorAlertFilters8328240
    dbo.Errors166,21033,81618,95214,728136
    dbo.Events67,67733,63223,6649,832136
    :21469
  • dbo.Events_DataControlData00000
    dbo.Events_DeviceControlData7252161281672
    dbo.Events_FirewallData66,95230,53630,40012016
    dbo.Events_TamperProtectionData00000
    dbo.Events_Web00000
    dbo.ExemptedDeviceDetailsMapping1328240
    dbo.ExemptedDevices2328240
    dbo.ExemptionDetails1328240
    dbo.GroupPolicyMapping2,250336128104104
    dbo.Groups15111224880
    dbo.GroupTypeMapping00000
    dbo.GroupTypes00000
    dbo.IDELists3313,1282,56856504
    dbo.LatestData244,0724,0242424
    dbo.NotificationReportingMapping10328240
    dbo.Packages1,953984392480112
    dbo.PatchStatus00000
    dbo.Permissions19328240
    dbo.Policies2142,6882,144208336
    dbo.PolicyExemptionDetailMapping1328240
    dbo.PolicyRuleMapping00000
    dbo.ReporterParameters116880
    dbo.Reports107224480
    dbo.RolePermissions41328240
    dbo.Roles5328240
    :21471
  • dbo.RuleContentControlLists1016880
    dbo.RuleRuleCCLMapping10328240
    dbo.Rules148032480
    dbo.SDDMLocations1216880
    dbo.SDDMPackages3,013400128128144
    dbo.SDDMServers58856320
    dbo.SubEstateGroupMapping1328240
    dbo.SubEstates1488400
    dbo.SyncPointData30488400
    dbo.TagCategoryLocalisations00000
    dbo.Tags00000
    dbo.TagValueLocalisations00000
    dbo.ThreatEvents2,681800280384136
    dbo.ThreatMasterList1,70666432027272
    dbo.Threats7184321520
    dbo.ThreatsArchive32443217624016
    dbo.Upgrade116880
    dbo.UserRoles6328240
    dbo.Users17328240
    dbo.UserSubEstates6328240
    dbo.WebControlStatus00000
    :21473
  • HI,

    None of those row count numbers standout as being ridiculously  high, certainly not high enough to cause the problem you report with sensible hardware.  

    You can drop the old databases, i.e.. SOPHOS3, SOPHOS4, SOPHOS45, SOPHOS47.  All the data has been copied from the previous to the latest database as part of the upgrade.  I always tend to back them up and then drop them once I know the latest has all the data and seems to be OK.  http://www.sophos.com/support/knowledgebase/article/17508.html .

    I'm afraid that without seeing the slow computer details issue, I'm not sure what else to suggest.  You could check the average disk queue lengths performance counter in performance monitor where the mdf and ldf reside, do these spike when you bring up the computer details?  Is it a disk resource issue?

    Using SQL Server Management Studio, if you connect to the SQL instance, right click on the instance from the tree view you can start Activity Monitor. Are there any "Recent Expensive Queries" you can tie to this operation?  Data I/O OK?

    I think you're best bet is to raise a call with Support and reference this forum thread, I suspect they will want to do a remote access as I think this one needs to be seen first hand.

    Jak

    :21485