My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 31796: Not releasing unnecessary memory within tabs
36 people starred this issue and may be notified of changes. Back to list
 
Reported by boris...@gmail.com, Jan 7, 2010
Chrome Version       : All Google Chrome stable, beta, dev till 4.0.288.1 
and Chromium
URLs (if applicable) : any

One of the biggest problem of Google Chrome / Chromium is using lots of 
unnecessary memory. I'm not talking about closing tab processes - this 
indeed releases all the memory. What is dealt with here is if the tab is 
not closed and the same tab is being used for opening lots of sites through 
links (but you don't want to close it yet, and you need to keep the tab 
history to go to other links), the memory usage will bloat abnormally and 
unnecessarily. It seems that memory used in the same tab process can only 
increase on average but never decrease. My suggestion is to dump the tab 
process and create a new one for any links opening in the same tab, while 
preserving the back/forward history of the tab.

The can be demonstrated by going to any website, say Google Chrome Help. 
Note the memory usage in Task Manager. Go into several links, click some 
'back' (and 'forward'), then click another link. The memory usage only 
increases in general but not decrease (much) even if you navigate to a 
simpler site. Open a new tab and go the same final URL. Both tabs should 
use almost the same memory since they are only displaying the same page. 
However, in reality, I can have the former tab (which contains some 'back' 
history) using 193 MB and the latter tab (same page without history) using 
31 MB. The former tab process should need only about 31 MB to display the 
page, and not using memory on any contents of previous pages. This means as 
much as 162 MB or 5 times the memory is wasted unnecessarily for a single 
tab.

I have lots of extensions so the memory usage is exaggerated (but if the 
extension is hogging memory it should be add to its process, not the 
tab's). So I tried to use a new profile without extensions nor command line 
switches and still see the same problem. For example, CNN.com - Privacy 
Statement uses 7 MB in a clean tab but 21 MB if you go to CNN.com, click 
around, back, before finally going to its Privacy Statement. Still, it 
wastes 2 times the memory it should need.

I have screenshot of both to prove though you may test it yourself or 
already knew it. The easiest test is go search in Google, note the memory 
usage, click a result and navigate back. The memory used will already be 
significantly more than the original level.

This is a big problem for users on SSD and have page file (virtual memory) 
disabled to minimize wear. With the limited amount of RAM, Chrome just 
frequently uses it all up, the low memory message constantly appears and 
Chrome eventually being forced to close. The problem is entirely solvable 
if Chrome uses just what it needs - going back and forth to any page in a 
tab should use the same memory as opening the pages in a new tab.

The current workaround is to force Chrome to establish a new process for 
the link you want to click, say closing and reopening the closed tab, and 
periodically end bloating processes and reload all the crashed pages, or 
restart the whole browser, which contradicts the purpose of the multi-
process design. Merely reload even increases the memory, which is also 
abnormal too. The Purge Memory button doesn't help much (but why in the 
first place do we need to purge memory? Can it be automatic and can we have 
the option to force Chrome always use the least memory?).

A quick working solution, taking advantage of the multi-process model, can 
be as the Chrome comics says (http://3.ly/WrfM) to recycle the process for 
different domains and further extend to any links opened in the same tab as 
there is no script relationship between the current and previous page even 
if they are in the same domain. For tabs opened in the same process, memory 
should be more completely reclaimed when the tab is closed (now it is not). 
Only then, Google Chrome will truly have less memory bloat over time.

I am unsure if the unnecessary memory retention is for caching previous 
pages, but at least there should be an option for users with tight memory 
to specify Chrome not to cache in the memory, or an option to use only the 
necessary memory (including virtual memory) i.e. the memory used by tabs is 
always as low as after the browser is restarted and tabs restored, or an 
option to enable the solution above (is there a switch for that already?).

These are the command line switches I normally use. Notice I have disabled 
the disk cache to protect the SSD:
chrome.exe --bookmark-menu --enable-udd-profiles --disk-cache-size=1 --
media-cache-size=1 --restore-last-session --experimental-spellchecker-
features --purge-memory-button --enable-gview --disable-custom-jumplist --
enable-fastback
Capture.PNG
38.0 KB   View   Download
Capture2.PNG
103 KB   View   Download
Jan 7, 2010
#1 mkte...@gmail.com
I've been noticing high mem usage too, lately (though it's possible I just didn't 
notice before), after browsing around on a multipage site for a while.  But for me, 
going to a different site (Google homepage via Home button) immediately releases most 
of the memory.
Jan 8, 2010
#2 boris...@gmail.com
Thanks, so you have noticed the same problem too. The high mem usage has been much 
more pronounced since the introduction of extensions. Even without extensions it is 
still unsuitable for legacy systems according to my experience.

That 'trick' sometimes works here too. Going to a new site not by link clicking may 
prompt it to recreate the process. Some extensions seem to hinder that.

Anyway, the problem still exists as it should consistently reload the process upon 
loading any page, so as to use the bare minimum memory needed by that page, and stop 
any ill functioning extension to hog the memory.
Jan 14, 2010
#3 boris...@gmail.com
With extensions each using up extra memory and as it is too hard to control their 
quality, recreating the process per page loading may be the best solution.
Feb 18, 2010
#4 lafo...@chromium.org
Using an automated filter to classify this issue into an area...gulp
Labels: -Area-Undefined Area-WebKit autoclass
Feb 19, 2010
#5 lafo...@chromium.org
(No comment was entered for this change.)
Labels: -Area-WebKit -autoclass Area-Undefined
Feb 26, 2010
#6 thestig@chromium.org
(No comment was entered for this change.)
Labels: -Area-Undefined Area-Internals Internals-Core Memory
May 1, 2010
#7 wrar42@gmail.com
It seems autorefresh (forums.asp.net, gmail etc.) causes memory eating too, and it 
happens automatically, even when you don't use browser at all, so that's even worse.
Jul 2, 2010
#8 erik...@chromium.org
(No comment was entered for this change.)
Labels: not-extensions
Mar 18, 2011
#9 lafo...@chromium.org
Chrome Version       : All Google Chrome stable, beta, dev till 4.0.288.1 
and Chromium
URLs (if applicable) : any

One of the biggest problem of Google Chrome / Chromium is using lots of 
unnecessary memory. I'm not talking about closing tab processes - this 
indeed releases all the memory. What is dealt with here is if the tab is 
not closed and the same tab is being used for opening lots of sites through 
links (but you don't want to close it yet, and you need to keep the tab 
history to go to other links), the memory usage will bloat abnormally and 
unnecessarily. It seems that memory used in the same tab process can only 
increase on average but never decrease. My suggestion is to dump the tab 
process and create a new one for any links opening in the same tab, while 
preserving the back/forward history of the tab.

The can be demonstrated by going to any website, say Google Chrome Help. 
Note the memory usage in Task Manager. Go into several links, click some 
'back' (and 'forward'), then click another link. The memory usage only 
increases in general but not decrease (much) even if you navigate to a 
simpler site. Open a new tab and go the same final URL. Both tabs should 
use almost the same memory since they are only displaying the same page. 
However, in reality, I can have the former tab (which contains some 'back' 
history) using 193 MB and the latter tab (same page without history) using 
31 MB. The former tab process should need only about 31 MB to display the 
page, and not using memory on any contents of previous pages. This means as 
much as 162 MB or 5 times the memory is wasted unnecessarily for a single 
tab.

I have lots of extensions so the memory usage is exaggerated (but if the 
extension is hogging memory it should be add to its process, not the 
tab's). So I tried to use a new profile without extensions nor command line 
switches and still see the same problem. For example, CNN.com - Privacy 
Statement uses 7 MB in a clean tab but 21 MB if you go to CNN.com, click 
around, back, before finally going to its Privacy Statement. Still, it 
wastes 2 times the memory it should need.

I have screenshot of both to prove though you may test it yourself or 
already knew it. The easiest test is go search in Google, note the memory 
usage, click a result and navigate back. The memory used will already be 
significantly more than the original level.

This is a big problem for users on SSD and have page file (virtual memory) 
disabled to minimize wear. With the limited amount of RAM, Chrome just 
frequently uses it all up, the low memory message constantly appears and 
Chrome eventually being forced to close. The problem is entirely solvable 
if Chrome uses just what it needs - going back and forth to any page in a 
tab should use the same memory as opening the pages in a new tab.

The current workaround is to force Chrome to establish a new process for 
the link you want to click, say closing and reopening the closed tab, and 
periodically end bloating processes and reload all the crashed pages, or 
restart the whole browser, which contradicts the purpose of the multi-
process design. Merely reload even increases the memory, which is also 
abnormal too. The Purge Memory button doesn't help much (but why in the 
first place do we need to purge memory? Can it be automatic and can we have 
the option to force Chrome always use the least memory?).

