Sample Header Ad - 728x90

What is the best way to understand of the efficiency of my program other than load average?

0 votes
1 answer
66 views
Consider the following scenarios: 1. I have only one process running on the machine and from resources like top gives 100% CPU usage which is good. I'm efficiently using the CPU. 2. I have two processes each of them taking 50% CPU. I'm still using the CPU efficiently as the total is hitting 100%. 3. I have N (relatively large number) processes running on the machine. Since the CPU is busy. My process may not hit 100% CPU still makes sense as the processor is busy too. 4. Now let's say there is only one process on the machine and still the CPU usage doesn't hit 100% CPU. Assume the cause is due to a bad program (too much IO or the program is simply doing nothing). How do I detect case 4? The load average is not a good metric because it takes the average at different times. Is there any metric or method that I can use to quantify how efficiently my program is using the CPU both under no-load conditions and fully loaded conditions?
Asked by vijaychsk (1 rep)
Aug 12, 2021, 09:51 PM
Last activity: Aug 12, 2021, 10:17 PM