473,698 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application consumes close to 100% of CPU, how to profile and determine the cause

Hello,

I recently wrote an application that is used for testing units in a
burn-in chamber. It uses two external library that require the use of
P\Invoke in order to work with them. There is a primary thread and a
secondary polling thread. Every once in a while the process will
consume close to 100% of the CPU, but I am unclear why. I am wondering
how would I go about determine the cause of the problem? What sort of
tools or instrumentation should I use in order to determine what part
of the code is causing the problem. Any help is greatly appreciated.

I know in the hardware world I could implement a watchdog to restart
the sytem, would something like that be useful? I would have to keep
track of the system thus is would run slower and consume more
resources, but I might be able to recover when the process has
problems???

Mark

Nov 17 '05
11 2127
Ollie,

Should I move the question over to that newsgroup? I didn't think it
was a performance issue since I must have a bug in my software,
somewhere, which is causing my problems? If I move it over to the other
newsgroup will people consider is cross posting? I don't want to make
people upset as I do need help.

Mark

Nov 17 '05 #11
Hello all, (yet again)

I recently noticed that I am able to cause the application to
eventually consume close to 100% of the CPU when I run the Released
version of the application. I have been unable so far to produce the
same behavior when executing the Debug version of the application.
Since I had never seen this problem while debugging the application. It
was just recently that I was running the application in a test
environment as a stand-a-lone application and outside visual studio.
Providing this problem only arises when running the release version, is
there a new direction I should focus my efforts in solving the problem?
Thanks

Mark

Nov 17 '05 #12

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

Similar topics

1
1468
by: Tom L | last post by:
Like the subject says, how do I figure out how much memory an object takes.. If I create an employees collection, which is a collection of employee objects, and I load up a handful of records, I want to know if it consumes, say, 20k, or 100k or whatever of memory/resources. Thanks..
4
18120
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed as I find appropriate. I am using the socket asynchronously by calling the BeingSend and BeginReceive calls. I would like to be able to call shutdown and close asynchronously if possible.
0
1868
by: Tomas | last post by:
I have two questions: (1) How (if possible) can you, with ASP.NET (and with the IIS 5 included with win2000) specify an maximum limit of the memory that a web application may consume, as an absolute number of megabytes ??? ( I am aware of the "memoryLimit" attribute in the "processModel" element in the Web.config but that only specifies the maximum allowed memory size, as a percentage of total system memory, and I don't want a...
1
1168
by: daniel | last post by:
I'm devloping a Web Application in VB.NET. In my web.config file I have specified that untrapped errors are to be sent to the page "errorpage.aspx". This is working fine - if an untrapped error occurs the application is indeed routed to this page. On this page I would like to determine the cause of the error and either log it in a file or send it to me via e-mail. I am able to determine the page that sent me there from the URL...
1
1239
by: YC | last post by:
Hi. I have a question regarding the profile and sessiom performance when using SQL server a a provider. The mecahnizm in general uses blob as the datatype for the state persistente. In high volumes, will it cause a peformence problem?
1
1778
by: John Dalberg | last post by:
I converted a working web site project to a web application project and I am getting a bunch of warnings and compile errors. All code using .NET's profile class is giving an error. example line: txtName.Text = Profile.FirstName gives an error: ... FirstName' is not a member of 'Profile'.
1
3062
by: enginhorzum | last post by:
Hi all i wrote a windows app with c# which consumes a web-service also written in c#. i wrote a method in web-service like this. public function Test() { System.Threading.Thread.Sleep(10*60*100); return true; } When i call this method from windows application, it time-outs after appx. 2 minutes, win. app. doesn't wait for the response and ends the
2
4310
by: aagarwal8 | last post by:
Hi, I have a chat application which i have created using WinForms 2.0 (C# lang). The situation i am faced with is that i need to close all the opened (chat, public chat, chat invite, chat history, user profile) windows at the time of logout, except for the main window. In my application, all the chat windows are opened on a separate
3
1398
by: sewid | last post by:
Hi! I have a very simple windows form (Visual Basic, .NET-Framework 2.0). This is my whole code: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim myThread As New System.Threading.Thread(AddressOf testThread)
0
8678
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.