I have ran CPU stress test on linux HyperV VM. Linux reports 100% CPU utilization, but "Hyper-V Hypervisor Virtual Processor(*)\%Total Run Time" metric shows about 60-70%.
Is it possible to obtain "real" CPU utilization for Guest system? How to make "Hyper-V Hypervisor Virtual Processor(*)\%Total Run Time" 100%?
You can find physical core use on the host with “\Hyper-V Hypervisor Logical Processor(_Total)\% Total Run Time” (LPTR)
If you have more virtual processors than logical processors (cores) they will context switch and you get low virtual use; do not oversubscribe processors. The hypervisor has a small amount of overhead so you need a core or two more than you have vCPUs to approach 100% guest utilization.
Consider running this load test on bare metal as a comparison. That will show what 100% looks like on the processor.
I can think of two different interpretations of your question:
1) How much of the time was the Linux VM idle?
2) How much of the time was the Linux VM running code?
The answer to question #1 is that your Linux VM isn't idle. The fact that Linux thinks that it is 100% busy means that it was idle 0% of the time.
The answer to question #2 is 60-70%. The VPs of your Linux VM were running 60-70% of the time.
Perhaps you're asking a third question: Why are my Linux virtual processors only running 60-70% of the time?
To answer that, you'd have to look at other factors. Perhaps there are other VMs eating up time. Perhaps the Linux VM doesn't have paravirtual drivers (Integration Components) installed and its VPs are pausing because they are attempting to interact with "fully virtualized" hardware, which means that they're trying to do I/O and other operations in a way that would be appropriate for a physical machine and the hypervisor is spending time emulating those physical machine aspects.