Quantcast
Channel: Cracking the Vault
Viewing all articles
Browse latest Browse all 167

Improving SQL Replication Performance in High Latency Networks

$
0
0

This article was originally posted on the Vault Wiki, which has been deprecated.

 

Improving Merge Replication performance over high latency networks can be achieved by changing some of the default settings. NOTE The following should only be implemented if a problem arises and under the guidance of Autodesk.

After implementing TS20200238, follow these steps

  1. Stop SQL Server Agent and Defragment Vault and Library Databases from the ADMS Console.
  2. Change the Generation Leveling Threshold to 100,000
  3. Change some replication settings
  4. Follow the steps in the SQL Maintenance Plan.

 

1. Stop SQL Server Agent and Defragment Vault and Library Databases from the ADMS Console.

To be performed on each Connected Workgroup. (on each SQL Server and from one Vault Site Server in each Workgroup)

Stop the "SQL Server Agent (AUTODESKVAULT)" Service.

In the ADMS Console from one Site in each Connected Workgroup, right click the Vault or Custom Library database and select, Defragment

The above can be automated via the command line. the following example script assumes that Vault Server and the AUTODESKVAULT SQL instance are installed on the same machine.

SET VAULTPATH=C:\Program Files\Autodesk\ADMS {Professional\Collaboration 2011\2012\2013}\ADMS Console SET VAULTDB1=Vault SET VAULTDB2=Vault2 SET CUSTOMLIB1=AI2013_CUSTOMLIB SET CUSTOMLIB2=AI2013_CUSTOMLIB2

PAUSE

SC STOP SQLAgent$AUTODESKVAULT

PAUSE

"%VAULTPATH%\Connectivity.ADMSConsole.exe" -Odefragmentvault -N%VAULTDB1% -VUAdministrator -VP -S "%VAULTPATH%\Connectivity.ADMSConsole.exe" -Odefragmentvault -N%VAULTDB2% -VUAdministrator -VP -S "%VAULTPATH%\Connectivity.ADMSConsole.exe" -Odefragmentlibrary -N%CUSTOMLIB1% -VUAdministrator -VP -S "%VAULTPATH%\Connectivity.ADMSConsole.exe" -Odefragmentlibrary -N%CUSTOMLIB2% -VUAdministrator -VP -S

PAUSE

SC START SQLAgent$AUTODESKVAULT

PAUSE.

 

2. Change the Generation Leveling Threshold to 100,000

To discover the Generation Leveling threshold, in SQL Server manager on the Publisher, start a new query and type the following.

select generation_leveling_threshold from sysmergepublications

then to make the change

use Vault go sp_changemergepublication @publication='ADMS_Vault', @property= 'generation_leveling_threshold', @value= '100000' go

 

3. Change Merge Replication settings

On the Publisher, Start the SQL Server Management Console.

Right click Replication>Distibutor Properties.

Select "Profile Defaults"

Select the "Merge Agents" page.

Next to "ADMS Merge Subscription" select the 3 dot ellipsis button.

Change the following "Values"

-DownloadGenerationsPerBatch, Value = 2

-DownloadReadChangesperbatch, Value = 500

-DownloadWriteChangesperbatch, Value = 500

-LoginTimeout, Value = 1800

-QueryTimeout, Value = 45000

-UploadGenerationsPerBatch, Value = 2

-UploadReadChangesperbatch, Value = 500

-UploadWriteChangesperbatch, Value = 500

 To ensure that these settings are consumed for future publications, you can edit the web.config using Notepad, (make a copy before making any changes).

Default

   <replication.mergeagent.settings> 
    <add key="QueryTimeout" value="600" /> 
    <add key="LoginTimeout" value="120" /> 
  </replication.mergeagent.settings>

Edited

  <replication.mergeagent.settings> 
    <add key="QueryTimeout" value="45000" /> 
    <add key="LoginTimeout" value="1800" /> 
  </replication.mergeagent.settings>

 

 

4. Follow the steps in the SQL Maintenance Plan.

See the "SQL Maintenance Plans", under Perform Vault Maintenance.


Viewing all articles
Browse latest Browse all 167

Trending Articles