none
How to see how many core are working by performance monitor application RRS feed

  • Question

  • i am running a multi threaded winform application. so i need to see how many core are using by my c# application by windows default performance monitor application. please guide me how to configure or setup performance monitor application which show me how many core are in use when i am running my multi threaded winform application. thanks
    Tuesday, February 18, 2020 8:52 PM

All replies

  • Hi Sudip_inn,

    Thank you for posting here.

    Questions about setting up performance monitors can be asked in Windows Support, I rarely use it and am not familiar with it.

    And what I want to say is that multi-threaded programs do not necessarily use all the cores.

    In the past, I used Java to do an experiment and run a 4-threaded program on a 4-core computer. If the calculation of the thread is very simple, threads are not necessarily evenly distributed.

    But I haven't tried it with C#, so I'm not completely sure about this, but I think this should belong to the CPU's scheduling algorithm.

    So even if there is a way for the performance monitor to show how many CPU cores are being used, that is the use of the whole computer, not the use of this winform program.

    Of course, C# provides a method to allow a thread to run on a specific CPU core. This method may accurately count how many CPU cores the program will use, but this is not a good idea in general, it will reduce the overall efficiency.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 19, 2020 2:30 AM