Increasing Queue processing performance in SMP 7.5 and 8.1

book

Article ID: 158565

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

NSEs are not processing in a timely fashion, or need to move files out of EventQueue.

Note: This document covers queue performance in SMP 7.5 and higher. For SMP 7.1 SP2 or 7.1 SP2 MP1, please see TECH183347 "How to increase Queue processing performance in NS 7.1 SP2". For SMP 8.5, please refer to TECH251902 "Increasing Queue processing performance in SMP 8.5"

Environment

ITMS 7.5 and 8.1

Resolution

 

 

Step 5 is optional

  1. Stop the Altiris services:
    • Altiris Support Service
    • Altiris Client Message Dispatcher
    • Altiris File Receiver
    • Altiris Event Receiver
    • Altiris Service
    • Altiris Object Host Service
    • Altiris Service Hoster
    • Altiris Event Engine

     

  2. Stop the IIS service
    • World Wide Web Publishing Service

     

  3. Move NSEs out of the eventqueue and into a temporary folder (cut and paste the NSE files to a different location)
    • Default location: C:\ProgramData\Symantec\SMP\EventQueue\EvtQueue
    • Or custom location that you may have (see KB TECH161370 for assistance in locating the folder if it is in a custom location)

     

  4. If a larger queue size is desired (Optional)
    • Edit the Windows Registry entry for "HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\eXpress\Notification Server". Increase the "MaxFileQSize(KB)" to the new desired queue size in bytes. 
    • The default is 512000 (512 kb).
    • The SMP can benefit from a larger queue size of between 2000000 and 4000000 (2 - 4 GB of harddisk space).
  5. Consider increasing these threadcounts and queue thresholds in the "C:\ProgramData\Symantec\SMP\Settings\coresettings.config" file to increase the threads available for each queue and balance the load across more queues.

Note: The following values are given as example and those are not the ideal values since each environment may need a different set of values. The general rule here is not to go too high at once and in most cases you may not need to change the entries the all.

< customSetting key="FastQueueThreshold" type="local" value="270000" />   (default is 250000)
< customSetting key="SlowQueueThreshold" type="local" value="6000000" /> (default is 5000000)
< customSetting key="MaxConcurrentFastMsgsThreadPoolSize" type="local" value="20" /> (default is 16)
< customSetting key="MaxConcurrentSlowMsgsThreadPoolSize" type="local" value="10" /> (default is 4)

  • To determine if changing the default configuration will be helpful, run this select query in SQL to see how many concurrent NSE files are being processed.

SELECT Queueid AS [QUEUE ID], COUNT(Id) AS [THREADS IN USE]
FROM EventQueueEntry where ProcessingState = 2
GROUP BY ProcessingState, QueueId order by queueid, ProcessingState

Expect to see around 10 or more threads working on a full queue.  If the results of this select statement show 1-4 threads running concurrently and there are plenty of NSE files to process, try adjusting these thresholds.

Important Notes:

  • In SMP 7.5, increasing the MaxConcurrentPriorityMsgsThreadPoolSize setting will give zero performance gain.  Since more threads are allocated but are never assigned work, increasing this setting can lead to slightly lower performance.
  • The LargeQueueThreshold does not need to be modified.
  • Coresettings does not have a value for MaxConcurrentLargeMsgsThreadPoolSize, it is hardcoded to 1 thread. 


Steps 6 and 9 must be done for these threshold settings to have an effect on your NSE backlog.  

  1. Clearing the event and merge tables with this SQL:

     

    • --Run first to drop foreign key

      IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_EventQueueEntryMetaData_EventQueueEntry]') AND parent_object_id = OBJECT_ID(N'[dbo].[EventQueueEntryMetaData]'))

      ALTER TABLE [dbo].[EventQueueEntryMetaData] DROP CONSTRAINT [FK_EventQueueEntryMetaData_EventQueueEntry]

      GO

       

    • --truncate the three tables

      truncate table eventqueue

      truncate table eventqueueentry

      truncate table [EventQueueEntryMetaData]

       

    • --validate that they are empty

      select * from eventqueue

      select * from eventqueueentry

      select * from EventQueueEntryMetaData

       

    • --run this to create the constraint again

      ALTER TABLE [dbo].[EventQueueEntryMetaData]  WITH CHECK ADD  CONSTRAINT [FK_EventQueueEntryMetaData_EventQueueEntry] FOREIGN KEY([EventEntryId])

      REFERENCES [dbo].[EventQueueEntry] ([Id])

      ON UPDATE CASCADE

      ON DELETE CASCADE

      GO

      ALTER TABLE [dbo].[EventQueueEntryMetaData] CHECK CONSTRAINT [FK_EventQueueEntryMetaData_EventQueueEntry]

      GO

‚Äč7. If you execute the following SQL code of:

--run this to create the constraint again

ALTER TABLE [dbo].[EventQueueEntryMetaData]  WITH CHECK ADD  CONSTRAINT [FK_EventQueueEntryMetaData_EventQueueEntry] FOREIGN KEY([EventEntryId])

REFERENCES [dbo].[EventQueueEntry] ([Id])

ON UPDATE CASCADE

ON DELETE CASCADE

GO

ALTER TABLE [dbo].[EventQueueEntryMetaData] CHECK CONSTRAINT [FK_EventQueueEntryMetaData_EventQueueEntry]

GO

Then, you see the following:

Msg 1769, Level 16, State 1, Line 4

Foreign key 'FK_EventQueueEntryMetaData_EventQueueEntry' references invalid column 'EventEntryId' in referencing table 'EventQueueEntryMetaData'.

Msg 1750, Level 16, State 0, Line 4

Could not create constraint. See previous errors.

Msg 4917, Level 16, State 0, Line 2

Constraint 'FK_EventQueueEntryMetaData_EventQueueEntry' does not exist.

Msg 4916, Level 16, State 0, Line 2

Could not enable or disable the constraint. See previous errors.

 

Please proceed to the next step.

8. Restart the SMP services:

  • Altiris Support Service
  • Altiris Client Message Dispatcher
  • Altiris File Receiver
  • Altiris Event Receiver
  • Altiris Service
  • Altiris Object Host Service
  • Altiris Service Hoster
  • Altiris Event Engine

 

9. Start the IIS service

World Wide Web Publishing Service

10. Move the previously saved NSEs to the EvtInbox or delete them depending on retention requirements.

 

11. Add an exclusion rule, in your Antivirus software, for the .nse text files or the EvtQueue folder.
 

Note: Also verify that you don't have the known issue referenced under TECH248162 "NSEs are been saved under c:\windows\system32\ inetsvr"