Sql-server – Disk performance causing SQL Server Command Timeout

performancesql server

I setup a perfmon collector to capture data around some recent SQL Server command timeout errors and most indicators point to disk issues. CPU and memory numbers look normal. This is a SQL Server 2008 physical server with 2 disks. SQL data files reside on a one disk (RAID 5) and SQL log files on another.

At the time of the errors these particular counters are way beyond normal (about 10x worse than normal):

  • % Disk Time
  • Disk Reads/Sec (on the data disk)
  • Disk sec/Read (on the data disk)
  • SQLServer:Buffer Manager\Page life expectancy

With these perfmon findings, what would the next step be to isolate the problem? Running SQL Profiler?

Best Answer

Command timeout simply means that your queries don't return in the 30 seconds allocated by default. What is the size of your database and how much RAM you have?

The high disk usage is most likely a symptom, not a cause, and is caused by table scans, ie. missing indexes. A quick look at the execution plan of your timing out queries will reveal if this guess is correct or not (See Displaying Execution Plans by Using SQL Server Profiler Event Classes.

As a general advice I suggest you approach this as a performance investigation and deploy the well tested Waits and Queues methodology.