Save memory in Chrome by using one process per site
When you open the Task Manager on your computer system after starting up Google Chrome and opening a couple of sites, you will notice that Chrome uses one process per tab that you have open in the browser plus one for the browser core and one for the GPU (graphics processing unit).
It is not really something to worry about unless your system is low on RAM as the browser's memory usage is highly affected by the number of processes that it spawns.
The real issue comes to light when you run lots of tabs in the browser, say 100 or even more. While it still depends on the RAM installed if you will notice an impact on the system's performance or not, it is safe to say that you will run into limits eventually.
you can open chrome://memory-redirect in the browser to display memory information. (Update: Google removed the option). There you find each tab listed for instance and its process ID. You can use it to find it in the Windows Task Manager.
Chrome by default launches each website you open in its own process. Open five pages here on Ghacks in tabs and you get five processes of chrome.exe.
While that is sometimes great for stability and security, as you separate those pages from each other to avoid that an issue in one can take down the whole browser, it may not be worth the memory that is used by that.
You can switch Chrome's way of handling processes with the launch parameter --process-per-site. If you do, Chrome will launch a single process for websites that you open. The five Ghacks pages would all run in the same process instead of five different processes which saves quite a bit of RAM in the process.
To use the parameter simply append it to the Chrome shortcut. On Windows, right-click on the shortcut that you use to launch Chrome and select properties. If the shortcut is attached to the taskbar, right-click a second time on the name of the program when the jumplist opens up.
Locate the target field and append the parameter to the end. Make sure there is a space between chrome.exe and --process-per-site. On my test system, the full line looks like this currently: C:\Users\Martin\AppData\Local\Chromium\Application\chrome.exe --disable-plugins --process-per-site.
You need to restart Google Chrome afterwards before the changes take effect. If you notice issues afterwards, remove the parameter from the shortcut again and everything should turn back to normal.
The method works best if you have a large number of tabs open at any time in Chrome of which at least some share the root domain. It has no effect if this is not the case.
Is one process per extension in Chrome possible using the method described above?
I’m not aware of such a feature.
thank you so much it worked like a charm
Seems to work on 1st attempt…
Though it might be the “restart effect”
Hope to notice the difference on the longer run, and will report back if i remember to ;)
I wonder what’s “better”: process-per-tab oder process-per-site.
Process per tab is safer cause it’s more tightly sandboxed but per site allows it to be more efficient instead of duplicating resources for each tab of a website.
There’s also –single-process which runs it like browsers of the past which of course have no sandboxing so it’s least secure and is definitely not recommended.
Martin, you made a slight boo-boo, in the target line: C:\Users\Martin\AppData\Local\Chromium\Application\chrome.exe –disable-plugins –process-per-site. The quotations of the target line are missing and should look like this: “C:\Users\Martin\AppData\Local\Chromium\Application\chrome.exe” –disable-plugins –process-per-site
If we try to append –disable-plugins –process-per-site to what you showed as an example which means adding it directly to the target path, the system reports an invalid path error. The only way this switch as with all switches will work is if you shown the example with the quotations:
“C:\Users\Martin\AppData\Local\Chromium\Application\chrome.exe” –disable-plugins –process-per-site
Quotation marks are only necessary if the path contains one or multiple space characters. Unless you mean something different but then I require more explanation.
I should have made that clearer though in the article.
On installation Windows 7 installs with that line in quotations by default. Removing the quotations gives the same invalid error message, so the quotation marks must be used with and without switches. As for further testing that switch, it doesn’t seem to work without the “–disable-plugins” part first and the whole thing must be entered as shown.
What I didn’t like is the built in plugins I am used to, were annoying not having them in place. Things as simply as being able to search from the URL bar was eliminated and regardless of what we typed we would be routed back to the default search engine start page. Where we had to re-type what we were looking for. The ability to do simple calculations in browser, as well as simply conversion was disabled as well. So though Chrome loaded up 2 seconds faster with that switch in place, loosing the plugins I rely on was inconvenient.
Plus I noticed this switch has no effect if we open several tabs all from different sites. It is only effective if we spawn multiple tabs from the same site.
Thanks LegoActionFigure for clarifying. I was getting an error when trying to apply with the quotes and was bumbed that another possible solution wouldn’t work. This memory issue is insane to the point that I’ve been giving serious consideration to deleting Chrome altogether and switching back to Firefox (like I’ve heard many others mention also). I sure hope this does the trick!
nope, martin didn’t make a slight boo-boo. as martin stated before, quotation marks are there only when the path (and the file name) has one space character or more. in my understanding the marks act as a wrapper to isolate the path so that any commands/switches/options are not considered as a path too. in any case, my target line doesn’t have quotation marks too (because it doesn’t contain any space characters) and it’s working fine (^_^)v
core and one for eht GPU
should be the not eht i suppose,
Not much more to say.
Doesn’t seem to work in Comodo Dragon (Chrome clone?). With 2 tabs open, I have 11 Windows processes running.
I have put the –process-per-site outside of the the target line quotes (it won’t accept it being inside).
Seems like this should be in some sort of configure screen, not have to be entered as a exe line parameter.
I thought I was doing something wrong (still scores of chrome.exe’s in memory) until I looked up the formal definition of the switch:
“Runs a single process for each site (i.e., group of pages from the same registered domain) the user visits. We default to using a renderer process for each site instance (i.e., group of pages from the same registered domain with script connections to each other).”
So consolidation is only for multiple tabs on the *same domain*. Yes, you did technically use such an example (5 pages of Ghacks), but it wasn’t made clear that’s the only scenario where it applies. I would guess that 80% or 90% of the tabs people have open are for different sites, so this is much less valuable than it first seems.
Sorry for not making that clearer. You are right, it only has an effect if you open multiple pages of the same site in Chrome. If you only open different sites, it has no effect.
I tried this and saw no difference in the number of processes. Both before and after adding the extra text to the shortcuts I have for chrome I still saw one process per tab
Martin you’re my man!
I did some moderately careful memory testing.
I had been using Chrome with 20 tabs open (about 40% were Google mail & Drive/docs, 40% my companies Confluence Wiki, the rest various websites).
My Chrome settings are configured so that on startup all windows/tabs are automatically reopened.
I measured the memory usage (the figure “Virtual memory mapped” shown as the bottom right when you do enter “chrome://memory-redirect/”) at the following times.
1. before doing anything (just after reading your blog post and opening “chrome://memory-redirect/”.
Memory usage: 2,213,116k
2. Restart Chrome with no changes to memory settings
Memory usage: 2,112,788 k (conclusion the “reopen” effect is a very small decrease in memory usage)
3. Restart Chrome with –process-per-site
Memory usage: 928,524k
So my memory usage has decreased from about 2Gb to less than 1GB and my system feels responsive again – amazing !
That’s wonderful Richard, as if Google added the option just for you ;)
is there a way to have –process-per-site but exclude some sites = esp . youtube.com ?
I don’t think that is possible.
Why do you want that?
This is strange. When –process-per-site appeared it was buggy and resulted in tabs freeze, memory leaks and crashes (maybe v.9.0.x – 13.0.x). It was very irritating when tab hangs while neibour tabs was loading, issue was recommended to fix with –process-per-tab (if i recall flag name correctly). So i’d use this flags with caution.
Also there’s a way to add flag in registry to not mess with every shorcut you may have in OS, but forums with this recipe is offline.
Nice find Martin…!…the trick runs pretty fine in SRWare Iron and Slimjet too. Thanks a lot..!!
What about –Single procces!
I tried it with Opera 34.0 (which is also based on Chromium) on Windows Xp and it works flawlessly!
Thanks for the information.
Or use #enable-site-per-process in chrome://flags
No longer exists in 2017, Chrome 58.
The function “chrome://system/” was removed in 2016. You can find information about this here, for example:
The function “chrome://memory-redirect” was removed in 2016. You can find information about this here, for example:
(Sorry, there was a mistake in my last post, please remove that one! Thank you!)
Sorry but the launch switch â€“process-per-site doesn’t work for me. I’m on Windows XP Pro running Chrome 49. It still starts 3 process for a single tab.
This does not mean that a single process starts only a single tab, it means that all instances of a site that are open use a single process.
Is there any way of getting Chrome to run as a single process, providing I have only one tab open?
I don’t think that there is such an option, but I have not looked into it thoroughly.
Thanks, Martin. Please do let me know if you find or hear of any fix. Chrome does pepper task mgr with processes and itâ€™s hard to find out how much memory it is actually using.
The –process-per-site option is not working
Trying to apply gives a not valid popup.
Did Google remove this option? 8/2020
Did you use two “–” in front of process? I just tried it in Chrome Canary and it did not show any popup.
This approach is outdated. Search for site isolation opt out flag in new version of chromium based browsers.