473,396 Members | 1,767 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,396 software developers and data experts.

Thread Performance

Hi all,

I'm having problem with high processor load on the system where I'm running
my application. The system is a P4 3.0 GHz with 1 GB RAM. I would like to log
the thread activity of my application using performance counters to try to
find out which thread that is causing the high processor load.

Any ideas how to do this?

How can I identify what part of my code a specific thrad is executing?

Thanks

Henrik
Jul 5 '06 #1
3 1789
Henrik,

Have you looked at the PerformanceCounter class in the
System.Diagnostics namespace? It should allow you to create a new
performance counter and set the values.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Henrik" <he*****@community.nospamwrote in message
news:5B**********************************@microsof t.com...
Hi all,

I'm having problem with high processor load on the system where I'm
running
my application. The system is a P4 3.0 GHz with 1 GB RAM. I would like to
log
the thread activity of my application using performance counters to try to
find out which thread that is causing the high processor load.

Any ideas how to do this?

How can I identify what part of my code a specific thrad is executing?

Thanks

Henrik

Jul 5 '06 #2
Hi Henrik,

If this is the first time your application(in production environment )
suffers high CPU utilization, you can consider throubleshoot the issue
through the following steps:

1. Use system taskmanager to inspect the exact process that consume most or
all of the cpu time.

2. Use performance counters to trace the process and thread statistics of
that problem process. You can find the following useful performance counter
categories in the perfmon:

* Process
*Processor
*Thread
*ASP.NET(if target application is a web application)
*ASP.NET Application(if target app is a web application)

3. All the above steps(#1 and #2) can only isolate the issue to
process/thread level. If you still want to get the problem cause at code
level, we need to use some live or production debugging tools (such as the
windows debugging tools---windbg). Generally, the microsoft product support
team mostly use this debugger to analysis such production environment
issues( application crash or hang).

Here are some good stuff introducting performing such production issue
analysis(with windbg) for ASP.NET application. However, the basic theory
and strategy is suitable for normal .net applications:

#Troubleshooting ASP.NET using WinDbg and the SOS extension
http://support.microsoft.com/kb/892277/en-us

#Quick things to check when you experience high memory levels in ASP.NET
http://support.microsoft.com/kb/893660/en-us

Hope this helps some.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Jul 6 '06 #3
Hi Henrick,

How are you doing on this issue? Does the information in my last reply
helps you a little? If there is still anything we can help, please feel
free to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jul 10 '06 #4

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

Similar topics

4
by: sklett | last post by:
I'm fairly new to Threading and things have been going pretty smooth so far. I did some performance testing on my new app and realized it's lagging a bit on raising events. It's a realtime app and...
22
by: Morpheus | last post by:
Hi, I have been coding in Windows for many years so have a mindset to it, so forgive any stupid questions. Is it possible to create a multithread application in C++ that is portable...
6
by: HolyShea | last post by:
All, Not sure if this is possible or not - I've created a class which performs an asynchronous operation and provides notification when the operation is complete. I'd like the notification to be...
34
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
0
by: Peter Duniho | last post by:
On Thu, 26 Jun 2008 00:05:42 -0700, <zorrothefox.groups@gmail.comwrote: Yes, it is "klunky". IMHO, it's unfortunate that that's the model MSDN continues to suggest everywhere. If you are...
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:
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...
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.