greatsuspender / thegreatsuspender

A chrome extension for suspending all tabs to free up memory
https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg/
GNU General Public License v2.0
5.03k stars 902 forks source link

Extension uses excessive memory / RAM #613

Open deanoemcke opened 6 years ago

deanoemcke commented 6 years ago

This is a placeholder issue for everyone who is finding that the extension uses more memory than expected.

To help with the investigation of these issues, it would be good if users could post all memory issues here along with the following information:

Here is an example screenshot: image

alidan commented 6 years ago

1.3gb around 800 tabs version 6.30 chrome Version 61.0.3163.100 windows 7

Honestly, it's far better than it was when I made, granted now chrome itself is being the pain in the ass with its bs, the most recent of it being the material design for everything... its to the point that i'm going to see about a firefox switch once the quantum is out of beta. last I used firefox I considered it unusable so wonder if they fixed all my issues with it or if they still haven't.

quantuumsnot commented 6 years ago

I'm on that mark too - between 1.5 and 2MB per suspended tab, 62.0.3202.62 (Official Build) (64-bit) on Windows 7 64bit Ultimate But this mainly depends on the sites

fwextensions commented 6 years ago

So this isn't unexpected memory usage. What's strange is that the majority of the tabs are suspended, but most of them are in that state where they just show the TGS icon. So I guess they're suspended, but the extension isn't tracking them.

It would be handy to have the number of suspended tabs listed somewhere, like in the tooltip on the icon, or maybe in Settings > Sessions.

deanoemcke commented 6 years ago

@fwextensions this sounds like a separate issue (and a bug). would you mind opening a new issue for this (the favicons not updating properly). Likewise for the feature request of being able to count the number of suspended tabs. Happy to discuss both of these things more, but would prefer to keep this issue focussed on memory issues.

alidan commented 6 years ago

@deanoemcke this happened to me too a while back. When a stupidly large image was loaded in chrome, my nvidia 1060 6gb shit the bed and couldn't render it. I think this was a chrome issue around... mid april march, as I have not updated the nvidia drivers since installing it. shortly after the rendering failing, I was able to close the tab/regain control of the browser, however suspended tabs would not loose the great suspender icon, among other issues what were not tgs involved.

This may be an avenue to look down, websites that chrome doesn't like seems to affect everything in some way.

quantuumsnot commented 6 years ago

@alidan Are you opened the large image in separate tab/process?

Pascal666 commented 6 years ago

I get the impression that a lot of memory used by Chrome is not actually accounted for by Chrome. Perhaps it is in resources like handles, GDI and user objects, etc.

Windows Task Manager's Performance tab lists total commit. This is basically allocated physical ram plus alloced swapfile.

The Great Suspender v6.30 Chrome Version 62.0.3202.94 (Official Build) (64-bit) Windows 7 sp1 60 windows, 141 tabs, all suspended

Chrome Task Manager: Browser 594M TGS 300M GPU Process 235M other extensions 900M

Windows Task Manager total commit: After suspending all tabs 7GB After closing Chrome 2GB After reboot 2GB After loading Chrome 3GB After resuspend 5GB

Chrome Task Manager: Browser 373M TGS 317M GPU Process 155M other extensions 650M

So while Chrome Task Manager only showed 2GB used, closing Chrome actually freed up 5GB, so there was 3GB unaccounted for. After resuspend, Chrome Task Manager shows 1.5GB used, while 3GB is actually used, so 1.5GB unaccounted for. Restarting saved me 2GB, 1.5GB of it unaccounted for.

alidan commented 6 years ago

@quantuumsnot this got buried in my email, at the time, I had a very large session open that basically crashed, after that I went on to opening very small amounts of tabs, 7-11 tabs at a time and found out it was massive images that were killing chrome at the time.

large images are still painful in chrome but they are no longer as bad as they use to be.

CollinChaffin commented 6 years ago

I too am seeing this and on my multiple systems the recent massive increase of Chrome RAM due to TGS in issue #646 I outline what I see causing it.

Pascal666 commented 6 years ago

The Great Suspender v6.30 Chrome Version 63.0.3239.108 (Official Build) (64-bit) Windows 7 sp1 164 windows, 522 tabs, all suspended

Chrome Task Manager: TGS 625M Browser 516M GPU Process 27M other extensions 140M

Windows Task Manager total commit: After suspending all tabs 10GB After closing Chrome 3GB After reboot 2GB After loading Chrome 3GB After resuspend 8GB

Chrome Task Manager: TGS 878M Browser 853M GPU Process 212M other extensions 800M

So while Chrome Task Manager only showed 1.25GB used, closing Chrome actually freed up 7GB, so there was nearly 6GB unaccounted for. After resuspend, Chrome Task Manager shows 2.75GB used, while 6GB is actually used, so over 3GB unaccounted for. Restarting actually saved me 1GB, even though Chrome Task Manager says Chrome is now using 1.5GB more.

Pascal666 commented 6 years ago

I get the impression that the excessive memory usage issue does not exist on Linux, and may be Windows specific. I've never noticed excessive memory usage under Linux, as borne out by the below numbers from my most recent reboot.

The Great Suspender v6.30 Chrome Version 56.0.2924.87 (64-bit) CentOS Linux release 7.4.1708 Linux version 3.10.0-229.20.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Tue Nov 3 19:10:07 UTC 2015 20 windows, 373 tabs, almost all suspended

I finally figured out that if you go to chrome://system/ and click on mem_usage Expand you will see the same stats as in task manager, but as text so they can be easily copied (though I removed some of the useless data from the below)

Browser 640 MB private, 84 MB shared Extension [The Great Suspender] 494 MB private, 34 MB shared Extension [uBlock Origin] 95 MB private, 21 MB shared GPU [] 42 MB private, 13 MB shared Extension [Quick Tabs] 38 MB private, 23 MB shared Tab 12 MB private, 13 MB shared Zygote 7 MB private, 0 MB shared

After closing Chrome, free shows about 1GB less used RAM, consistent with the above.

A couple versions changed during reboot: Chrome Version 64.0.3282.140 (Official Build) (64-bit) Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Aug 22 21:09:27 UTC 2017

After resuspend, free shows about 1GB more used RAM, consistent with the below.

Extension [The Great Suspender] 549 MB private, 85 MB shared, -1 FDs open of 1024 Browser 337 MB private, 100 MB shared, 324 FDs open of 4096 Tab [New Tab] 67 MB private, 32 MB shared, -1 FDs open of 1024 Extension [uBlock Origin] 66 MB private, 25 MB shared, -1 FDs open of 1024 GPU [] 23 MB private, 22 MB shared, 45 FDs open of 4096 Extension [Quick Tabs] 21 MB private, 20 MB shared, -1 FDs open of 1024 Extension [Flashcontrol] 20 MB private, 18 MB shared, -1 FDs open of 1024 Zygote 9 MB private, 0 MB shared, -1 FDs open of 1024

Pascal666 commented 6 years ago

The Great Suspender v6.30 Chrome Version 64.0.3282.186 (Official Build) (64-bit) Windows 7 sp1 95 windows, 396 tabs, most suspended

mem_usage from chrome://system/ Browser 744 MB private, 20 MB shared Extension [The Great Suspender] 662 MB private, 21 MB shared Tab [Hack - Make Your Digital Picture Frame Go Live] 291 MB private, 34 MB shared GPU [] 161 MB private, 31 MB shared Extension [HTTPS Everywhere] 120 MB private, 11 MB shared Tab [Extension uses excessive memory / RAM · Issue #613 · deanoemcke/thegreatsuspender] 95 MB private, 34 MB shared Extension [uBlock Origin] 67 MB private, 9 MB shared Extension [Tampermonkey] 49 MB private, 9 MB shared Tab [New Tab] 45 MB private, 31 MB shared Extension [RECAP] 40 MB private, 6 MB shared Extension [Grammarly for Chrome] 36 MB private, 10 MB shared Extension [Fakespot - Analyze Fake Amazon Reviews] 26 MB private, 7 MB shared Extension [Session Buddy] 23 MB private, 24 MB shared Extension [RSS Feed Reader] 21 MB private, 10 MB shared Extension [FlashBlock] 15 MB private, 6 MB shared Extension [Quick Tabs] 14 MB private, 4 MB shared Tab [Chrome Web Store - level db] 14 MB private, 5 MB shared Extension [Don't Fuck With Paste] 14 MB private, 18 MB shared Extension [Reload All Tabs] 14 MB private, 17 MB shared Tab [Custom Query – VLC] 8 MB private, 3 MB shared Extension [Awesome Cookie Manager] 5 MB private, 2 MB shared Extension [Smile Always] 4 MB private, 2 MB shared Extension [Call From Browser] 4 MB private, 2 MB shared Extension [Context Menu Search] 4 MB private, 2 MB shared Extension [Disable Extensions Temporarily] 4 MB private, 2 MB shared Utility [Patch Service] 1 MB private, 1 MB shared

Windows Task Manager total commit: After suspending most tabs 12GB After closing Chrome 4GB After reboot 2GB After loading Chrome 3GB After resuspend 6GB

Chrome upgraded to Version 65.0.3325.181 (Official Build) (64-bit)

mem_usage from chrome://system/ Browser 541 MB private, 24 MB shared Extension [The Great Suspender] 525 MB private, 32 MB shared GPU [] 159 MB private, 18 MB shared Extension [HTTPS Everywhere] 110 MB private, 23 MB shared Extension [uBlock Origin] 46 MB private, 24 MB shared Extension [Fakespot - Analyze Fake Amazon Reviews] 44 MB private, 22 MB shared Extension [Grammarly for Chrome] 29 MB private, 24 MB shared Extension [Tampermonkey] 27 MB private, 24 MB shared Extension [Session Buddy] 25 MB private, 25 MB shared Tab (Chrome) [Settings] 24 MB private, 28 MB shared Extension [Quick Tabs] 23 MB private, 27 MB shared Extension [RSS Feed Reader] 23 MB private, 24 MB shared Tab [Chrome Web Store] 20 MB private, 21 MB shared Extension [RECAP] 19 MB private, 22 MB shared Extension [Awesome Cookie Manager] 16 MB private, 22 MB shared Extension [Don't Fuck With Paste] 15 MB private, 20 MB shared Extension [Call From Browser] 14 MB private, 23 MB shared Extension [Context Menu Search] 14 MB private, 19 MB shared Extension [Reload All Tabs] 14 MB private, 18 MB shared Extension [Smile Always] 13 MB private, 18 MB shared Extension [FlashBlock] 13 MB private, 19 MB shared Extension [Disable Extensions Temporarily] 12 MB private, 18 MB shared Tab (Chrome) [Untitled] 9 MB private, 14 MB shared Pepper Plugin Broker [Shockwave Flash] 4 MB private, 6 MB shared

So while Chrome Task Manager showed about 2.5GB used, closing Chrome actually freed up 8GB, so there was over 5GB unaccounted for. After resuspend, Chrome Task Manager shows about 1.75GB used, while 4GB is actually used, so over 2GB unaccounted for. Restarting actually saved me 4GB, even though Chrome Task Manager says Chrome is now using about .75GB less.

@deanoemcke Is any of this data helpful?

robgott commented 6 years ago

Windows 10 1703 Chrome 64.0.3282.140 Memory Footprint 830,828K CPU 1.6 Suspended Tabs ~500

deanoemcke commented 6 years ago

@Pascal666 i probably dont need too much information. This thread is more of a placeholder to get a general idea of how bad the issue is and the different ways it is affecting people. Something like @robgott's response is probably all that's required. Thanks for your input though!

manishmaharjan commented 4 years ago

This seems to be still problematic till the date as suspended tab still seems to take a hold of memory. Similar to issue #441

Ubuntu 20.04 Brave browser Version 1.9.80 Chromium: 81.0.4044.138 (Official Build) (64-bit) Memory usage 11.92GB suspended tabs ~ 500

alidan commented 4 years ago

I think my last suspended tab count was over 2000, and I didnt see 'excessive' ram use anymore, it is still 1-2gb but it's FAR better than the 2.1gb for 300 tabs when I made my initial thread for ram use,

I think it could still be better, but chrome keeps lumping TGS with other extensions so it's hard to tell where it really falls anymore.

manishmaharjan commented 4 years ago

I am having a doubt that "Apply Chrome's built-in memory-saving when suspending" feature from TGS might not be working properly and might be having some sort of memory leaks because when i tested with "Auto Tab Discard" plugin it seems to be working fine.

alidan commented 4 years ago

When I use built in memory saving, I get several hundred processes of chrome even with small/relatively small chrome sessions. I think it also uses a significant amount of ram, because I wouldnt turn it off if it was just excessive processes.

imtrobin commented 3 years ago

I'm using on edge, 390 tabs, but the memory edge is using is around 4GB, so the plugin is not working?