Solved

High IO on SQL Server 2010

Posted on 2014-04-25
7
261 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query for timesheet application 3 19
sql server query 18 42
Migration from SQL server to oracle (XML input) 4 28
VB.NET Application Installation with sqlserver 8 32
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

830 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