Azure Backup Agent — Slow Transfer Speeds

What if you are trying to backup files and folders with the Azure Backup Agent to an Azure Recovery Services Vault and you are…

What if you are trying to backup files and folders with the Azure Backup Agent to an Azure Recovery Services Vault and you are experiencing slow transfer speeds?

Microsoft provides a good KB article titled Troubleshoot slow backup of files and folders in Azure Backup that helps you narrow down common issues. They talk about performance bottlenecks but don’t really dive into more details. In an issue I was troubleshooting the bottleneck was the CPU.

The Azure Backup Agent will try to compress the data on the local machine before it transfers to Azure. If you server idles around 50% CPU usage or more the Azure Backup Agent is likely competing for CPU cycles and maxing out your CPU when trying to transfer large files.

Why is the size of the data transferred to the Recovery Services vault smaller than the data selected for backup?
Data backed up from Azure Backup Agent, DPM, and Azure Backup Server is compressed and encrypted before being transferred. With compression and encryption is applied, the data in the vault is 30–40% smaller.
https://docs.microsoft.com/en-us/azure/backup/backup-azure-backup-faq

Compression
Backups are compressed to reduce the required storage space. The only component that does not use compression is the VM extension. The VM extension copies all backup data from your storage account to the Recovery Services vault in the same region. No compression is used when transferring the data. Transferring the data without compression slightly inflates the storage used. However, storing the data without compression allows for faster restoration, should you need that recovery point.
https://docs.microsoft.com/en-us/azure/backup/backup-introduction-to-azure-backup

On a 2 vCPU, 8GB RAM virtual machine with no load a test transfer of a 10GB .iso to Azure in the Central US region from a server in Dallas, TX gave me consistent speeds around 250–300Mbps and spiked my CPU to 80%. Upgrading that VM to 4 vCPU gave me a speed bump to around 500Mbps while only consuming 60–80% CPU. As you can see the agent consumes a large amount of CPU. If your server’s CPU usage is already high and you are seeing slow transfer speeds, consider performing a test transfer on a different server and compare the results. As of this writing Microsoft doesn’t provide an option to turn compression off for files and folders transfers.