Live data from Hacker News

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

chrome.google.com

11–20 of 94 posts

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

#11
post #8

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 hiber…

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...

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

#12
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.)

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

#13
post #8

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 hiber…

> 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.

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

#14
post #10

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.

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.

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.

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

#15
post #13
post #8

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 hiber…

> 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.

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.

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

#16
post #9
post #6

Earlier quoted context omitted.

Also, https://docs.google.com/document/d/1thLjq-PYoKWaM_ODDZjojr9V...

AFAIK this is part of the TRIM project in Blink, They have some memory related goals listed here: https://docs.google.com/spreadsheets/d/17wW-YosF8tlEwn45eZ4d...

Brilliant, thanks for these links!

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

#17
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)

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

#18
post #12

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 enabl…

Guilty too

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

#19
post #8

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 hiber…

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 :( ;)

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

#20
post #12

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 enabl…

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.

Post reply on HN