Monday, December 21, 2015

Throttling Office 365 PST Upload traffic

Microsoft Office 365 has offered automated "PST upload" service called "Office 365 Import Service". This feature is in “Public Preview” through August 2015 and it's free while is in Preview Stage. It looks like it will become a paid feature in General Release based on the amount of data (/GB) being imported into the service. Microsoft anticipate making this service available for purchase sometime in the first quarter of 2016.

Very nice feature to migrate small customers with their non-Exchange main mailboxes and middle/large customers with their PST archives exported from archive solutions (or you can ship SATA II/III hard drives to Microsoft as well) to Exchange Online

Focus of this post won't be on "Office 365 Import Service" configuration. Process is very straightforward and described on technet. But I will be focused on network traffic throttling process during PST upload.

Microsoft Azure AZCopy Tool and Azure Storage Explorer are tools used to upload and manage PSTs in Office 365.


We've found out that we can easily reach limit of bandwidth capacity for customer environment during PST upload and provide unnecessary load (ex. during business time) on customer network.

Starting from Windows Vista/Windows Server 2008 we've got nice feature called Policy-based QoS. Feature still works for the latest Windows OS.

If you like UI-based process:

1. Start mmc
2. Add Group Policy Object Editor for Local Computer (assuming you run AzCopy on local server)


3. Go through Policy-based QoS Wizard, configure throttling limit (ex. 20 Mb/s) which applies to your particular environment and application AzCopy.exe executable


4. Once Policy-Based QoS is configured you can start using Microsoft Azure AZCopy Tool for upload process.

For Windows 8/Windows Server 2012 and later we have PowerShell New-NetQosPolicy cmdlet
control under QoS policies (Run as Administrator):

New-NetQosPolicy –Name "AzCopy" -AppPathNameMatchCondition AzCopy.exe -ThrottleRateActionBitsPerSecond 20MB

You can change throttle rate on the fly during upload process and it's really cool!

Set-NetQosPolicy –Name "AzCopy" -AppPathNameMatchCondition AzCopy.exe -ThrottleRateActionBitsPerSecond 100MB

By default AzCopy tries to utilize multiple concurrent operations for PST upload which may to lead to following errors on slow link connections:

[2015/12/21 14:18:46][ERROR] archive1.pst: Unable to connect to the remote server
[2015/12/21 14:18:48][ERROR] archive2.pst: Unable to connect to the remote server
[2015/12/21 14:19:07][ERROR] archive3.pst: Unable to connect to the remote server
[2015/12/21 14:28:17][ERROR] archive4.pst: The client could not finish the operation within specified timeout.
The client could not finish the operation within specified timeout.
[2015/12/21 14:28:34][ERROR] archive5.pst: The client could not finish the operation within specified timeout.
The client could not finish the operation within specified timeout.
[2015/12/21 14:28:34][ERROR] archive6.pst: The client could not finish the operation within specified timeout.
The client could not finish the operation within specified timeout.

To resolve such behavior you can consider AzCopy with /NC:1 or /NC:2 key:

.\AzCopy.exe /Source:\\FileServer\Data /Dest:https://3bc222bbb65a457777c0444.blob.core.windows.net/ingestiondata/FileServer/Data/ /Destkey:/ui2Jiu8uihiuUI6HdokDPJsdflEU1FPnvOp63HkqwY1IP19dTPSAM0y26FLoaNpjZzCtu+DtJA1pUl6EQg== /S /NC:1 /V:E:\PSTUpload\Uploadlog.log  

where:
  • /NC - is a number of concurrent operations;
  • /Source - Source fileshare directory. Required. Where the PST data is currently located;
  • /Dest - Destination virtual directory. Required. Location where PST files are staged in Azure;
  • /Destkey - Storage Key. Required. The key for the Azure storage account;
  • /S - Specifies recursive mode for copy operations. In recursive mode, AzCopy will copy all blobs or files that match the specified file pattern, including those in subfolders;
  • /V - Outputs verbose status messages into a log file (local path E:\PSTUpload\Uploadlog.log)

Some other network and capacity related notes:
What is the size of the largest PST that can be imported?
"In our testing we have found that if there are more than 1 million items in a folder in a PST, the import fails. Because it is hard to determine number of items, an approximate assumption is PST files that are of size 10 GB. If you have files that are larger than 10 GB, please break them up into smaller files. We are actively working on supporting larger per folder limits."
Do I need a specific network connection (such as ExpressRoute) to use network uploads?"No. Any Internet-facing connection is supported."

References: