May 27, 2011 at 9:52 pm
i occasionally see a long running job. I have noticed that after certain time only CPU usage increases an I/O is constant from sp_who2. Any idea what could be wrong?
May 27, 2011 at 10:21 pm
Sounds like cache is doing it's job; no need to hit the disk. I wouldn't see this as much of a problem. Perhaps TSQL could be tuned to use less CPU, but no IO is a good (and rare) thing.
Jim Murphy
http://www.sqlwatchmen.com
@SQLMurph
May 27, 2011 at 10:26 pm
here is the thing.Occasionally a select inside this sproc is hung.Now today i found the sql where it is hung using trace , when i run that sql manually from management studio results come back very quickly but occasionally it is hung which is run through a job/ssis like today? This behaviour is so weird.And whenever it is hung i see that CPU increases and IO doesn't increase at all. What does this mean to? Keep in mind the same query when i run from management studio runs in few mins at the same time.
May 28, 2011 at 1:31 am
Its good there is no any IO
Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
www.aureus-salah.com
May 28, 2011 at 2:31 am
Syed Jahanzaib Bin hassan (5/28/2011)
Its good there is no any IO
What new information does this post provide?
To quote Jim:
... but no IO is a good (and rare) thing. ...
May 28, 2011 at 4:06 am
So don't use sp_who2. That's the old approach anyway. Dive into the DMOs and get lots of good information.sys.dm_exec_requests will show you what's currently running. You can combine that with sys.dm_exec_sql_tex and sys.dm_exec_query_plan to pull the query and plan right out of the cache for currently executing procedures. You'll get good info.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 30, 2011 at 3:14 am
SELECT ST.TEXT,SP.SPID,WAITTIME,LASTWAITTYPE,CPU,PHYSICAL_IO,STATUS,HOSTNAME,PROGRAM_NAME,CMD,LOGINAME FROM SYS.SYSPROCESSES SP
CROSS APPLY SYS.DM_EXEC_SQL_TEXT(SP.SQL_HANDLE) ST
WHERE STATUS !='SLEEPING'
ORDER BY CPU DESC
Use this query for CPU and IOs
Regards,
Syed Jahanzaib Bin Hassan
BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA
My Blog
www.aureus-salah.com
May 31, 2011 at 12:23 am
Get a copy of Adam Machanic's free sp_whoisactive (v11.00 is current I think). READ THE DOCUMENTATION at the top of the sproc code!! AWESOME STUFF!
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply