Settings

Theme

The Great Suspender: Free up memory by suspending inactive Chrome tabs

chrome.google.com

86 points by p3drosola 10 years ago · 93 comments

Reader

hga 10 years ago

What I do, when Chrome, or rather, my abuse of it (14 windows, 735 tabs at the moment, Ubuntu 14.04 64 bit on a 32 GiB system) becomes onerous is to go to the task manager and kill groups of tabs taking up "too much" memory, and very occasionally, too much CPU.

(I get away with that abuse, which it a bit higher right now because I'm in the process of buying a house, by killing all tabs after launching, and only enabling the ones I want, one by one, using the essential to me Session Buddy.)

  • insulanian 10 years ago

    I'm genuinely interested in the reasons people maintain so many tabs open. What type of workflow you have when you end up with so much stuff open?

    How do you get back to some of those tabs? Wouldn't it be easier to just google it again when you need it instead of having it lingering around and wasting your HW resources?

    • scholia 10 years ago

      They accumulate. Every day there are two or three pages you intend to read later, so you leave them open. A month later, you have an extra 100 tabs loaded. After six months, you have 600. There are also clusters of tabs associated with some research you were doing but didn't quite finish.

      Then the problem is it would take a couple of days to go through all the waiting tabs and shut them down, and you don't have a couple of days to spare.

      Eventually you just save them all out as a session and start again, and hope you will learn from your mistakes ;-)

      I've switched from FF/Chrome to FF/Vivaldi because it has much better ways to handle tabs and bookmarks than Chrome does. Vivaldi does tab stacking, for example.

      • c22 10 years ago

        I'm having the problem right now of hundreds of tabs open on my phone, I context-switch out of the browser when I'm done and end up leaving dormant tabs all over the place. Unfortunately whenever I try to scroll through them to close the non-relevant ones Chrome crashes, usually restoring several of the tabs I'd successfully closed.

        • scholia 10 years ago

          There are extensions like Session Manager that list all the tabs after a crash, so you can uncheck the ones you don't want to reload. I don't know if there is one for Chrome on mobile, but it might be worth a look....

          • hga 10 years ago

            Session Buddy for non-mobile Chrome works very well and allows you to do roughly the same thing. I.e. take an saved session, maybe after copying (I think you can do that), and delete the tabs you're not interested in (it does have one level undo), and then only start the remainder, perhaps window by window (on the desktop, at least).

            • c22 10 years ago

              I love session buddy on the desktop, though with javascript off on most pages and 32gb of system memory I have yet to crash chrome from tabs there.

      • nightcracker 10 years ago

        Maybe a 'read later' extension could help you? Something longer-term than a tab, but shorter-term than a bookmark.

        • burfog 10 years ago

          That would imply taking a positive action to do something about the tab. I want to just ignore the tab until I need it again. I don't want to treat the tab specially.

          My real desk is messy. I mostly know where stuff is buried because I put it there and nobody messes with my desk. I clean it about once a year, usually when a big project is fully done forever. I want the same functionality from my browser.

        • scholia 10 years ago

          Yes. What I do now is save the page as an mhtml file so I can read it later without having to find it again. (Chrome should really offer better mhtml support.)

        • burfog 10 years ago

          not going to touch an extension

          Extensions tend to break with browser updates. Extensions tend to cause slowness. Nobody wants your bug report if you are running an extension.

      • aexaey 10 years ago

        They sure do accumulate, to the point where by the time you go back to some old tab, and that tab just so happen to be replaced with a window.opener trick, [1] there is no chance of you remembering what was there in the first place, and spotting the fake.

        [1] https://news.ycombinator.com/item?id=11631292

    • hga 10 years ago

      Heh.

      First, echoing some other comments, this is a test of these web browsers. My Pale Moon instance (a Firefox fork), which I use much less "actively" and with NoScript running on it, has 42 windows with 2119 tabs, but Firefox is smart about only loading tabs on demand. On the other hand, I have to restart Palemoon regularly, to prevent it from getting unhappy I do so on every even numbered day. I also run a Firefox instance with 12 windows and 62 tabs.

      The workflow is roughly:

      Windows cover one or a related set of subjects. I know by position which are were, and hit specific tabs at regular schedules. Any site I hit multiple times a day has its window on that tab.

      Additional tabs are of course things to get back to. Maybe to digest at a later time, maybe only if an issue is still relevant. I do regularly archive whole windows or most of them using Session Buddy or Session Manager for Firefox/Palemoon.

      For me, this sort of spacial navigation works a lot better than any bookmark system or the like that i've seen. I have very very good 3D spacial ability (organic chemistry was easy), so I'm sure that's a major factor in why this is right for me and wouldn't be right for many others.

      And at this very moment those hardware resources are for the wasting, at some point after I buy my house, move into it, and my life is 1/10 as crazy as it is now I hope to e.g. be running serious and hungry proof assistants and other stuff, circumstances right now have me using it for little more than a media machine, with the web most certainly being a media. Heck, at this moment, I have one almost as capable machine with 16 GiB only hosting a LTO-4 tape drive.

      ADDED: this is on a stationary workstation, so all the problems that might crop up with limited mobile connectivity or screens less than 1080p with a 24 inch diagonal. NEC still makes some fine monitors with very long warranties.

      • mistermann 10 years ago

        > Firefox is smart about only loading tabs on demand.

        This is the second time I've read this today....for me, when FF restarts, the tabs appear to be empty (they are blank, and reload when activated), but all of the memory is consumed almost as if it is somehow pre-allocated even though the page hasn't loaded. Do you not see this behavior?

        • hga 10 years ago

          Errr, I'm sorry, I have such a big memory budget on my machines that I haven't paid that close attention, I care a lot more about it hitting much my more constrained DSL Internet connection.

    • SeanDav 10 years ago

      I am also a tabaholic, often running 5+ windows, some with many dozens of tabs and some with just a handful. I use them for easy context switching. If I am in programming mode I switch to the relevant window, sometimes a separate window for each language I am programming in at the moment, for games and leisure, a different window, for news and related, yet another, for general internet use, yet another.

      I tend to use Firefox, with its default behaviour of only loading tabs that are active (a huge memory saver) and easy use of NoScript. I also use Great Suspender for Chrome to try control its excessive memory use - works well.

      BTW. If you have a lot of HN tabs open and you try to reload a session after a restart, you get IP blocked for a short time - another good reason to use Firefox if you like keeping a few HN news tabs open, as it only loads 1 tab and keeps background tabs suspended.

      I have tried active session managers but after several problems with corruption of sessions I reverted back to multiple windows and tabs.

      • hga 10 years ago

        BTW. If you have a lot of HN tabs open and you try to reload a session after a restart, you get IP blocked for a short time - another good reason to use Firefox if you like keeping a few HN news tabs open, as it only loads 1 tab and keeps background tabs suspended.

        Indeed; frequently I'll just disconnect my computer from the net for the startup period; crude, but it avoids this problem for sites like HN or others with with throttling.

        Not that it happens very often to begin with, Chrome is quite stable, mostly I spaz with the keyboard and hit Ctl-Shift-Q when I meant Ctl-Q, something Chrome doesn't allow you to turn off.

    • burfog 10 years ago

      Getting back to them is easy. You can do this with 10 virtual desktops, each with 10 windows, and each window with 10 tabs. That allows for 1000 tabs. It's a tree structure, organized by project or other purpose.

      Desktops likely map to projects. Windows likely map to web sites. Tabs likely map to web pages within the same site.

      A slight variation is that each window represents a Google search, with the first tab being that search. The results get opened in tabs. I often do this, then switch to the other variation by pulling loose a tab that is for a web site with many interesting pages.

      The firefox restart dialog, offering to kill individual tabs and/or whole windows as desired, is great. I wish Chromium had it. I wish it were available at all times. I wish it were offered when the browser complains about an unresponsive tab. Chromium's offer to kill a rendering process is pretty useless, since the offer includes one guilty tab and numerous innocent precious tabs.

    • plantain 10 years ago

      It's pretty simple really.

      I have a branching factor > 1.0 which means for every tab I open, upon reading that tab, I find at least one more interesting link, and up another tab comes.

      It would converge to infinity if my computer didn't crash in a manner causing chrome to be unable to reload, or I didn't periodically hit chrome bugs in the O(1000)'s tab range.

      • hga 10 years ago

        That is most certainly a part of it as well. Hypertext is a very real thing, even if it's current implementation is not Xanadu fancy.

    • austinjp 10 years ago

      Several projects underway at once, each in its own virtual desktop. Each desktop might have two or three browser windows open, each with several tabs.

      As I tire of one project I switch desktop to another that's more aligned to my frame of mind.

      I don't tend to kill old browser windows because they serve as a refresher to remind me where I'd got to with a certain problem, or a particular research issue. Only when I've reached some sort of resolution do I kill tabs or even whole browser windows.

      Those tabs sure mount up.

      Occasionally I try a different workflow but I gravitate to this habit. It seems to work for me.

    • werber 10 years ago

      For me, I open a new window for each task I have to do in the morning, and the tabs associated with each one, then the inevitable stack overflow and msn pages pile up as I finish them

    • pc2g4d 10 years ago

      For me it's like a short-term bookmarking system with a more convenient UX.

  • anexprogrammer 10 years ago

    Ah, good, it's not just me!

    One anecdote - 5 years ago FF was the clear winner for coping with tab abuse. Stable and coped with hundreds of tabs happily, Chrome started crashing pages beyond 50 or so.

    Now it's the perfect reverse, FF hates a lot of tabs open and Chrome is stable with apparently limitless numbers.

    • keeperofdakeys 10 years ago

      Personally I have both working fine with hundreds of tabs, but chrome uses 5-10 times the ram.

      • anexprogrammer 10 years ago

        Hmm. Maybe it's a FF add-on causing the problems for me, though I'm not using anything uncommon. An internal ps like chrome has might help pinning that down.

        Chrome is definitely the RAM greedy one (and so many processes!), and always has been.

        • keeperofdakeys 10 years ago

          Firefox has "about:memory", which can give you some rather detailed information about memory usage.

          • swatthatfly 10 years ago

            Chrome has chrome://memory-redirect/

            • keeperofdakeys 10 years ago

              Strangely I can't find it in the latest dev release of chrome or chromium, it's still in stable. At least on linux, it also shows firefox's total memory usage, maybe they are doing lots of comparisons.

    • basch 10 years ago

      firefox was stable but the chrome/ux hung if a tab hung. googlechrome was always responsive if a tab went berzerk.

    • ngrilly 10 years ago

      Anybody knows what changed in Firefox?

      • scholia 10 years ago

        Maybe the pages got bigger? On my Windows 7 PC, FF still handles a lot more tabs than Chrome, typically 2x or 3x as many.

        Where Firefox falls over is with really heavy pages, such as infinite-scrolling image/gif sites. It's much better than it used to be, but it's still vulnerable.

        With Chrome, pages fail to load (giving a blank page) and the Flash plug-in crashes. The browser does stay up, but the effect is the same: you have to restart it.

  • joantune 10 years ago

    An extension called 'OneTab' might be of interest to you.

    You can put hundreds of those tabs into just one that becomes a list, and then save it with the name 'house prosepcts'

    • ja27 10 years ago

      I used a combination of OneTab, The Great Suspender, and Evernote. I let The Great Suspender keep my memory footprint down but every week or so I scan through my tabs and throw as many as I can into Evernote with tags. Anything left over I can generate a OneTab page and Evernote that whole page of links at once.

    • hga 10 years ago

      I tried that one, and it is indeed good, but see my other reply about how spacial organization works best for me. One Tab just didn't hit the sweet spot my normal system achieves, again, for me.

  • scholia 10 years ago

    I'm amazed you can load that many tabs in Chrome. I got to 608 in Firefox (in 4GB) but that's with most of them suspended. And Firefox makes it much easier to find the tabs you want.....

    Incidentally, recent builds of the Chromium-based Vivaldi browser had this suspend feature before Chrome did. As did some Chrome extensions, of course.

  • oneweekwonder 10 years ago

    I would recommend you try Tab Outliner[0]. It has a bit of a learning curve and adjust your workflow.

    [0]: https://chrome.google.com/webstore/detail/tabs-outliner/eggk...

  • hepta 10 years ago

    My god, I feel much better with my puny abuse.

  • JustSomeNobody 10 years ago

    I create a folder called ReadMe. In it I dump everything I want to read later. Every month I clean it; if I haven't read it by then, it wasn't that important.

  • kn9 10 years ago

    Guilty too

Sarkie 10 years ago

https://developers.google.com/web/updates/2015/09/tab-discar...

aavotins 10 years ago

It's just incredible. Webpages are now filled with such bloat, that there are third party tools popping up to help users combat other third party developer solutions eating up resources on their systems.

maxschumacher91 10 years ago

A tool that has served me well in freeing up memory (both in RAM and in my head) is one-tab:

https://www.one-tab.com/

Afaik, current versions of Chrome already implement the functionality of the great suspender natively.

forgotpwtomain 10 years ago

Every single new chrome release memory consumption just gets worse. Most recently a single window with 1 gmail tab takes ~500mb (If I recall correctly you could actually run windows XP on 256).

I'm seriously considering rolling my browsers back to ~2012 and never upgrading again.

  • aug-riedinger 10 years ago

    Unused RAM is wasted RAM.

    Gmail has an internal behavior that adapts its memory usage on available memory. It may fail in some specific situation (short and wide memory leak), but as a whole the idea is to use RAM as much as possible to make gmail faster.

    And yes, gmail lacks of a "low memory consumption" button for those situation where automatic memory usage detection fails.

    There is video of google explaining this voluntary behavior but I can't find it unfortunately.

    • forgotpwtomain 10 years ago

      > Unused RAM is wasted RAM.

      This is just ignorant cliche.

      > Gmail has an internal behavior that adapts its memory usage on available memory. It may fail in some specific situation (short and wide memory leak), but as a whole the idea is to use RAM as much as possible to make gmail faster.

      This has nothing to do with Gmail, this is entirely to do with chromium. When my X-Server starts to freeze because 8 tabs taking up 2GB of memory means the OS is intensely swapping to and from disk; I'll take my unused RAM, thanks.

  • 8ig8 10 years ago

    What about rolling your Gmail back to 2012 with the lighter HTML version...

    https://support.google.com/mail/answer/15049?hl=en

    I rolled back about a month ago to free up some resources since I have it open all day. So far, so good.

    As a bonus, you have to manually check for new mail, which I actually like.

  • klue07 10 years ago

    Except you'd have extremely vulnerable browsers.

