Friday, February 10, 2012

Constant CPU usage on server when using SQL Server 2005 Management Studio

I have recently installed SQL Server 2005 (Developer Ed) + SP1 onto a VMWare based Windows 2003 + SP1 server.

SQL Server works fine when connecting to it using Mangement Studio on Windows XP.

However, I have noticed strange CPU usage on the server which seems to be caused by Management Studio (either directly or indirectly).

When no-one is connecting to the server using Management Studio, the server happily ticks along with CPU usage around 1-5% range. However, as soon as someone connects to the SQL Server instance using Management Studio the CPU usage begin to go up and down constantly.

The CPU usage ranges from 5-50% and it goes up and down (fairly regularly) every few seconds. It does this even when nothing is actually being done in Management Studio. The moment Management Studio is closed, the CPU usage goes back to normal.

The processes on the server that appear to be causing the CPU spikes are services.exe and wmiprvse.exe.

On a possibly connected note (though possibly not), the Security log in the server's Event Viewer shows that there are logins occuring every minute or so (most of the logins are from my account).

Any ideas?

I have a very similar problem as well though my details are a bit different.

I have a development PC that is running Vista and has SQL Server 2005 Developer w/SP2 installed and running. When I run SQL Management Studio locally on that pc, then services.exe starts to peg my cpu. I have a dual-core CPU and it seems that this process gets about 33% of my cycles over time (have left it running for 24 hours idle and it got about 8 hrs of cpu time). However, the interesting thing is that I can run SQL Management Studio on a remote machine and I never see any hit to the CPU unless I'm really doing something that requires it.

Monitoring mine, it seems the CPU (dual-core) is kept at 50% utilized (1 core 100% or split across cores) for about a 3-4 second period and then there's a 1-2 second period where it drops off and it seems to repeat this cycle until I close SQL Management Studio. This happens when I do nothing other than open SQL Management Studio - with nothing open aside from my Summary tab, an empty Object Explorer, and my Registerd Servers window (which does have the local server in a list there). I have tried changing whether or not SQL Management Studio has open connections to the local database server (same with the remote SQL Mgmt Studios) and no matter what I change, it seems to not affect the end result of simply having SQL Management Studio open on the server machine pegs the CPU.

-Shane

|||

Use the PRoces explorer tool from SYSINTERNALS to see what is running in that aspect on the machine, http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx & http://www.microsoft.com/technet/sysinternals/default.mspx fyi.

I'm not sure how it works on the VMware if at all, otherwise you can try to use the Virtual Server enviornment in this case to reproduce the scneario.

|||

I have attempted this in the past without much luck (I am assuming I am only interested in the processes that are listed as children or grandchildren to the services.exe node in the treeview). Aside from many svchost.exe processes, here is what I see on mine (remember, I'm running Vista and this is with SQL Mgmt Studio local on the db server):

WmiPrvSE.exe audiodg.exe dwm.exe 2x taskeng.exe SLsvc.exe spoolsv.exe isafe.exe (CA antivirus) mdm.exe sqlbrowser.exe sqlwriter.exe vetmsg.exe (CA antivirus) SearchIndexer.exe aspnet_state.exe ccprovsp.exe (CA antivirus) lsass.exe lsm.exe|||

Just to update this thread, I have still not found a solution to this problem. I am pretty much required to either use SQL Management Studio on another machine or give up 1/3 of my CPU - neither are always good solutions, especially when I want to run a timing trial over night and still bring my laptop home. Sad

-Shane

|||I have the same issue - Vista, SQL Management Studio with SP1 spikes the CPU in services.exe with frequent UuidCreate calls during spike. If I start management studio with no registered servers, no CPU spikes, but as soon as I register a server or connect to a server one in object explorer, spikes start. New queries do not cause spikes, so this appears to be a caused by workbench monitoring of service status.
|||It definitely has to do with WMI / counters. When I suspend thewmiprvse process the spikes stop. For something less drastic, I tried disabling various SQL counters using exctrlst but no change. Any ideas on how to disable the WMI module causing this under vista?
|||I've the same problem... does anybody have solution ?

NodeX
|||

I have not found a solution to this problem. I continue to avoid using SQL Management Studio on that box as a work-around. Worst-case scenario is that I do run it on that PC and I assume half of my CPU is unavailable until I close the app. Sad

|||I am testing SQL 2005 Enterprise (build 3159) on an active/passive cluster and the same things occurs. If I were to so much as open the Management Studio with the system registered from a client workstation, the cyclical CPU spikes commence immediately following the engine discovery process to display the green arrow; I don't even need to 'connect' to the server.|||.....furthermore I am using XP SP2, not Vista for the client workstations....|||

Your post indicating that you're running SQL Server Enterprise made me want to run a test but with SQL Express rather than a full-blown version, just in case that helps somebody nail this down. Well, my environment for that test ended up being messed up (multiple SQL installs on the same box) so those results weren't quite useful. BUT, what may be very useful that I just happened to accidentally discover was that even with ALL of my SQL Server services turned off, this CPU strain continued to exist. And as the previous posted mentioned, no connections need to be made. As soon as you see the little green "play" arrow or the little red "stop" box appear for the local server instance, then at that time the CPU starts getting pegged on a periodic basis (the period seems pretty consistent by looking at Task Manager over a period of time).

I hope this helps somebody find this!

-Jax

|||Any solution ? Same problem with W2K3 R2 SP2, SQL 2005 Enterprise SP2, Virtual Server 2005 R2. All updates installed.|||

I still have no solution. Sad

|||I have this problem running SQL Management Studio on a Windows 2003 server.

No comments:

Post a Comment