Use this cmdlet to change the maximum number of sync tasks that may process at the same time. Note that the free-use license only allows one SyncTask to process at a time, regardless of the MaxConcurrency setting.
PowerShell
Set-MaxConcurrency
- -MaxConcurrency
Description
Use the Set-MaxConcurrency cmdlet to change the maximum concurrency value on the host which is used by the task engine to determine how many SyncTasks can process simultaneously.
The MaxConcurrency value can be changed at any time, including when tasks are currently processing. If the MaxConcurrency value is set to a value that is less than the current number of active tasks, no task i terminated. The task engine will not start any new tasks until the number of active tasks changes to a number that is lower than the MaxConcurrency.
Increasing the MaxConcurrency will cause new sync tasks to be started, as long as the number of active tasks is less than the MaxConcurrency value.
IMPORTANT! Each active task is a multi-threaded processing engine. Each task executes as a separate background process, which has its own memory and CPU demands. Setting the MaxConcurrency to a large value without understanding whether the environment can handle such load can cause sync tasks to fail, and can overload an Exchange server. Priasoft recommends making small increases to the concurrency, with monitoring between each increase.
Consider the following points:
- More CPU+RAM ( we recommend 2GB per core ) generally means more concurrency.
- More concurrency will also mean more load on the Exchange servers for DISK, CPU, and RAM.
- The disk resources for an Exchange server are the most common bottleneck. It is recommend to track the Average Disk Read Queue Length or the Avergate Disk Write Queue Length counter from the storage system as an indicator of load or overload. If concurrency is too high, the counters mentioned are usually high as well ( > 3.0 ).
- Distribute connections across multiple Exchange servers when possible. If conncurrency is 10, having 5 active each across 2 Exchange servers is better than 10 active against one Exchange server.
- The disk counters mentioned can be high ( > 3.0 ) while all other counters are at a reasonable value. CPU and RAM on the host may also be low or nominal.
Some recommended patterns:
| Concurrency | CPU Core Count | RAM (GB) |
| < 5 | 4 | 8 |
| < 10 | 8 | 16 |
| < 20 | 12 | 24 |
| < 50 | 16 | 32 |
| > 50 | 24+ | 48+ |
A note on virtual machines:
When configuring settings on a virtual machine for high-utilization, be sure to “pin” physical resources and to understand when virtual devices will be “emulated” versus relayed to the physical layer. For example, setting a VM with a socket count of 4, with 1 core per socket is allowed by most architectures, even if the physical layer only has one socket. Unfortunately, this mismatch will cause 3 of the 4 cores to be emulated, because there is only one physical socket.
Examples
Example 1
PowerShell
Set-MaxConcurrency 4
This example sets the maximum concurrency to a value of four.
Parameters
-MaxConcurrency
The MaxConcurrency parameter specifies the maximum number of sync tasks that can be processed simultaneously.
NOTE: Setting this value to a number at or less than zero will result in a concurrency of one.