stan_rogers 10 years ago

Turned that off almost immediately. Sounds good in theory, but if a suspended page has a heartbeat of any sort, it has to reload when you return to it. If that page is an infinite scroller, or if you've hit the "load more" button a couple of times, well, so much for starting up again where you left off.

  • nfriedly 10 years ago

    Mobile browsers already suspended most background stuff, and it occasionally does cause issues like that, but usually it just works.

    I learned this out a few years ago when trying to figure out why my metrics sometimes reported mobile visitors with load times of hours or even days... Turns out that they opened the site and then switched tabs/apps before it finished loading. Everything except that metric worked fine. I added a heartbeat just to detect that, and it worked without introducing any extra reloads.

    • takno 10 years ago

      This always drives me mad. It's particularly bad if I'm trying to read content sites on a train or somewhere with patchy reception - open half a dozen tabs to give me something to read while I'm disconnected, and then switch to them only to see the content disappear before my eyes. I'd nominate it as literally the worst thing about mobile browsing

  • mynewtb 10 years ago

    Only if the infinite scroll is of the sort that should not exist. User friendly solutions update the url.

  • kranner 10 years ago

    You can whitelist certain pages permanently which is what I do for the Twitter homepage. You can also keep them active for the current session only.

    • welanes 10 years ago

      I thought that would do it but when you understand how you (I, at least) browse the web this feature became annoying, fast.

      Working on Nitrous IDE, take a break to read an article (on a page never before visited so not whitelisted). Check the Disqus comments, the article mentions a book on Amazon, check that out....oh no, my IDE page has just gone to sleep, now I have to reconfigure it again. Ah the article page went to sleep too, now I need to find where I am in the comments.

      Throw in the time for the pages to reload as well, and you can see how this could get frustrating.

