Previous Next

Thread: Desktop Heap and IIS

Last post 04-21-2008 12:38 PM by anilr. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 04-18-2008, 10:34 AM

    Desktop Heap and IIS

    Not so long ago I ran into the desktop heap problem with IIS 6 and unique user IDs for Worker process'
    http://support.microsoft.com/kb/831135

    This was on a 32 bit machine with 4 G Ram, and it broke around 65 process's

    The KB article states
    "Note This issue occurs in both the 32-bit version of IIS and the 64-bit version of IIS."

    Can any one point me to a article or KB on:

    • The relationship between "Desktop heap" , Physical Memory,
    • Size of Desktop heap in 32 bit and 64 bit OS, 
    • How does terminal service edition or citrix get around the desktop heap limitations

    I suppose what I am really asking is there anything I can do to get more unique process indeitities running without a shared desktop heap.

    Also does the desktop heap issue affect IIS7

    Lee hampton-whitehead
    Http://siliconpizza.com | I’ll have a slice of that
  • 04-18-2008, 2:28 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 1,090

    Re: Desktop Heap and IIS

    This article talks about desktop heap (and linked articles at the end talk about changes in vista/ws08)

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 04-21-2008, 8:38 AM In reply to

    • Rovastar
    • Top 10 Contributor
    • Joined on 03-13-2008, 10:00 AM
    • London, UK
    • Posts 594

    Re: Desktop Heap and IIS

    Microsoft state a limit of about 60. Here explains more.

    http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/appisoa.mspx

    "

    Number of Application Pools That Can Be Configured

    In the default configuration, using Network_Service as the application pool identity, you can create a large number of application pools without any difficulty. When you specify an identity for an application pool, it is given a set of resources, including a non-visible desktop. Interactive processes use desktops for dispatching events or messages, such as a mouse click, to Windows applications. In this context, only a few desktops are ever required by an application. For server applications, such as IIS, there is no interactive user; IIS and other COM applications running in a Single Threaded Apartment (STA) use the Windows message pump in a desktop to marshal data to COM components created within the process, and desktops are created even if the application uses no COM components. Microsoft tests show that when configuring more than 60 application pools with unique identities, a shared desktop should be used. This may be configured by setting the registry key HKLM\System\CurrentControlSet\Services\W3SVC\Parameters\UseSharedWPDesktop to 1. When this setting is enabled, application pools share a common desktop, thereby increasing scalability"

    And in related article read David Wang blog on this.

     http://blogs.msdn.com/david.wang/archive/2006/01/25/Security_considerations_of_UseSharedWPDesktop_on_IIS6.aspx

    and here is some more techy details on the heaps including 32 and 64 bit sizes

    http://blogs.msdn.com/ntdebugging/archive/2007/07/05/desktop-heap-part-2.aspx 

    Most overused word in IT is 'should' as in 'That should work!?!'
  • 04-21-2008, 12:38 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 1,090

    Re: Desktop Heap and IIS

    Note that using the UseSharedWPDesktop key is probably not necessary on x64 systems and on vista/ws08 x86 (or x64) systems due to the increase in address space available for session data and hence desktop heap.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (4 items)
Page view counter