Thursday, June 17, 2010

How to prevent IE8 from launching new iexplore.exe for every new tab

A major but rarely advertised feature of Internet Explorer 8 is the way the browser handles creation of new tabs. Most browsers, including Opera, Firefox and IE version prior to IE8, consolidates all tabs under a single browser process. Because of this a single rogue website or a buggy code on a page can bring down the entire browser, which happens all too often.

Internet Explorer 8 introduced some major architectural changes, called Loosely Coupled IE (LCIE). LCIE separates the main window process (frame process) from the processes hosting the different web applications in different tabs (tab processes). A frame process can create multiple tab processes, each of which can be of a different integrity level and each tab process can host multiple web sites.


In plain words, a new tab spawns a new iexplore.exe process so that when one tab crashes, the rest of the tabs and the browser can survive. This is something, Google Chrome does too. The second benefit of frame/tab separation is to enhance the security of the browser. Because tabs run in different processes it allows the browser processes to decouple from the Windows shell so that malware infection on one tab process is isolated from the frame and other tab processes, as well as from Windows.

By default,  IE8 will start with two instances of iexplore.exe (one for the Frame, one for the tab) and grows the number of tab processes as needed based on the amount of available RAM, the number of tabs, the integrity levels for tabs, and the number of distinct IE sessions.

The downside of this approach is that with multiple tabs open, the browser can consume large amount of memory. The good thing however, is that you have control over the process through a registry key:

HKCU\Software\Microsoft\Internet Explorer\Main - TabProcGrowth (string or dword)

The key Tab Process Growth sets the rate at which IE creates New Tab processes. There are two algorithms used by Internet Explorer.

1. Context-based: By default, the context-based algorithm is used and the curve is chosen based on the amount of physical memory on the machine. In addition, the TabProcGrowth string registry value may be manually set to these values:

  • small: Maximum 5 tab processes in a logon session, requires 15 tabs to get the 3rd tab process.
  • medium: Maximum 9 tab processes in a logon session, requires 17 tabs to get the 5th tab process.
  • large: Maximum 16 tab processes in a logon session, requires 21 tabs to get the 9th tab process.

When your system is on a tight memory budget, go with the ‘small’ or ‘medium value.

2. The "Max-Number" algorithm: This specifies the maximum number of tab processes that may be executed for a single isolation session for a single frame process at a specific mandatory integrity level (MIC). Under these algorithm, the TabProcGrowth key takes these values:

  • TabProcGrowth = 0 : tabs and frames run within the same process; frames are not unified across MIC levels.
  • TabProcGrowth =1: all tabs for a given frame process run in a single tab process for a given MIC level.

    Note: On Terminal Server, the default value is the integer of 1.
  • TabProcGrowth >1: multiple tab processes will be used to execute the tabs at a given MIC level for a single frame process. In general, new processes are created until the TabProcGrowth number is met, and then tabs are load balanced across the tab processes.

    Note: that the frame process is no longer allowed to execute at low-MIC. If this is attempted, the process will exit.

You may select the Max-Number algorithm by specifying the registry value as an integer. The registry value may be a string value containing an integer (eg, "5") or a DWORD value containing an integer (eg, 5).

You have to restart IE for the change to take place.

[via MSDN Blog]

1 comment:

Popular Posts