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

.Net application almost stalls the system

84
Hi,
I am making a c# application which seems to be stalling the system. When I check the system properties in task manager, it shows that I am hardly using any memory or cpu. Still when I run this app, then the whole computer slows down termendouly and I am not able to do anything else.

Can someone please advise why something like this might be occuring?
Jun 2 '08 #1
17 1498
DrBunchman
979 Expert 512MB
What happens when you run the app on your development machine in debug - do you have the same problem?

Dr B
Jun 2 '08 #2
jamesd0142
469 256MB
Sounds to me like you have a some sort of never ending loop/process running
Jun 2 '08 #3
DrBunchman
979 Expert 512MB
Sounds to me like you have a some sort of never ending loop/process running
That's what I was thinking too.
Jun 2 '08 #4
alag20
84
That's what I was thinking too.
Well the application does finish and exits in approx 5 - 6 mins so the application is working through the process, but its other applications which seems to be hanging or playing as if dead and no system resources availlable when the cpu is 98% idle and more than 2/3 memory [as I have 2 gb ram] is availble for use!
Jun 2 '08 #5
DrBunchman
979 Expert 512MB
What's the app actually doing?
Jun 2 '08 #6
alag20
84
What's the app actually doing?
Well it patches a binary file. But this file is not being used anywhere or in anyway!
Jun 2 '08 #7
Plater
7,872 Expert 4TB
Do you use any COM objects or do any DLL calls?
Or is it all .NET functions?

If you have a loop that process a large binary file, even though the CPU/memory are fine, you are probably bogging down the harddrive. That is not easy to track with taskmanager. If the binary file is large, chances are it's fragmented, and if you frequently download/copy/delete large files, your drive is probably fragmented heavily. That increases seek times. It can be devastating on 5400rpm drive.

If you want this program to be "running in the background" you should consider slowing down its I/O access in some manor so that other harddrive calls (like paging system) can be made.
Jun 2 '08 #8
alag20
84
Do you use any COM objects or do any DLL calls?
Or is it all .NET functions?

If you have a loop that process a large binary file, even though the CPU/memory are fine, you are probably bogging down the harddrive. That is not easy to track with taskmanager. If the binary file is large, chances are it's fragmented, and if you frequently download/copy/delete large files, your drive is probably fragmented heavily. That increases seek times. It can be devastating on 5400rpm drive.

If you want this program to be "running in the background" you should consider slowing down its I/O access in some manor so that other harddrive calls (like paging system) can be made.
Hi Plater,
Thanks for your help. How can I slow down I/O access from .Net. The uncompression is written in 32bit C application which i call from .Net!
Jun 2 '08 #9
Plater
7,872 Expert 4TB
I thought so.
Does it do it "all at once" like you make the call and it does it's thing. Or do you loop through with helper calls? If there's a little of involvement on your side you can just put in thread sleeps to slow it down and give other threads priority, but the win32 might like "lock" the device(harddrive) somewhat, unsure.

Is it just an "unzip" type decompression? .NET can do the simple decompression stuff.
Jun 2 '08 #10
alag20
84
Hi Plater,
Thanks for your help. How can I slow down I/O access from .Net. The uncompression is written in 32bit C application which i call from .Net!
Also it seems to be better in Debug / Release mode from VS2005
Jun 3 '08 #11
alag20
84
I thought so.
Does it do it "all at once" like you make the call and it does it's thing. Or do you loop through with helper calls? If there's a little of involvement on your side you can just put in thread sleeps to slow it down and give other threads priority, but the win32 might like "lock" the device(harddrive) somewhat, unsure.

Is it just an "unzip" type decompression? .NET can do the simple decompression stuff.
It is binary difference file uncompression and .Net cant do it on its own without various algorithms etc. I just call the it as Process.Start() with params. Then I wait in .Net to check if the thread has completed. Here [on .Net side] I have a thread.sleep for .net thread to go and check the application every few seconds to see if it has completed.
Jun 3 '08 #12
Plater
7,872 Expert 4TB
So you already had a thread sleep and it was still locking up the system?
Jun 3 '08 #13
alag20
84
So you already had a thread sleep and it was still locking up the system?
Yes it still seems to hog when I execute it. It is alot better if I run it from Visual Studio [pointing to the directory and then debugging under debug / release mode]
Jun 3 '08 #14
Plater
7,872 Expert 4TB
Very weird.
Is the code that executes the sleep (as well as other stuff) run on the same thread as the gui?
That's really all I can think of for debug making it better, the threads are run a little differently in debug mode.
Jun 3 '08 #15
alag20
84
Very weird.
Is the code that executes the sleep (as well as other stuff) run on the same thread as the gui?
That's really all I can think of for debug making it better, the threads are run a little differently in debug mode.
The thread sleep are gui are in the same thread. Though, uncompression is in an external thread [it also shows up in task manager with its own PID]!
Jun 4 '08 #16
Plater
7,872 Expert 4TB
Right but your thread sleep is looping around in your gui thread? I'm not really sure it matters, i'm just grasping at straws on this.
Jun 4 '08 #17
alag20
84
Right but your thread sleep is looping around in your gui thread? I'm not really sure it matters, i'm just grasping at straws on this.
gui thread is looking if the external thread has finished. The sleep is in gui thread.
Jun 6 '08 #18

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: dusty | last post by:
Hi, I made a RowChanged event handler for my table. Its supposed to do automatic numeration: private void Model_RowChanged(object sender, DataRowChangeEventArgs e) { if(e.Action ==...
0
by: dusty | last post by:
Hi, I made a RowChanged event handler for my table. Its supposed to do automatic numeration: private void Model_RowChanged(object sender, DataRowChangeEventArgs e) { if(e.Action ==...
2
by: Joel Vazquez | last post by:
Visual Basic.NET Application RunTime Crashes and Stalls Im a newbie if you could say in .NET ive been working with it the past 3 months and have done lots of things with it, without any prior...
24
by: Desmond Cassidy | last post by:
Hi, I don't know whether this is the correct place to ask this question..anyway here goes... I have a large solution with about 300 .vb files split into 9 projects VB.net Framework 1.1 WinXP...
1
by: metsys | last post by:
We have an ASP.NET 2.0 (C#) application that is divided into multiple layers. The multiple layers come from having a web project and 2 different class library projects in the same solution. I'm...
60
by: jim | last post by:
I am looking for an application that will wrap my .Net application (and any needed .Net parts) into a single exe. I know of Thinstall ($4,000 for application and per copy fees for your exes) and...
3
by: WP | last post by:
Hello, I have a very simple script (or would you call it a batch file?) with the following content: connect to mydb2; DROP TABLE staff_employee_address; DROP TABLE...
0
by: brum2008 | last post by:
Hello! Below is the Netbeans Mobility source code for my application (The application offers SPP service, and then just hangs waiting for a client to connect (using acceptAndOpen()). The other...
3
by: cwinay | last post by:
Hey guys, I couldn't find a dedicated hardware section here so I picked this section to ask my question assuming that system administrators of all kind hit this forum. Guide me to an appropriate...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...

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.