blazespin 10 years ago

Just curious - how are you sure that the addon doesn't have some backchannel that it's using to send your website info to? Like, let's say you go on a banking website?

leni536 10 years ago

Idea: What if there was an OS interface to mark memory regions as "throwaway"? Throwaway in the sense that it's less costly to recalculate than to recall it from swap. So the OS would throw such memory regions instead of swapping out and signal the process about it to recalculate it if needed.

I don't usually bump into heavy swap usage except when I wake my laptop from hibernate. I tend to close browsers before hibernating because it's faster to just resume the last session from a cold start then load from swap.

  • keeperofdakeys 10 years ago

    There has been some thoughts about implementing this for linux, but I don't think it got very far. The idea is that you mark a range of memory as "volatile", and the OS will free that when it's running low on memory. In most cases where you're running out of memory though, swapping out pages or killing a program using the memory is probably the right thing to do though.

    https://lwn.net/Articles/522135/

  • Kristine1975 10 years ago

    Both OS X and iOS have the NSPurgeableData class which implements something like this: https://developer.apple.com/library/mac/documentation/Perfor...

    Edit: Chromium has this: https://chromium.googlesource.com/chromium/src/base/+/master...

    • leni536 10 years ago

      "Discardable memory" doesn't seem to be implemented though, however there is an implementation for "discardable shared memory" [1] which seems to offer this volatile behavior. It uses ashmem_pin_region() and ashmem_unpin_region() for Android, which seems to be the equivalent for iOS's NSPurgeableData. I wonder if it does anything useful for any other OS.

      [1] https://chromium.googlesource.com/chromium/src/base/+/master...

  • willvarfar 10 years ago

    Your OS already has a 'file buffer cache' that keeps pages of read files in RAM and discards them only if the RAM is needed for something else.

    I made a neat little application-accessible key-value cache that used these pages. It means you can write keys that end up in your OS's file buffer cache, and if the OS doesn't need that RAM for anything else, you can read them back later.

    http://williamedwardscoder.tumblr.com/post/13363076806/buffc...

    Sadly not a mainstream thing :( ;)

  • amelius 10 years ago

    > Throwaway in the sense that it's less costly to recalculate than to recall it from swap.

    Network is slower than disk (is slower than memory). So if "recalculate" means getting it from the internet, then probably getting it from disk is faster in most cases.

    • daurnimator 10 years ago

      local network is faster than disk.

      The internet is rarely faster than disk unless you're in a major data centre.

      And then... this is assuming you're referring to spinning rust. local disks in the form of SSDs will be faster again.

    • leni536 10 years ago

      I expect that it's easy to rerender webpages but it's wasteful to swap the bitmaps and load them from disk again. I wouldn't expect the browser to throw away data retrieved via network.

