Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

High IO on SQL Server 2010

Posted on 2014-04-25
7
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

721 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