Increase number of threads per process

Discussion in 'other software & services' started by Hungry Man, Feb 2, 2012.

Thread Status:
Not open for further replies.
  1. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,146
    Reg key HKLM/SYSTEM/CurrentControlSet/Control/Session Manager/Executive

    You'll see two entries. AdditionalCriticalWorkerThreads and AdditionalDelayedWorkerThreads.

    These two registry values are default 0 and intended mostly for server usage.

    Essentially CriticalWorkers threads handle "time critical" tasks and DelayedWorker threads handle not-time critical tasks.

    By increasing the values you increase the number of threads dedicated to these tasks. This is helpful for servers, which can make use of these threads without having too big a hit on resources. A high end computer should be able to see the same benefits.

    I've never seen any benchmarks though - I'd be interested to. I wouldn't really recommend you change these values unless you're willing to do before/after tests.

    MS's recommended value for Servers is 10. Perhaps someone here is willing to try and post results for 10, 20, 30, 40 with their computers? A restart is needed between each change.
     
  2. guest

    guest Guest

    I saw this on the Tweaks section of Game Booster Portable some weeks ago (recommended value was 10 too). I hope somebody will post test results; I decided to not apply this because I didn't find any tests.
     
  3. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,146
    I was wandering the registry and came across them. I looked them up and MS actually recommends server admins make use of them sometimes.

    I've gone from 10, 20, 30, 40 but I'm too lazy to benchmark and I'm on Windows 8 so it wouldn't be that helpful anyways for other users. There is a noticeable increase in the number of threads (from 400-800~) when moving between those.
     
  4. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,381
    Location:
    West Yorkshire, UK
    Hmmm more poorly researched tweaks, reminds of of Vipers.

    Incorrect.
    According to Win internals book by Russinovich and Solomon this registry setting is the number of additional threads to create on startup - system calculates default amount based on installed ram and if the system is a server or not and adds the specified additional threads on top.

    The system executive will dynamically create and destroy worker thread depending if there are items in the worker item queue.
    It looks like only 16 additional threads can be created, but I've only skimmed so not 100% sure on that.
    Side effects of creating too many worker threads on start up are greater system resource usage (which may be better put to use on other tasks).

    Cheers, Nick
     
  5. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,146
    Hence my plea for research.

    http://msdn.microsoft.com/en-us/library/cc615012(v=bts.10).aspx

    More than 16 additional threads can be created. And I don't think it's a base of 16, I think it's 16per something ie: When I restart after this "tweak" I gain a hell of a lot more than 16 and moving from 16 to 32 to 64 will continue to increase the count.

    Normally I give very little credence to "tweaks" (most are flat out wrong or do nothing) but this is something recommended by Microsoft, albeit for servers. Just curious if it can carry over.
     
  6. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,381
    Location:
    West Yorkshire, UK
    16 per queue, 16 is the max value of the reg setting, according to the msdn link.

    Cheers Nick
     
  7. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,146
    Good to know.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.