Windows 2000 Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 6 December 2009

The many instances of Chrome

Posted on 08:00 by Unknown
As many readers of this blog may know, Google Chrome is different from other Windows web browsers. It isolates each of its tabs into an individual process, instead of containing them all in a single multi-threaded process. Google Chrome essentially forks itself each time you create a new tab. This can easily result in 10-20 chrome.exe processes running on your system. But, don't worry -- that doesn't mean more memory or CPU use. Read on.

Fork? That's when a process creates a new running copy of itself, identical to the first. As always (fork or not), the virtual memory between process instances is mostly shared. Therefore, additional RAM usage is negligible. From a RAM use perspective, there is no big difference between forking a process and spawning a new thread.

How does memory/RAM get shared between processes? Well, that's a different subject, but its really simple - its all in the virtual to physical mapping. Physical memory is the actual RAM, where-as virtual memory is an abstraction of that RAM that can exist in RAM, on disk (i.e. a page file), or anywhere else.

As a sharing example, a page of memory may exist at location X in physical RAM. Well, if two processes reference that same physical page of memory, they both can have different virtual pointers to it. If one process writes to that shared memory, Windows will apply a principle known as copy-on-write. This is where the process that wrote to the memory gets its very own copy of the shared page, because its now uniquely modified for that process. Read more on virtual memory if you want to know more.. back to Google Chrome.

Forking is very common for *nix environments, where applications fork themselves all the time. Windows applications traditionally spawn new threads instead of forking the entire process. Google decided to take a different approach, using forks. Note that the technical aspects of the Chrome fork may differ from a traditional *nix fork, but its conceptually the same.

The biggest advantage of isolating each tab into its own process space is that a crash in any one tab can't (or shouldn't) bring down the entire application (all the tabs). Again, since identical virtual memory is shared between processes, there isn't much extra memory overhead associated with all these Chrome processes. Each process will only allocate memory exclusively applicable to the tab it owns. Further, since the Windows CPU scheduler only sees threads, this forking design doesn't affect how Chrome performs during periods of high CPU contention.

One interesting performance note is that Chrome dynamically lowers the priority class of processes hosting background tabs, similar to what Process Lasso's ProBalance does. So, when you switch tabs, Google Chrome lowers the priority class of the old tab's process and raises the priority class of the new tab's process (to below normal and normal, respectively). I would hope that traditional single-process browsers do the same with individual thread priorities, but I wouldn't bet on it.

This lets the Windows CPU scheduler know which process's threads are most important during periods where there is heavy contention for CPU time slices. Of course, the most important threads will be those in the process thats holding the tab you're currently using. The others are important as well, but don't need quite the same level of real-time responsiveness as the foreground process's threads will. Although Windows has built in mechanisms to boost foreground thread performance, giving the Windows CPU scheduler 'hints' as to what should take precedence is always a good idea - after all, its not psychic.

That's what Process Lasso aims to do -- help give the Windows CPU scheduler a few more hints as to what should get precedence, and to rescue the user in the case of catastrophic CPU monopolization (as demonstrated by our CPU Eater demo). If more applications cared as much about their impact on the rest of the system as Chrome does, then perhaps there wouldn't be as much of a need for Process Lasso's ProBalance.

Well, I've spent enough time rambling on.. back to real work. I hope this helps explain to anyone who is concerned by the 20 different instances of chrome.exe they may see running on their PC ;).
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • WARNING: Cracks for Process Lasso may modify HOSTS file
    WARNING:  Cracks for Process Lasso have been seen to modify your system HOSTS file so that you can no longer access  bitsum.com  and/or  bit...
  • Process Lasso and WDFME
    Since Process Lasso can be complex for the layman, something we are working on, I wanted to list a set of steps to address the commonly abu...
  • Tightening the Governor
    Most users of Process Lasso are familiar with its core engine, ProcessGovernor.exe. It is the silent background process that applies all pro...
  • The many instances of Chrome
    As many readers of this blog may know, Google Chrome is different from other Windows web browsers. It isolates each of its tabs into an indi...
  • Oh the frustration with this corporate crapware!!
    I now get uninstall feedback, as I solicit it (for better or worse). Once read, I can never go back, lol. Fortunately, most of it is actuall...
  • ParkControl updated to v1.0.0.0
    This nifty utility, included in Process Lasso v6, lets you enable or disable CPU core parking in REAL TIME , no reboot required. It also let...
  • Next update, Options menu gets some changes
    I decided to make the Options menu a little more consistent and move the ProBalnce configuration down with the rest of the rules configurati...
  • Anti-virus software - the #1 cause of PC performance troubles
    Many users realize their anti-virus software consumes massive amounts of system resources, and hope that Process Lasso will somehow keep it ...
  • If you are seeing random crashes of the GUI or core engine ...
    Many users of Process Lasso have experimented with various system 'optimization' utilities. Many of these make permanent changes to ...
  • CPU Parking revisited: How to enable or disable CPU Parking yourself without registry edits
    This post has been superceded by this newer, better, and more up to date one.. including a new freeware utility called ParkControl that can ...

Blog Archive

  • ►  2013 (1)
    • ►  March (1)
  • ►  2012 (6)
    • ►  September (1)
    • ►  July (1)
    • ►  June (2)
    • ►  January (2)
  • ►  2011 (166)
    • ►  December (3)
    • ►  November (2)
    • ►  October (2)
    • ►  September (6)
    • ►  August (12)
    • ►  July (14)
    • ►  June (17)
    • ►  May (19)
    • ►  April (13)
    • ►  March (27)
    • ►  February (31)
    • ►  January (20)
  • ►  2010 (203)
    • ►  December (23)
    • ►  November (34)
    • ►  October (38)
    • ►  September (17)
    • ►  August (19)
    • ►  July (19)
    • ►  June (11)
    • ►  May (16)
    • ►  April (8)
    • ►  March (6)
    • ►  February (6)
    • ►  January (6)
  • ▼  2009 (43)
    • ▼  December (6)
      • CNET 'Reviews' Process Lasso
      • The hazards of reading user reviews
      • Running Process Lasso with Highest Rights - new be...
      • WARNING: Beware of pirated copies of Process Lasso...
      • New low cost license experiment
      • The many instances of Chrome
    • ►  November (1)
    • ►  October (10)
    • ►  September (3)
    • ►  August (1)
    • ►  July (9)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (4)
Powered by Blogger.

About Me

Unknown
View my complete profile