Browsers today are more like operating systems than document viewers. Users are performing an increasing number of tasks in the browser, and fewer in desktop applications. However, every web page, web app, and extension uses memory. As a result, users are often concerned about how memory usage impacts their experience.
We’re working to develop solutions to address this concern. These solutions include providing websites and extensions developers with information to help them use fewer resources and helping users understand how their browsing habits can affect Microsoft Edge’s resource usage.
We’ll be sharing more about Microsoft Edge’s memory usage over the coming months, starting with today’s post diving into Microsoft Edge’s multi-process architecture. We hope this will provide insight into how Microsoft Edge is using your computer’s resources, how browsing habits impact resource usage, and how you can help us make Microsoft Edge even better.
How multi-process architecture helps improve browser security and reliability
Many browsers are built using a multi-process architecture, which means the browser is split into different processes.
- Browser process: This is the main process, which helps manage windows and tabs, and controls the browser frame such as the address bar and forward and back buttons. It also routes privileged access to utility processes like network requests and file access.
- Renderer processes: These control how websites are rendered in a tab by executing code provided by the website. They handle HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), JavaScript, images, and more. The resource usage of each renderer process varies depending on the content being hosted.
- GPU process: This process is responsible for communicating with the GPU (graphics processing unit) and handles all GPU tasks. The GPU is a piece of hardware that performs graphics-related calculations quickly and sends the output to a monitor for display. Modern browsers use the GPU to quickly render web pages.
- Utility processes: Audio playback, network service, video capture, data decoding, and collections manager are all handled by these processes, so that Microsoft Edge can control and audit access to these resources and coordinate the use of global system resources.
- Plug-in processes and extension processes: Plug-in processes contain active plug-ins such as Adobe Flash, and extension processes contain active extensions. Each process executes the code provided by the plug-in or extension. The resource usage of each process varies depending on the code provided. Each process also has code that allows the plug-in or extension to communicate with the browser and renderer processes.
- Crashpad handler process: This tracks the health of the different processes in Microsoft Edge. If Microsoft Edge crashes, this process will help the browser capture and transmit crash reports to Microsoft servers. We use these crash reports to find and fix crashes.
Now that we’ve covered what each process does, let’s walk through an example of processes that would be running for a user who has one tab open and has two extensions turned on in Microsoft Edge.
If a user opened Windows Task Manager, this is how the processes would be displayed:
In this example, the user would see nine processes running:
- A browser process for the frame of the browser
- A GPU process to help display the graphics
- A renderer process that is running the code provided by an example site
- A network service utility process to help with network requests
- An audio service utility process to help with playing audio
- A plug-in process that is running the code provided by Flash
- Two extension processes, one for each extension, that are running code provided by the extension
- A crashpad handler process that is monitoring the health of Microsoft Edge
All these processes work together to give you the browsing experience that you use today.
Now let’s look at another example. In this next example, the user has four tabs open and two extensions enabled (Figure 2). Each tab has one advertisement (two from one site, and two from a second site).
In this example, if the user opened Task Manager, they would see 14 processes running:
- A browser process for the frame of the browser
- A GPU process to help display the graphics
- Six renderer processes:
- Four renderer processes for the tabs: Each tab has its own renderer process and is running the code provided by the website. Occasionally, tabs from the same domain will share a process.
- Two renderer processes for the ads: Ads from the same domain will share a process and will run the code provided by the ad. In this example, the two ads for the first site will share a process and the two ads for the second site will share a separate process. These ads are embedded in the web page using something called a subframe. (We’ll talk more about subframes later.)
- A network service utility process to help with network requests
- An audio service utility process to help with playing audio
- A plug-in process that is running Flash
- Two extension processes, one for each extension, that are running the code provided by the extension
- A crashpad handler process that is monitoring the health of Microsoft Edge
Some examples are more complicated. You might see additional processes for subframes that aren’t visible to you, or you might see items—like service workers or web workers—share a process with tabs or subframes. Service workers and web workers are scripts that run in the background to improve performance and allow you to use some sites and apps without an internet connection.
Benefits of a multi-process architecture
Every process has a distinct purpose, and there are numerous factors that affect the total number of processes. So why does Microsoft Edge use this multi-process architecture?
Like other modern browsers, Microsoft Edge uses this architecture for better security, reliability, and resource accountability into how the browser is using resources. Microsoft Edge is built on the Chromium project and shares a common implementation with other Chromium browsers.
Enhanced security:
If malware takes advantage of a security weakness in one of the renderer processes, it is difficult for it to escape that process and affect another process.
The renderer process is the process most likely to get attacked because it is the process interacting with the website. This process has low privileges, and extremely restricted access to the operating system, so if malware were to take control of that process, it would be unable to take control of the machine. The communication between the renderer process and the browser process are narrow in scope and protected. It is hard for malware to take advantage of this to exploit the browser process.
Additionally, process isolation prevents one process from accessing another process’s memory, which also improves a browser’s security. Let’s say, for example, that you’re purchasing a shirt online and there’s an ad on the site. The site that you’re on needs access to your credit card information to complete the transaction; however, the ad does not need access to this information. Ads are put in their own process so that even if the ad is compromised, it won’t have easy access to your sensitive information.
Reliability
If a crash occurs on a web page, web app, extension, or plug-in, only the process that experiences the crash will be affected, improving the browser’s reliability. The rest of the browser, including most other tabs, will remain stable.
Resource accountability
Isolating each process makes it easier to see in Task Manager which process is using the most resources, and provides information about what’s contributing to the resource usage. Is Microsoft Edge using the most resources, or is it a website, extension, or plug-in? You can also see this information in Microsoft Edge’s internal task manager, which you can open by pressing Shift+Esc while in Microsoft Edge or by going to the top corner of the browser and selecting Settings and more (…) > More tools > Browser task manager.
Listening to your feedback
We recognize that people rely on their browser more than ever before, and we want browsing the web to be effortless. If you experience an issue with Microsoft Edge, send us feedback with as much detail as possible. Please include information such as steps to reproduce the issue, the URL of the page you visited, diagnostic data, a screenshot, and your email address, so we can email you for more information. This will help us address your feedback.
Stay tuned for an upcoming blog post where we’ll learn how computers manage memory.
–Allison Pastewka, Program Manager, Microsoft Edge