Solved

High IO on SQL Server 2010

Posted on 2014-04-25
7
235 Views
Last Modified: 2014-04-27
We find that the SQL server IO is  high in this afternoon. Using the query below, there is not too much task running on the server and some of the tasks are 'suspended'.  I just wonder whether the query has included all the running processes or job running on the SQL Server. Will there be a possiblity that the high IO task is coming from the suspended job as the query only show the CPU. It can't show IO at all.

SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
0
Comment
Question by:AXISHK
  • 4
  • 3
7 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 40023158
Suspended jobs are not included


here is an excellent trouble shooting guide from Microsoft in regards to IO
http://blogs.msdn.com/b/sqljourney/archive/2013/06/04/how-to-troubleshooting-sql-server-i-o-bottlenecks.aspx

additionally ive used this guide from MSSQL tips as well when Dealing with IO Bottlenecks
http://www.mssqltips.com/sqlservertutorial/254/investigating-io-bottlenecks/
0
 

Author Comment

by:AXISHK
ID: 40023163
But for those the suspended jobs, will it wait for IO and that's why it is suspended ?

Tks
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40023168
1. will it wiat for IO  = yes
2. is that why its suspended = no

3. queries are in suspended state when trying to get a resource that isn't available, the query will resume once said resource is accessisble
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:AXISHK
ID: 40023188
As the IO is high when users report performance issue, can I say the high IO "may be" caused by this suspended job , as the query seem to view the CPU and no IO column is reported.

Tks
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40023194
yes
0
 

Author Comment

by:AXISHK
ID: 40023211
Is there any query that can see current jobs's accumulated IO on the SQL Server ?
0
 
LVL 22

Accepted Solution

by:
plusone3055 earned 500 total points
ID: 40023223
Not for jobs

please refer to
http://www.mssqltips.com/sqlservertutorial/254/investigating-io-bottlenecks/

with the query  (from the above link)

SELECT
cast(DB_Name(a.database_id) as varchar) as Database_name,
b.physical_name, *
FROM  
sys.dm_io_virtual_file_stats(null, null) a
INNER JOIN sys.master_files b ON a.database_id = b.database_id and a.file_id = b.file_id
ORDER BY Database_Name

This DMV will give you cumulative file stats for each database and each database file including both the data and log files.  Based on this data you can determine which file is the busiest from a read and/or write perspective.  

The output also includes I/O stall information for reads, writes and total.  The I/O stall is the total time, in milliseconds, that users waited for I/O to be completed on the file.  By looking at the I/O stall information you can see how much time was waiting for I/O to complete and therefore the users were waiting.  

The data that is returned from this DMV is cumulative data, which means that each time you restart SQL Server the counters are reset.  Since the data is cumulative you can run this once and then run the query again in the future and compare the deltas for the two time periods. If the I/O stalls are high compared to the length of the that time period then you may have an I/O bottleneck.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now