r/SQLServer • u/muaddba 1 • Dec 09 '25
Question High write latency during log backups on Azure Managed Instance
Despite my distaste for Azure MI, I am charged with managing some. I notice that during our log backups, we get very large spikes in write latency, around 1500ms (sometimes as high as 3000ms, yes 3 seconds), as indicated by SQLSentry. The wait type surge that occurs during these operations is largely WRITELOG wait, with a tiny amount of SOS Scheduler Yield. The amount of actual log being backed up is tiny < 1GB total.
I'm wondering why this happens, and if anything can be done to make it better. Here are some details:
GP Instance, 8 cores, 40GB RAM, most log files < 100MB, 71 Databases, 600GB total storage.
All user DBs are using RCSI and ADR, all have Recovery time set to 60 seconds.
I've made sure the VLFs are all within normal parameters, no database has more than 50 VLFs and most are much lower than that. Log growth size is 64MB for most of them, with a few being 128 or 512 for the larger databases.
I suspect the issue is IOPS and not throughput, since throughput is very low at 2 - 5MB/sec total, but SQLSentry doesn't show me IOPS for Azure MI. Does anyone have info on why this behavior is occurring?
Thanks!
•
u/AutoModerator Dec 09 '25
After your question has been solved /u/muaddba, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
5
u/BrentOzar Dec 09 '25
GP storage is notoriously slow: https://kendralittle.com/2024/12/18/azure-sql-managed-instance-storage-regularly-slow-60-seconds/
And doing log backups across 700 databases is like a load test for your storage.
4
u/jdanton14 Microsoft MVP Dec 09 '25
I would recommend upgrading to gen purpose nextgen. Brent is correct about GP storage perf—we’ve upgraded a few clients and it’s absolutely night and day with no other changes.
The upgrade process takes about 2-3 hours but the instance is available during that time. MI isn’t great if you’re pushing the envelope, and GP storage was uniquely bad, but next gen will fix for a lot of workloads. It’s GA as of Ignite 2025z
1
u/Achsin 1 Dec 09 '25
Your really small log files are probably not helping. Blow your log files up to 130GiB each and see if that helps. You might also need to blow up your data files too. That much empty space probably exceeds your data capacity for only 8 cores, so you’ll probably need to jump to 16 cores. Except that probably won’t really fix the latency issues, just mask them a bit because latency will still suck. Then you’ll need to go up to a higher disk tier, or keep making your files bigger.
Or just accept that disk performance in managed instance is horrible.