A quick working solution, taking advantage of the multi-process model, can 
be as the Chrome comics says (http://3.ly/WrfM) to recycle the process for 
different domains and further extend to any links opened in the same tab as 
there is no script relationship between the current and previous page even 
if they are in the same domain. For tabs opened in the same process, memory 
should be more completely reclaimed when the tab is closed (now it is not). 
Only then, Google Chrome will truly have less memory bloat over time.

I am unsure if the unnecessary memory retention is for caching previous 
pages, but at least there should be an option for users with tight memory 
to specify Chrome not to cache in the memory, or an option to use only the 
necessary memory (including virtual memory) i.e. the memory used by tabs is 
always as low as after the browser is restarted and tabs restored, or an 
option to enable the solution above (is there a switch for that already?).

These are the command line switches I normally use. Notice I have disabled 
the disk cache to protect the SSD:
chrome.exe --bookmark-menu --enable-udd-profiles --disk-cache-size=1 --
media-cache-size=1 --restore-last-session --experimental-spellchecker-
features --purge-memory-button --enable-gview --disable-custom-jumplist --
enable-fastback
Labels: -Memory bulkmove Stability-Memory
Jul 15, 2011
#10 terrence...@gmail.com
I've been having significant memory issues with Chrome for the last several months as well - currently 14.0.814.0 dev-m.  My use model is to leave Chrome open over several days with many tabs open (~10-15).  As can be seen in the screen shot enclosed, Chrome eventually uses up 2GB of memory / 3GB VM.  It gets so bad that Windows 7 reports Low Memory warnings (I have 4GB RAM).

The longer a tab stays open the larger its memory footprint gets.  It doesn't seem related to the content of the Tab's page, but rather its history.

The workaround is to restart Chrome every day or two.
Chrome Memory.jpg
25.7 KB   View   Download
Aug 24, 2011
#12 coolk...@gmail.com
What is now done in Safari is auto-unloading of memory of tabs that are not used for some time...I don't want to close them but I don't need them to be kept in memory and running all the time, and when "reactivated" in this case they shouldn't have to reload content from the web either, just be fetched from disk to memory again.
Aug 24, 2011
#13 yurken...@gmail.com
> when "reactivated" in this case they shouldn't have to reload content from the web either, just be fetched from disk to memory again.

I have exactly the opposite suggestion, while I also keep around a hundred tabs open for weeks:  issue 90593 .

My case is that there's greater need in RAM than in Internet connection--and it's much cheaper to re-load the page (at least when it didn't have any interaction AND there's internet connection available) than to (A) hibernate process for a page to disk and (B) restore it from disk. Chrome just needs to be stable and never close when you didn't ask for--given that, you don't have to deal with slow startup anywhere frequent to care about it. And yes, I use Chrome when offline very frequently--nevertheless.
Sep 7, 2011
#14 mal@google.com
(No comment was entered for this change.)
Labels: Stability-CodeYellow
Aug 10, 2012
#15 bugdroid1@chromium.org
Due to the age of the issue, changing the priority to P3, however because it has at least 10 stars, marking it for review.
Status: IceBox
Labels: -Pri-2 Pri-3 Action-NeedsReview
Aug 10, 2012
#16 lafo...@google.com
(No comment was entered for this change.)
Status: Unconfirmed
Mar 10, 2013
#17 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Area-Internals -Internals-Core -Stability-Memory Performance-Memory Cr-Internals Cr-Internals-Core
Apr 1, 2013
#18 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Performance-Memory Stability-Memory
Sign in to add a comment

Powered by Google Project Hosting