none
Debug and Thread Pool Manager Performance RRS feed

  • Question

  • I have a WPF real time machine control program.  I am pushing the thread pool manager to the limit.  When I run the program in Visual Studio it keeps up much better than when I run the complied program by its self.  Is the CLR's thread pool manager different than the thread pool manager used in Visual Studio?

    • Moved by Sheldon _Xiao Thursday, January 10, 2013 7:11 AM (From:Windows Presentation Foundation (WPF))
    Tuesday, January 8, 2013 8:39 PM

All replies

  • Hi Michael,

    Welcome to the MSDN Forum.

    I am trying to involve some other one into this case, wait it patiently, please.

    Thank you.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 10, 2013 7:11 AM
    Moderator
  • Hello,

    Are you explicitly using the System.Threading.ThreadPool class in your application?

    thanks

    Frank K[MSFT]

    Thursday, January 10, 2013 7:11 PM
  • Not directly but effectively yes.  The program consists of 2 mostly independent threads running in 2 dispatchers.  The machine prints 3 serial numbers on a box with a total cycle time of 200 milliseconds or 5 cycles per second.

    One dispatcher controls 3 very high speed printers and a feeder. Each device is a TCP client.  A call back timer for each one checks the stream and records the printed serial number.

    The other dispatcher has 3 cameras with vision analysis reading the serial numbers.  Each camera has its own Ethernet port and its own thread. Each vision thread triggers an event when done to compares the results. If there are enough bad reads it can stop the printer.  The response is such that it will stop if there are 3 bad boxes in row.

    When running the program loads one core to about 40% and the other 3 cores to around 15%.  In VS2010 I count 14 threads.

    • Edited by MichaelBarb Thursday, January 10, 2013 7:50 PM
    Thursday, January 10, 2013 7:47 PM
  • I would like to update the program loads.  It is now using between 85% and 90% of all cores.
    Friday, January 11, 2013 7:19 PM
  • Hello, 
    You should determine what versions of the CLR are being used and see if they are different when running in the IDE vs stand-alone.  You can run the following command to determine this:

    clrver -all 
    thanks 
    Frank K[MSFT] 

    Tuesday, January 15, 2013 6:58 PM
  • It took me a few days before I could get access to try this.  All versions are using the same clr, 4.0.30319.

    Still, "vhost" could be running a different thread pool manager.  After some more research it looks like it is possible to override the default thread pool manager and replace it with your own.  Not totally sure about this.

    Friday, January 18, 2013 8:26 PM