What could be causing intermittent LOG IO spikes on my SQL Azure database?

Viewed 854

It seems that every so often (1-3 days) I get what appear to be random Log IO spikes. I have about two or three queries heavily using temp tables but do not actually show on query performance insights as sources for these 100% spikes. In fact, if you take a look at the photo below, the top 5 queries sorted by highest Log IO come no where near close to the sum of 100 Log IO

These weird issues come after having to upgrade from an S1 to an S3 due to a quick growth in our web app. I have noticed that almost all of my indexes are heavily fragmented and due to conflicting information about Azure using SSD disks and not necessitating fixing the indexes, I have held off fixing them until now. I will be performing some maintenance tonight when our user base slows down but I am unsure if this is the cause or not.

One last note, the yellow log IO bar on the top graph (which is hard to see) is an index addition that I did. It also shows on the bottom table as having an IO of .13%. I can see an index addition taking a lot of DB resources, but what leads me astray is that the data specifically says it was not the reason for the 100% spike.

enter image description here

1 Answers

Fragmented indexes and outdated statistics can cause high I/O. Please refer to this thread to defrag those indexes.

Regarding the log IO, one thing you can do tto reduce I/O on your database is to disable row versioning on the database and use instead read committed or read uncommitted isolation levels. The details on the impact of row versioning on Azure SQL Database are explained here.

Related