none
WMI class Win32_PerfRawData_PerfProc_Process property PercentProcessorTime in physical and virtual machine RRS feed

  • Question

  • Any insights on this would be greatly appreciated...

    I am using Win32_PerfRawData_PerfProc_Process to query 'PercentProcessorTime', i.e., '% Processor Time' and cook it using the formula 100*((X1-X0)/(Y1-Y0)) to get the CPU utilization of a process (not the processor).

    The experiment is conducted in a physical workstation and on a Virtual Machine. The outcome is really interesting. While it takes 0.005% on the physical workstation takes about 7% in the virtual machine...

    Any idea on why this happens would be very helpful. Also would be interested to know the best way to collect CPU utilization of a process that runs in a virtual machine (guest OS).


    Kannan
    Tuesday, November 2, 2010 12:13 PM

Answers

  • Hi Kannan,

    We cannot expect our application runs on Virtual Machine as fast as on Physical Machine, however, your test result shows that there is a huge performance gap between Virtual Machine and Physical Machine, could you please try a C++ version (available at here) and check whether they produce similar results?

     

     

    We temporarily mark a reply, please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

    • Marked as answer by eryang Monday, November 8, 2010 2:54 AM
    Wednesday, November 3, 2010 2:10 AM