Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

CPU usage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ross - 13 Mar 2008 05:12 GMT
I have been using SQL Server 2000 for some time and am attempting to upgrade
to SQL Server 2005 (testing the trial version).

I backed up my SQL Server 2000 database(s) and then restored them on SQL
Server 2005 which worked well.

Everything seemed to be working fine until I updated SQL Server 2005 with
service pack 2.

I am running this on a Dual-Core AMD Opteron Processor 2216HE.  SQL Server
is now using 25% CPU continuously (or 100% of one of the processor
instances).  The databases I converted are working as expected, however, the
SQL Server process is continuously burning CPU when nothing is happening
(this is over several days now).

Has anybody else see this problem?
Russell Fields - 13 Mar 2008 14:11 GMT
Ross,

I have seen this happen in the past, for many different reasons.

I assume from your comment that you know that it is sqlservr.exe that is
using the 25%.  Can you run sp_who2 to identify some process that continues
to eat up CPU time?  If so, use dbcc inputbuffer, fn_get_sql, or look at
sys.dm_exec_sql_text to see what is running.  Also use DBCC OPENTRAN to find
the oldest transaction in each database.  (However, I assume that there is
not a blocking transaction or you would be having other problems.)

If you identify a problem spid, try to get the hostname for that spid.
Sometimes a client computer loses connectivity, but the SQL Server does not
know that, so it keeps trying (forever) to send the result set to the
client.   If that is the case, logging the hostname computer off of the
domain, then logging back into the domain, often alerts SQL Server to the
problem so that it will abandon that result set.

If appropriate, you can try to KILL the spid. (But the spid may not always
be killable.)

Other software can also get into a confused state and eat up CPU.  For
example, a DTS package, backup software, etc. can also get into an confused
state and never stop running.  Use Windows Task Manager to check whether
another task is actually the guilty party. If it is one of those, then try
killing that Windows process.

If you cannot do anything else, you should schedule a restart of your SQL
Sever.  That should (naturally) clear the problem out.  But you will need to
remain alert to its returning.

But, FWIW, I have not seen much of this on SQL Server 2005 SP2.

RLF

>I have been using SQL Server 2000 for some time and am attempting to
>upgrade
[quoted text clipped - 14 lines]
>
> Has anybody else see this problem?
Ross - 14 Mar 2008 00:22 GMT
Thanks for your answer.

It is definitely SQL Server that is eating 25% CPU (sqlservr.exe).  I have
actually restarted SQL Server (and the machine itself) and subsequently the
SQL Server process goes right back up to 25%.

As you noted regarding the blocking transaction, I'm not experiencing any
problems with the database, just the CPU usage.  

The sp_who2 shows a CPUTime for a "LAZY WRITER" process id 3 of 71195468 (as
it happens, the machine was restarted at 11:19PM EST last night).  

Full row information from sp_who2:

SPID 3
Status BACKGROUND
Login sa
HostName .
BlkBy .
DBName NULL
Command LAZY WRITER
CPU TIME 71195468
DiskIO 0
LastBatch 03/12 23:19:34
ProgramName (blank)
SPID 3
REQUESTID 0

Any ideas?

Thanks again for your help...

Ross

> Ross,
>
[quoted text clipped - 49 lines]
> >
> > Has anybody else see this problem?
Russell Fields - 14 Mar 2008 13:30 GMT
Ross,

Check out: http://support.microsoft.com/kb/931821

RLF

> Thanks for your answer.
>
[quoted text clipped - 98 lines]
>> >
>> > Has anybody else see this problem?
Ross - 14 Mar 2008 16:36 GMT
Thank you very much.

I've requested the hotfix and will see what happens.

> Ross,
>
[quoted text clipped - 104 lines]
> >> >
> >> > Has anybody else see this problem?
Ross - 15 Mar 2008 00:27 GMT
Unfortunately, that didn't go very well.

I installed the hotfix which appeared to solve the CPU problem (sqlservr.exe
back at 0% when no activity).  I was able to run the management software and
all looked fine, but when I attempted to run my web application, sql server
choked.  A simple query returning a datareader (ASP.NET) caused SQLServer to
get a memory exception.

Needless to say, I removed the Hotfix and am now back where I started.  I
guess I'll have to wait until Microsoft releases the hotfix in an update.

Ross

> Ross,
>
[quoted text clipped - 104 lines]
> >> >
> >> > Has anybody else see this problem?
Russell Fields - 15 Mar 2008 18:31 GMT
Ross,

Too bad. Memory exceptions are bugs, so you could report it to Microsoft if
you want.

RLF

> Unfortunately, that didn't go very well.
>
[quoted text clipped - 134 lines]
>> >> >
>> >> > Has anybody else see this problem?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.