Improve application performance and intelligence

I have a question related to application performance and intelligence.

I created a window service if I ran it on 3 different configuration computers. I want him to use the appropriate resources of the machine (processor and memory).

Say Machine 1 (M1) has one core with 1 GB of RAM.

Machine2 (M2) has two cores with 2 GB of RAM.

Machine3 (M3) has 4 cores with a 4 GB drum.

Now that my service is running on it, it should use the correct resource. For example, if the processor utilization is 1%, it should go to the user up to 50% or more. If it is already 50% use only 30%. So the ram. But never cross the limit, for example, 90% or something like that.

Basically, I wrote a multi-threaded service that right now does not care about machine resources and continues to use it. I want to include this intelligence in it.

Please help me with your ideas.

thank

+5
source share
2 answers

As Arsheg said, based on the number of processors, you can increase the number of threads. But increasing the number of threads based on CPU activity is the wrong way to do this.

- . , . . , . , .

, , . ? , , , , . : -, , .

- : , , , , ( ).

, " " , ( ). , .

+4

.NET , . , . . , , .

, .

  :

  • .
  • .
  • .
  • .
  • .
  • .
  • .
+2

All Articles