Performance Counters show 100% CPU Usage

M

Mash

I'm a software developer and work on an image processing application.
During long term tests my app is running slowly and causing problems.
I ran Windows Performance Monitor and found that my application runs
using about 65% of the processor.
Right before the problem occurs I see the Total % Processor Time spike
to 100%. It seems what is happening is the process svchost2 briefly
spikes up to about 38% Processor time which causes the total processor
time to be 100%. At this point my application slows down and an error
occurs.

Svchost#2 normally runs below 1% Processor time.


At about the same time at which svchost#2 Processor usage spikes the
Page Faults/sec counter for the Memory object increases from an
average of around 700 up to around 3100.

One more interesting note is that on failure my application writes
error information to log files, so when the failure occurs I'll see IO
counters for my process increase. At about the same time a process
called dfrgntfs starts and takes about 22% Processor Time. So it seems
once I write to disk Windows automatically starts a defrag?

The PC I'm using is a Dell Optiplex GX270 running WinXP SP2. It has a
P4 2.79GHz and 1GB RAM. It has a 15GB hard drive with about 2GB free.

I ran an analysis on the hard drive and a defrag was recommended. It
is defragging now so I haven't yet run another test. The thing I don't
understand is why svchost#2 spikes it's %Processor Time suddenly.
Would the fact that a defrag is needed cause svchost#2 to spike like
that?
Thanks
 
G

Gerry

Problem -insufficient free disk space.

It has a 15GB hard drive with about 2GB free.

Try Ctrl+Alt+Delete to select Task Manager and click the Performance
Tab. Under Commit Charge what is the Total, the Limit and the Peak?

You should be able to gather more information from Task Manager. With
the Processes tab open select View, Select, Columns and check the boxes
before Peak Memory Usage and Virtual Memory size. What are the figures
for the 6 processes using the largest amounts?

Do you leave your computer on 24/7?

Process Explorer provides more information than Task Manager.

Download Process Explorer.

For further information about Process Explorer see here:
http://www.microsoft.com/technet/sysinternals/SystemInformation/ProcessExplorer.mspx

A new addition to Process Explorer is that you can now right click on a
process and search Online for relevant information.

It would be helpful if you could post the Command Line of the svchost
process generating the excessive CPU usage. In Process Explorer place
cursor on Process and select Properties, Image.

--



Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
M

Mash

Problem -insufficient free disk space.

It has a 15GB hard drive with about 2GB free.

Try Ctrl+Alt+Delete to select Task Manager and click the Performance
Tab. Under Commit Charge what is the Total, the Limit and the Peak?

You should be able to gather more information from Task Manager. With
the Processes tab open select View, Select, Columns and check the boxes
before Peak Memory Usage and Virtual Memory size. What are the figures
for the 6 processes using the largest amounts?

Do you leave your computer on 24/7?

Process Explorer provides more information than Task Manager.

Download Process Explorer.

For further information about Process Explorer see here:http://www.microsoft.com/technet/sysinternals/SystemInformation/Proce...

A new addition to Process Explorer is that you can now right click on a
process and search Online for relevant information.

It would be helpful if you could post the Command Line of the svchost
process generating the excessive CPU usage. In Process Explorer place
cursor on Process and select Properties, Image. I

--

Thanks Gerry,

I ran a disk defrag and freed up some hard drive space so I had about
4.5 G free and I still got the problem. I had also stopped most of the
windows services.
After doing this I no longer get the processor usage spike by
svchost#2, but my application still runs into the problem (slow
response) so I guess that wasn't the source of my problem.
I still do get a page fault spike shortly before the error


I did find though that the page file was set to an initial of about
370MB and a max of about 700MB.
The PC has 1GB RAM. I changed the page file to about 1.5GB (initial
and max) RAM and I'll see if that makes a difference. I guess our IT
department didn't update the page file settings when doing the memory
upgrade.

I've used Process Explorer before and it's a great tool. I'll check
the commit charge when I get back from holiday.

Thanks for the help. I'll post what I find.

Mike
 
G

Gerry

Mash (or is Spud?)

A too restrictive pagefile would be likely to cause higher CPU usage.

To answer the questions I posed you will need to use Task Manager first
and then Process Explorer.

--



Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
P

Popol0707

Probably caused by "Automatic updates" service. You can stop this service by
entering the following command in a DOS box:
net stop "Automatic Updates"

Of course, you can also stop it by clicking Start, then Run and then
entering services.msc.

Doing so will prevent security updates from downloading and installing, so
use this only temporarily.

We have been plagued by this bug since last year or the year before at my
office. Microsoft has published a couple of patches, none solved the problem
for us.
 
G

Gerry

Probably caused by "Automatic updates" service.

Why speculate when you can check the Command Line of the svchost process
generating the excessive CPU usage.

--



Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
P

Popol0707

How do you do that?

(BTW, stopping the wuauserv service would prove or disprove that it causes
the excessive CPU load).
 
G

Gerry

Process Explorer provides more information than Task Manager.

Download Process Explorer.

For further information about Process Explorer see here:
http://www.microsoft.com/technet/sysinternals/SystemInformation/ProcessExplorer.mspx

A new addition to Process Explorer is that you can now right click on a
process and search Online for relevant information.

It would be helpful if you could post the Command Line of the svchost
process generating the excessive CPU usage. In Process Explorer place
cursor on Process and select Properties, Image.

The wuauserv service is only one of many services using svchost.exe. If
the command line path is C:\WINDOWS\System32\svchost.exe -k netsvcs then
what you suggest might be used to troubleshoot the error further as
there are a lot of other services sharing this process. You can a list
in Process Explorer.

--



Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
M

Mash

Increasing the size of the page file improved things. But I still have
a problem.
I had stopped the windows automatic updates service so I know that is
not the source of my problems.

I'm running a test now and when/if I get a failure I'll gather more
information. I have Windows performance monitor running and I'll check
the info in task manager/process explorer as well
Thanks for the help
 
G

Gerry

Mash

If I can help further please let me know.




~~~~


Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 
D

dallandra

is it possible to run process explorer to gather information from a remote
machine?

I too have this problem wtih svchost#2 (of about 6 svchost instances)
periodically throughout the day taking 100% CPU usage.
 
D

dallandra

this is the svchost process that is causing the dramas for me:
is there any other info I can gather to troubleshoot this?

svchost.exe 1532 AudioSrv, BITS, Browser, CryptSvc, Dhcp,
dmserver, ERSvc, EventSystem, helpsvc,
HidServ, lanmanserver, lanmanworkstation,
Netman, Nla, RasMan, Schedule, seclogon,
SENS, SharedAccess, ShellHWDetection,
srservice, TapiSrv, Themes, TrkWks, W32Time,
winmgmt, wuauserv, WZCSVC
 
G

Gerry

Your next step is to determine which services is running continuously.
You do this by stopping each service in turn and see if the CPU usage
stops. In Process Explorer there is a Services tab you can use.

A known troublemaker in your list is wuauserv, which relates to the
Windows Automatic Update Service. I would start there.

When you know which services is the cause of the problem please feel
free to come back here for further help.

To restart a Stopped service you can select Start, Control Panel,
Administrative Tools, Services. select the Service, right click and
select Start. Restarting the computer should also restore the Service to
it's normal Stop/Start status.

--



Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top