January 18, 2005 at 3:16 am
Does anyone know if you can check which CPU is being used by an SPID ?
I have a job that has maxdop=1 set but on the server only 2 out of 8 processors are being used - another job is running and i'm sure the other processor is used by the OS.
Can I find out whihc spids are using which processor ? I don't have admin access to the server ...
cheers
dbgeezer
January 18, 2005 at 6:28 am
I doubt that anything less than admin could get at this info. Having said that, no, I have no clear idea if it can be done, or how. My guess would be perhaps profiler...
On the other hand, is this for pure academic purposes you ask? I'm not all sure that we in any way can control which cpu's the os should use for any given process / thread - that's afaik entirely up to the os. We can tell which cpu's not to use by the affinity mask, but I don't believe we can tell the other way around.
If I remember correctly, it's not even sure that a thread will stay on the same cpu it 'started' on during it's life - if the os sees fit, it can move it to another cpu.
...at least I think it's something along the above..
/Kenneth
January 18, 2005 at 7:34 am
Right off this will give you the thread a spid is on at the moment run.
DBCC SQLPERF(THREADS)
However I forget which tool right off will tell you which thread is attached to which CPU. But I do believe they require access to the desktop of the machine.
January 18, 2005 at 8:40 am
Apparantly my ramblings were dated - pre 7.x behaviour and all
Here's an interesting article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/Sqldev_02252004.asp for the daring, describing the inner secrets of the UMS scheduler. Hard core, but very interesting.
/Kenneth
January 19, 2005 at 1:55 am
Many thanks to all.
I'll give your suggestions a go.
cheers
dbgeezer
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply