|
-
Mar 9th, 2010, 04:57 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] How to determine processor load?
I have a multi-processing application that kicks off up to 4 threads at a time to process data into a SQL-Server database. It seems to work okay, except at times the processors are pegged at 100% and all threads slow down a bit.
So, what I want to do is conditionally fire a thread based upon the processor load... if they're already running at 100%, it makes no sense to kick off another thread.
Is there a way to determine what the processor load is? Task manager shows processor load, so there probably is... but how do I do it?
-
Mar 9th, 2010, 05:22 PM
#2
Re: How to determine processor load?
Here's a C# example of getting the CPU Usage.
-
Mar 10th, 2010, 03:09 PM
#3
Thread Starter
Hyperactive Member
Re: How to determine processor load?
Okay, that code worked fine. Thanks for posting it.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|