performance - What is meant by CPU Utilization of a process and How can it be decreased? -


What is a procedure used by the CPU?

How to measure it?

What does it mean to reduce it?

I have always been confused with this concept. I have tried to measure the CPU using the 'top' command in Linux. But, what I have seen, when any other user is running, my process is spike-up and 99% CPU seems to not be blocked in I / O. But, if the second process is going on, then it comes to 45% or 50%. When another process is underway, is 99% acceptable for the process of taking CPU?

Any link or pointers will also help in the direction. In this context, CPU usage is the ratio of total available processor chunks, which are consumed by each process.

If this is just a few long computing-wide calculations, then what you're looking for is normal: the OS is dividing the computing resources between 100% of the resources of the computer that are asking for it .

If, instead, your program has some events, such as the user pressing a key or waiting for the input to reach from that network, it seems that your program is in an endless loop: it is any Do not wait for the thing, but only if you are brainwashed all the time, then you should consider writing it again so that, when there is no work to do it, then it is waiting for something This one Waiting for the user by pressing the capital, reaching a network connection for the packet or whatever, if there is such a case, then you should search for the code that "do any work? No! Is there any work to do? No! Is there any work to do? No! " Like crazy If this is the case, you should find a way to wait for it to work, using the appropriate operating system call or library function.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -