How To Control Azure File Sync Bandwidth With Network QoS #AzureFiles #AzureFileSync

| ,

Published on | Updated on January 16, 2020

3 Min. Read

Introduction

In July 2018, Microsoft announced the GA release for Azure File Sync. With Azure File Sync, you can centralize your files in Azure and then install a sync agent on Windows Server whether it’s on-premises or in Azure to provide fast local access to your files. Your server and Azure Files are constantly in sync, so you have one centralized location for your files with multi-site access powered by fast local cache and cloud tiering.

For more information about Azure File Sync, check my previous step-by-step guide on how to get started with Azure File Sync and PowerShell. Additionally, Microsoft streamlined the deployment of Azure File Sync in Windows Admin Center to make that process easier. Check the following article to learn more about Windows Admin Center and Azure File Sync. And recently, Microsoft announced Azure File Sync v6 support for Server Core installations.

When you install Azure File Sync, under the default configuration a server will consume maximum possible bandwidth for data transfer via the storage sync service, which may block other workloads that you need to function. This is especially critical when you have limited bandwidth in some branch offices.

In this quick article, I will show you how to limit and throttle the network bandwidth for Azure File Sync.

Azure File Sync Network QoS

With Azure File Sync, you can configure how much bandwidth the storage sync service is allowed to use at different times of the day. This can be done through PowerShell only, it’s not exposed in the Azure Portal at the time of this writing.

To do so, you need to open Windows PowerShell (as normal user) and import the Storage Sync module by running the following command.

Import-Module 'C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll'

Next, you need to create a network throttling schedule by running the following command. This command will create a weekly schedule starting from Monday till Friday, from 7 am to 6 pm and limit the network to 20Mbps. Outside that time, the storage sync service will use the maximum available bandwidth on your network.

New-StorageSyncNetworkLimit -Day Monday, Tuesday, Wednesday, Thursday, Friday -StartHour 7 -EndHour 18 -LimitKbps 20000

To check the current network throttling schedules you can run the following command:

Get-StorageSyncNetworkLimit | ft

How To Control Azure File Sync Bandwidth With Network QoS #AzureFiles #AzureFileSync 1

Last but not least, you can remove and delete the network throttling schedules by running the following command:

Get-StorageSyncNetworkLimit | ForEach-Object { Remove-StorageSyncNetworkLimit -Id $_.Id }

Here is a quick video showing you how to limit the network bandwidth in Azure File Sync in action.

How To Control Azure File Sync Bandwidth With Network QoS #AzureFiles #AzureFileSync 2

And there you have it.

There’s more…

If the File Server is running inside a virtual machine which is most probably the case, you can also leverage the Hypervisor network QoS feature to limit the network bandwidth. For more information, see QoS Common Configurations for Hyper-V. The same will apply for other Hypervisors as well.

Just make sure you do take into consideration the network bandwidth limitation to ensure it does be a good neighbor to other workloads. And this is really a great way of doing that.

Please note that Azure File Sync throttling does not apply when a tiered file is accessed or the Invoke-StorageSyncFileRecall cmdlet is used (download). So if you have Cloud Tiering enabled, the majority of the traffic that is throttled is Upload. If a user accesses a tiered file or the Invoke-StorageSyncFileRecall cmdlet is used, the request is NOT throttled. Throttling applies on download if the server is downloading a file change that was made on another server endpoint and the file was not accessed by a user or application.

Summary

Azure File Sync extends on-premises file servers into Azure providing cloud benefits while maintaining performance and compatibility. Azure File Sync provides:

  • Multi-site access – provide write access to the same data across Windows servers and Azure Files.
  • Cloud tiering – store only recently accessed data on local servers.
  • Integrates with Azure backup – no need to back up your data on-premises.
  • Fast disaster recovery – restore file metadata immediately and recall data as needed.

I hope you find this article useful.

__
Thank you for reading my blog.

If you have any questions or feedback, please leave a comment.

-Charbel Nemnom-

Previous

New e-Book – How to get the most out of Windows Admin Center @servermgmt @AltaroSoftware

Back up and Restore Office 365 Mailboxes With @AltaroSoftware

Next

Leave a comment below...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to Charbel Nemnom’s Blog

Get the latest posts delivered right to your inbox

The content of this website is copyrighted from being plagiarized! However, you can copy from the 'Code Blocks'.

Please send your feedback to the author using this form for any 'Code' you like.

Thank you for visiting!