Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Server GC vs. Workstation GC

Server GC vs. Workstation GC

Scheduled Pinned Locked Moved .NET (Core and Framework)
tutorialcsharpvisual-studiosysadminperformance
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jqd2001
    wrote on last edited by
    #1

    Hi, Everyone, I read from a Microsoft guide on Performance (www.serverside.net) and it says that Windows Services uses Workstaton GC even Server has multiple CPU. The conclusion seems to be that we should not host TCP Remoting in WinSvcs. My Questions: (1) Is the above true or false ? (I have seen various opinion on this) (2) How to configure to use Server GC ( I have some idea but not sure about it. But I will open source it so everyone can comment later. Your open minded comment are greatly appreicated. Thanks James

    M 1 Reply Last reply
    0
    • J jqd2001

      Hi, Everyone, I read from a Microsoft guide on Performance (www.serverside.net) and it says that Windows Services uses Workstaton GC even Server has multiple CPU. The conclusion seems to be that we should not host TCP Remoting in WinSvcs. My Questions: (1) Is the above true or false ? (I have seen various opinion on this) (2) How to configure to use Server GC ( I have some idea but not sure about it. But I will open source it so everyone can comment later. Your open minded comment are greatly appreicated. Thanks James

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      If the .NET Framework is implicitly loaded, by loading a managed executable or loading a library into a process where the Framework isn't already loaded, the Workstation GC will always be used. To use the Server GC, you must explicitly load the framework by calling CorBindToRuntimeEx, exported by mscoree.dll. See Writing High-Performance Managed Applications[^] and Implement a Custom Common Language Runtime Host for your Managed App[^]. You can find more information on Brad Abrams' blog at http://blogs.msdn.com/brada/archive/2003/12/12/50948.aspx[^] Stability. What an interesting concept. -- Chris Maunder

      J 1 Reply Last reply
      0
      • M Mike Dimmick

        If the .NET Framework is implicitly loaded, by loading a managed executable or loading a library into a process where the Framework isn't already loaded, the Workstation GC will always be used. To use the Server GC, you must explicitly load the framework by calling CorBindToRuntimeEx, exported by mscoree.dll. See Writing High-Performance Managed Applications[^] and Implement a Custom Common Language Runtime Host for your Managed App[^]. You can find more information on Brad Abrams' blog at http://blogs.msdn.com/brada/archive/2003/12/12/50948.aspx[^] Stability. What an interesting concept. -- Chris Maunder

        J Offline
        J Offline
        jqd2001
        wrote on last edited by
        #3

        Mike, Thanks for your "real-time" response. I have read both articles: The 1st is great in concept and the 2nd has usable code. My Company blocked Blogging so I have to wait till after 6pm at home to read. I basically modified Steven Pratschner's code and made a Windows Services (.net) that calls Unmanaged API CorBindToRuntimeEx to run a remoting host code. (Just like you said). It really works as a TCP Remoting Host. Though My problem is that I would rather not use my code since it does not have PROVEN scalability in production.(and I do not have 8-CPU machine anyway) Is there any code I can download that has been proven ? Thanks James PS. I have no problem upload my code onto www.codeproject.com, so that we developer can improve and test it in this community.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups