473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

High CPU Usage

Hi guys,

I'm looking for ideas for troubleshooting the following. We've tried
some random things to try to treat the symptoms, but none seem robust
enough to use when we go live, and we'd rather discover the root cause:

We've got an ASP.NET application, running on framework 1.1 on Windows
2003 (IIS 6). Under default settings, during testing by two users,
we're seeing the CPU usage on w3wp.exe rocket up and stay up (and thus
cause web pages to be served extremely slowly). Pages do continue to
work, so fairly sure we've not got an infinite loop in there somewhere.

The only two thing that seems to be new to this application compared to
previous applications is that it uses remoting in a few places and
makes use of datagrids on most pages. The remoting - in two places it
places a call which can be reasonably slow (blocks internally until the
operation is complete). In the other, a first remoting call is made to
kick off a long-running process and then polling (via meta-refresh or
AJAX, depending on whether JS is available) is used to determine when
the operation is complete. The remoting channel is configured in
Application_Start. This is just for information, and may be unrelated
to our problem. The high CPU usage does not seem to be directly
triggered by any of these calls, and the server end of the remoting is
in a separate service (and it's CPU usage doesn't change)

The datagrids use custom databinding, since the number and type of
controls on each page is determined at runtime from the database. So,
for instance, a grid can consist of three columns. Each column has a
textbox control, a radio-button list, a drop-down list, etc. During the
databinding, the unneeded controls are hidden, and the correct control
has any necessary validation attached to it.

I've not used IISState before, but tried using it when the CPU maxed
out. Which resulted, after a while (and well before the dump was
complete) in IIS deciding to recycle the process.

Restarting IIS every thirty minutes is allowing testing to proceed, but
obviously this isn't a long-term solution.

Running under IIS 5 isolation mode resulted in no difference in
behaviour.

Letting IIS run more worker processes (we've tried values of 1, 3, 5
and 1000) seems to work for some period of time but eventually one of
the processes will again go up to high usage.

So, ideas on how to diagnose this problem further? Like I say, it
doesn't appear to be triggered by any particular page, and all requests
still succeed. Thanks in advance for any help,

Damien

May 15 '06 #1
1 4827
Damien wrote:
Hi guys,

I'm looking for ideas for troubleshooting the following. We've tried
some random things to try to treat the symptoms, but none seem robust
enough to use when we go live, and we'd rather discover the root cause:

We've got an ASP.NET application, running on framework 1.1 on Windows
2003 (IIS 6). Under default settings, during testing by two users,
we're seeing the CPU usage on w3wp.exe rocket up and stay up (and thus
cause web pages to be served extremely slowly). Pages do continue to
work, so fairly sure we've not got an infinite loop in there somewhere.

The only two thing that seems to be new to this application compared to
previous applications is that it uses remoting in a few places and
makes use of datagrids on most pages. The remoting - in two places it
places a call which can be reasonably slow (blocks internally until the
operation is complete). In the other, a first remoting call is made to
kick off a long-running process and then polling (via meta-refresh or
AJAX, depending on whether JS is available) is used to determine when
the operation is complete. The remoting channel is configured in
Application_Start. This is just for information, and may be unrelated
to our problem. The high CPU usage does not seem to be directly
triggered by any of these calls, and the server end of the remoting is
in a separate service (and it's CPU usage doesn't change)

The datagrids use custom databinding, since the number and type of
controls on each page is determined at runtime from the database. So,
for instance, a grid can consist of three columns. Each column has a
textbox control, a radio-button list, a drop-down list, etc. During the
databinding, the unneeded controls are hidden, and the correct control
has any necessary validation attached to it.

I've not used IISState before, but tried using it when the CPU maxed
out. Which resulted, after a while (and well before the dump was
complete) in IIS deciding to recycle the process.

Restarting IIS every thirty minutes is allowing testing to proceed, but
obviously this isn't a long-term solution.

Running under IIS 5 isolation mode resulted in no difference in
behaviour.

Letting IIS run more worker processes (we've tried values of 1, 3, 5
and 1000) seems to work for some period of time but eventually one of
the processes will again go up to high usage.

So, ideas on how to diagnose this problem further? Like I say, it
doesn't appear to be triggered by any particular page, and all requests
still succeed. Thanks in advance for any help,

Damien


Well, we had someone come in and provide some assistance to us today.
We've now resolved our issues, mostly through the assistance of some
tools we had already. Using a memory profiler led us to finding three
memory leaks (essentially, places where objects hooked themselves up to
static event handlers, and never unhooked themselves). But that wasn't
the cause...

We also found some older database access code which was using the
"single connection, synclock it and pass it around" method of
connecting to the database, which some of the code was spending a fair
bit of time in (we thought we'd migrated all of that code, but the
single shared connection was still available, and some code was still
using it). We think this was the major cause...

Once we'd switched to "grab a connection, do your work, close the
connection", we started getting Connection Pool Timeouts. Turns out
that two pieces of code we're doing "grab a connection, do your work,
return", which was quickly swamping the connection pool. This may have
been a contributor to the problems we were experiencing.

We also found a few minor bugs, but I don't think any of them were
contributing.

Major thing I'm trying to fathom out is why we weren't seeing the
Connection Pool Timeouts in the past.

But we're now a lot happier that our code is "correct", and the speed
issues have gone away. Definitely a lot happier using a profiler now
(both for performance and for memory usage)

Sorry if anyone spent any time trying to fathom anything out.

Damien

May 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave [Hawk-Systems] | last post by:
Occasionally in checking one of the servers, I noticed that mysql shows 85% + of cpu usage essentially leaving the server at 0% idle. After monitoring it for a few hours, the status did not...
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
7
by: Marco Martin | last post by:
Hi Group, I've been working on an application that reads data from a comm port and 1) writes the data to file, 2) displays this data in three different graphs in real time.The port is receiving...
7
by: LBT | last post by:
I have a window service written using VB.NET. This window service will scan folders for file and grab the file content to be inserted to SQL Server on file detection. There are altogether 18...
2
by: Mechul | last post by:
Hi people i need serious help here.. I have a forum and my hosting company suspended it cuz of the high usage of sql. We did everything to make lower the usage but its still high. it was ...
0
by: Learning.Net | last post by:
I have a window application that uses ActiveX browser component for testing web site automatically using mshtml. Though application is running fine but there is abnormally high page file usage....
1
by: santhescript01 | last post by:
I have a window application that uses ActiveX browser component for testing web site automatically using mshtml. Though application is running fine but there is abnormally high page file usage....
2
by: Sin Jeong-hun | last post by:
In short, is there any way to know the very code that is currently hogging the CPU? I've written an application which continously GETting web pages using HttpWebRequest's asynchronous methods...
8
by: Diggla | last post by:
I was asked to look into a performance problem on a newly migrated DB server. The db server was moved from a local-physical-nt4-sybase to remote (10 mb wan link), virtual, Windows 2003, SQL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.