Cause of High Disk Queue Length in SQL Server
OK, so, from what I can tell, it was related to a bunch of things:
- resizing files (data and log both)
- large number of inserts happening while 1. was going on
- one particularly heavy query running while 1. was going on
- a hard drive with some pretty high i/o times in general
- lack of memory on the server, so hitting the page file on top of everything else
Here were my resolutions:
- change the autogrowth settings so I'd have consistent growth when it happens, manually grew both the temp and primary database files to have more space, added additional vlogs to the temp database, and set up a notification so I can manually grow when the database gets below a certain space level.
- [nothing to be done about it]
- made the heavy query run less often; it was loading up data the user didn't always need, so changed it to run on-demand
- [working on getting a new server, this app is growing fast]
- [working on getting a new server, this app is growing fast]
So, anyway, it was a combination of a whole bunch of different things, mostly related to SQL, but not exclusively (so Will was correct there).
I'd love to split the answer between everyone, as they had portions of it right, but what can you do...
Wait for a moment where the disk queue depth is high and find all currently running queries (scripts available on the web). It is likely that some expensive query is running. Examples: Data warehouse style queries, index operations, DBCC CHECKDB, shrinking, ... All of these are designed to drive the IO system with all might.