March 7, 2011 at 6:18 pm
Hi,
One of our servers is performing very slow so I checked the number of sessions connected and which databases are being used.
It came to my attention the LastBatch column which has been dated earlier.
* Today's date = 03/08/2011
SPID Status ..... Command CPU time Disk IO Last Batch
72 sleeping AWAITING COMMAND 684991 245548 03/04 16:07:32
using the sysprocesses, the connection is still open.
memusage login_time open_tran
82 2011-02-14 1
Does that mean that this particular session is still using/allocating the CPU time which is 684991?
Btw, is the CPU time here is millisec? How about the memusage?
Thank you in advance.
March 7, 2011 at 6:28 pm
This value 684991 is not changing. This connection used this much cpu time that time only.
March 7, 2011 at 8:01 pm
Thanks for the info.
Will there be an impact somehow of the open connections to the memory usage?
Will it somehow contribute to slow reading of records?
March 7, 2011 at 9:19 pm
If the last batch was two weeks ago, and they query is AWAITING COMMAND, then it is most likely inactive. It's possible that it has a transaction open and is holding locks, but otherwise should not affect performance at all.
Have a look at the following query for that session (72). It shows the memory usage that the connection is using, in 8KB pages (i.e., a value of 2 means 16 KB). It will also show the cumulative IO and CPU time used by the connection, and this won't change if the session is not doing anything.
SELECT memory_usage, * FROM sys.dm_exec_sessions
If you're using sp_who2, I recommend using "sp_who2 active", which will show only those queries that are running.
March 7, 2011 at 9:42 pm
thank you so much!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply