.net - Looking for ways to determine whether the machine is "overloaded" -


I have a setup where various agents have been assigned the task. My problem is that I Would like it to be "overloaded".

I think the question is very ambiguous, so I'm going to expand a bit.

A task usually gets something from the database, processes the data and then writes it back to the database (either one or the other). A lot of figures can come in some tasks and some - much less, are mostly main I / O bound, but some may include heavy CPU bound computation.

The present agent architecture is such that an agent has a constant number of concurrent threads dedicated only to work - one thread per work (I know that this is bad, but this is a different story ). This type of thread is called the task thread Of course, they want the functions that worker threads are free to give any number of eggs work threads does not change in the number.

However, when every task thread is busy performing some heavy tasks, then the agent nostalgic is busy. We recognize this situation very easily.

However, another scenario is that an agent can have empty work threads, but the amount of work done by other work threads may be that the agent can handle anything, but very light work, for example , It may be running at least on the available RAM so that it is performing a minor complex task which is causing excessive swapping, resulting in serious disabilities of the agent Are there.

A valid question is whether the light work? Then, this is a different story, assuming that the work is such a flag in the metadata and believe that such tasks are really light-they do not take any or little data, they do not do heavy computations, the demand for very little memory We do.

Back to the original question - Status me, in addition to another unresponsive - Overloaded The arguments will only provide light tasks to the loaded agents.

What are my options here? Now, the only metric I can imagine is the amount of free physical memory (still it needs to be checked that the Net API returns this article).

This CPU and hard disk load (no amount of free space!) Other metrics can be open SQL connections, the amount of available thread pool threads.

I am looking for an advice here, maybe people have already encountered such a problem and have solved it, their experience is very interested in me.

We work in Net 4.52 in Windows.

I think the "work to the worker" in a better way is " To render "is to reverse - the only way to understand the worker PC is out of capacity CPU. Memory | IO status by WMI ...


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -