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

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 the network bandwidth in 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

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.

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.

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-

Advertisements
About Charbel Nemnom 475 Articles
Charbel Nemnom is a Cloud Architect and Microsoft Most Valuable Professional (MVP), totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 17 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

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