antonycourtney 10 years ago

Another useful tab manager extension for Chrome is Tabli (http://www.gettabli.com), which I created and submitted as a "Show HN" last October (https://news.ycombinator.com/item?id=10464603). Helps you quickly find tabs you already have open and lets you save and restore windows (collections of tabs) with meaningful names to keep things organized. 100% Free Software (sources on github), respects privacy, and has keyboard shortcuts for efficiency.

  • tmikaeld 10 years ago

    I tried using that, but i keep getting this issue on OS X: https://i.imgur.com/PeZluRL.png

    This is not specific to Tabli though, it's every time there is an extension popup with content.

    Maybe it's something that can be fixed? Also, the open animation is painfully slow.

    • antonycourtney 10 years ago

      Thanks for the bug report. I have seen that happen intermittently but have never managed to find a reliable repro. There's a long-standing open issue on github for it: https://github.com/antonycourtney/tabli/issues/45

      I have new release of Tabli pending that will address a number of performance issues, so may resolve this for you. If you DM me I can let you know when it's available.

illuminea 10 years ago

I prefer to "snooze" tabs using the Tab Snooze Chrome Extension. That way they reappear when I can hopefully give them attention. I can tell the extension to put tabs to sleep until this evening, tomorrow, this weekend, next week (my fave), next month, someday (I haven't tried that one, too scary), or a specific date. https://chrome.google.com/webstore/detail/tab-snooze/pdiebia...

andmarios 10 years ago

Google should acquihire the team and embed it in Chrome.

I use tabs as a task list (around 30-50 at a time) and without this tool I wouldn't be on my laptop, I would need a desktop with at least 64GB of RAM...

  • basch 10 years ago

    it's already built into chrome, my canary has been doing it for a while, pretty sure beta and dev do it now too.

mdeeks 10 years ago

The best use of this is for saving battery life. Chrome will absolutely destroy your battery. You can configure it to auto-suspend tabs after X minutes of inactivity only when you are on battery. (Alternatively you can switch to Safari to save battery life.)

Like others have said, The Great Suspender will often break web pages and force them to completely reload. This ruins infinite scroller pages too. So thats the trade off.

jaksmit 10 years ago

The Great Suspender has been around for a long time; I posted it to Product Hunt ~2 years ago: https://www.producthunt.com/tech/the-great-suspender

it's pretty good. I don't really use the auto mode much, but I use it to manually kill tabs (can be faster than killing via the task manager)

squas 10 years ago

The Great Suspender allows me to keep many tabs (currently 214) open without CPU meltdown.

https://chrome.google.com/webstore/detail/the-great-suspende...

amelius 10 years ago

What happens when a tab is doing background work, such as uploading a file, or performing a calculation, or just keeping track of timer events? (Will those timer events appear to happen all at once when the task is resumed?)

  • gcatalfamo 10 years ago

    No, there might be some service disruption with ongoing task. However, you wouldn't use it on a working tab like that, but on those residing for "I might need this later" and hogging memory.

audi100quattro 10 years ago

Maybe Google could come up with a zero-cost tab and have users pick it (more than 10 tabs?) when they don't care about latency and pre-loading of webpages so much.

klue07 10 years ago

Any good alternatives recommended for Firefox?

  • skrowl 10 years ago

    https://addons.mozilla.org/en-US/firefox/addon/bartab-plus/ does the same thing (actually a little better in the implementation) on Firefox. Once you install, go into config for it and set how long a tab may be idle before it auto-unloads. Unloaded tabs are shown slightly dimmed in the tab bar. You can also right click tabs (such as gmail / youtube / etc) and force them to always stay loaded, so your email / music streaming / etc aren't impacted.

    Combo it with https://addons.mozilla.org/en-US/firefox/addon/tab-groups-pa... that lets you organize your tabs into groups and you can have hundreds of well organized tabs without using much memory at all.

    • kasabali 10 years ago

      > Combo it with https://addons.mozilla.org/en-US/firefox/addon/tab-groups-pa.... that lets you organize your tabs into groups and you can have hundreds of well organized tabs without using much memory at all.

      Be careful with that because every tab has a constant memory consumption even when not loaded, so it will actually have a noticeable memory consumption when you have several hundreds of tabs. I learned it the hard way.

  • kasabali 10 years ago

    No need. Make sure "Don't load tabs until selected" option is enabled and then restart the browser once in a while.

dharma1 10 years ago

great chrome addon, been using it for a year or two.

I've got around 40-50 tabs open usually, and "spring clean" all but the active one a couple of times a day (right click a tab, close other tabs). Chrome used to be a complete memory hog until this addon.

fullofstack 10 years ago

Closing your tabs and using the browser's history achieves the same thing.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection