Optimising Performance

Speed Naverisk up with some key performance improvements.

Updated over a week ago

Introduction

If you find that Naverisk is running slowly, then there are a few things that can be done to help speed it up. The areas which can offer the most significant performance improvement after Optimization are:

  • IIS (which hosts the Naverisk website)

  • The Naverisk SQL database

  • The computer used to host the Naverisk Site Controller

In the following chapters we will explore exactly how to optimise each of these components.

1.0 How to Optimise IIS

In this chapter we will cover how to Optimize IIS, by compressing the data which is delivered by IIS for web requests, setting the Maximum Worker processes and setting the Application Pool Recycling. The steps are as follows:

1.1 Compressing IIS Web Requests

You need to ensure static and dynamic content compression is enabled. These are Web Server role services and can be added from Server Manager.

  1. Open IIS after you have installed the role services in step 1. Enable Static and Dynamic Content Compression and specify the thresholds for Compression as per the following screenshot:

2. Edit the Compression module of the Default (Naverisk) Web Site so that both Dynamic and Static Content Compression are enabled:

3. Highlight the top level IIS structure and open the Configuration Editor:

4. Navigate to the system.webServer/serverRuntime section of the Configuration Editor and configure it as follows:

In particular please ensure that the frequentHitTimePeriod is set to 00:10:00 and the frequentHitThreshold is set to 2. This will ensure more frequent caching for files than you would have by default.

5. Then restart the IIS Admin Service so that the changes you have made can take effect. Note that while the IIS service is restarting, your website will not be able to service web requests. For this reason, you may want to schedule this to happen outside business hours.

1.2 Configuring Maximum Worker Processes

To prevent response timing issues with web requests, set the maximum Worker Processes to 1. This will ensure that these requests will be queued and processed one at a time.

  1. Open IIS

  2. Navigate to Application Pools in IIS

  3. Select the DefaultAppPool and click ‘Set Application Pool Defaults’

  4. Set ‘Maximum Worker Processes’ to 1 (if it is not already)

1.3 Configuring Application Pool Recycling

It is recommended to set the Application Pool Recycling to run every 3 hours, this will help with maintaining optimal performance.

  1. In the Application Pool section of IIS, select the DefaultAppPool again and click ‘Recycling’.

  2. Specify the following times for recycling the App Pool:

12:00 a.m.,3:00 a.m.,6:00 a.m.,9:00 a.m.,12:00 p.m.,3:00 p.m.,6:00 p.m.,9:00 p.m.

2.0 How to Optimise the Naverisk SQL Database

Naverisk has the functionality to perform daily maintenance operations out of the box. This involves the cleaning of very old monitoring statistics and the moving of old Archived Tickets to a separate table (thereby reducing the time required to find and retrieve ticket information). By default, it runs at 1am for 2hours daily.

To customize this this, you just need to edit the Site Controller Configuration File to specify at what time you would like to start database maintenance work and how long you would like this maintenance window to run for. The Site Controller Configuration File is located under:

C:\program files (x86)\naverisk\sitecontroller\NaveriskSiteController.exe.config (64-bit systems only)

The steps for enabling SQL database maintenance are as follows:

**Note – Do not copy and paste these commands into NaveriskSiteController.exe.config. To avoid problems due to automatic formatting adjustments by text editors, please retype the commands rather than copying them from this document**

  • Edit the NaveriskSiteController.exe.config file in Notepad

  • Search for the word “MaintWindowStartHour”.

If this key does not exist then please add it to the  section of the config file like so:

 “x” in this context is the circadian time you wish to start database maintenance (0 - 23 with 0 being midnight), taking into account the time zone of your Site Controller server.

  • Search for the word “MaintWindowLengthHours”. 

If this key does not exist then please add it to the  section of the config file like so:

 “x” in this context represents the number of hours you permit database operations to run. A value of 0 means that Naverisk will not run daily maintenance operations.

  • Arrange for the Naverisk Site Controller Service to be restarted at a suitable time, so that the changes you have made can take effect.

2.1 Specify Memory Allocation for SQL

Setting a specific ‘Maximum server memory’ size will ensure that SQL does not allocate too much memory whilst running a large query as this could affect the performance of the Server’s Operating System and the Naverisk Website.

To set the Maximum server memory, right click on the Naverisk Database in SQL, select Server Properties and add the Maximum server memory amount in MB

Note: Our best practices are that the Maximum Server Memory should be set to half the available physical memory

3.0 Optimising the Naverisk Site Controller Host Server

The main concept behind Optimization of your Naverisk Site Controller Host Server is to ensure there are sufficient resources for Naverisk to run, and to prevent other applications on your server from competing with Naverisk for these resources.

To that end, we recommend the following:

  • Make sure that your host server meets the recommended hardware specifications as outlined in the Admin and Installation guide (included in each Naverisk installation package).

  • Add an exception for your antivirus software to specify that you do not wish to scan the folder “C:\%programdata%\Naverisk\Network Controller\DataStorage\”, or any of its sub-folders. This is a temp folder which contains transient information.

  • For best performance, a dedicated server (physical or virtual) will deliver better performance than one which performs multiple roles (such as an SBS system) or is hosting other applications.

4.0 How to keep the Database from growing too large

Microsoft SQL Server makes an LDF file for each Database (MDB) file created. The purpose of the LDF file is to hold a database transaction log. Some partners find that this LDF file grows unchecked, because SQL does not clear the transaction logs as it should.

Shrinkage of the LDF file happens only during a SQL database backup. To keep this file regularly maintained therefore, it is advisable to schedule a regular SQL Database backup. Some points to consider with regards to this backup are:

  • When scheduling the backup, you have the option to utilise the full recovery model or simple recovery model as an alternative. With the Simple recovery model LDF shrinkage is unnecessary because all transactions are written to the Database and then erased from the LDF thereafter. However, you lose the ability to do point in time recovery using this model. Use the full recovery model if you wish to have the ability to do a point in time recovery.

  • If you are using 3rd party reporting tools with your Naverisk database, these may leave file locks in place that prevent the LDF file from shrinking during backups. If you find that this is happening, you could try restarting your SQL server (to remove these file locks) then rerun the SQL backup when there are no locks in place.

5.0 Manually Shrinking the SQL Transaction Log File

If you find that your SQL Transaction log file has grown to a very large size, you can shrink this by performing the following steps:

  1. In SQL Server Management studio, select the Database > Properties > Options

  2. Set Recovery Mode to Simple

NOTE: If you need to change your recovery mode, you will need to perform a SQL database backup first before proceeding.

3. Select the database > Task > Shrink > Files
4. Under the File Type drop-down list, choose Log.
5. Confirm that you would like to begin shrinking this file by clicking 'OK'.

Did this answer your question?