Live data from Hacker News

Chrome will aggressively throttle background tabs

blog.strml.net

41–50 of 403 posts

Re: Chrome will aggressively throttle background tabs

#41
post #7

Pretty annoying if you want a game to continue running in the background :/

I've seen several waiting games already that choke on Chrome, and have settings to activate a worker that keeps them unthrottled. Looks like this will break all of those solutions.

Re: Chrome will aggressively throttle background tabs

#42

It's awesome to see Chrome trying to improve performance for people with many tabs open, which is many of us. I use a LOT of tabs, and the best plugin has been The Great Suspender. Highly recommend it for anyone who wants memory & CPU back and keeps many tabs/windows open at once: https://chrome.google.com/webstore/detail/the-great-suspende...

Fantastic tip, thx!

Re: Chrome will aggressively throttle background tabs

#43

Why not have a "this page would like to perform work in the background [allow|block]" notification?

Without special APIs to request it, this would be as ubiquitous as cookie warnings, making it highly annoying (and thus a bad business decision for chrome). And at least for the case presented in the article proper APIs without this throttling already exist.

Re: Chrome will aggressively throttle background tabs

#45
post #5

Can we aggressively throttle memory usage? Why does it require 300-500MB of ram PER TAB?

Does Chrome only use RAM if it thinks it is available? (i.e. if it starts detecting that other process are running and eating up RAM, will it use less?)

Not in my experience.

With 4 GB ram, Chrome will happily give ~2GB to any tab that requests it in a couple of seconds, leaving me with an unresponsive Windows aggressively paging memory to disk, only to give whatever it finds... back to chrome

Re: Chrome will aggressively throttle background tabs

#46
post #3

Oh god, please change the title. It's about timers, not bandwidth. I was already imagining streaming music from Spotify and having hiccups all day.

Tabs playing sound are exempt from the limiting

https://groups.google.com/a/chromium.org/d/msg/blink-dev/XRq...

Re: Chrome will aggressively throttle background tabs

#47

Why not have a "this page would like to perform work in the background [allow|block]" notification?

I'd guess it's because most users would have no idea what to choose, would have no idea what the affect of each choice would be, and if you add more text to explain it, most users will not read it. Pop up the notification too often and it becomes a nuisance.

Better IMO to bury the choice deep in settings or something, for power users, if you even offer the choice at all.

Re: Chrome will aggressively throttle background tabs

#48
post #20

I like the change as a general idea but there obviously needs to be a manual override. Like, I don't want websites to access my camera without permission but obviously I want to allow some websites to do that. A similar permission could be used here and is perfectly backwards compatible: 1. a tab exceeds its quota and throttling kicks in; 2. you visit the tab to check why it stopped working; 3. you get a permission p…

Or just ask for the permission when you first open the page, the same way uber asks for your location.

www.foobar.com wants to:

"Run in the background unthrottled"

Re: Chrome will aggressively throttle background tabs

#49
post #24

Earlier quoted context omitted.

Measuring memory usage is hard on a modern OS. Not in the slightest. OS's have to allocate virtual memory to each process or that process with SIG-FAULT when it touches invalid memory. Tracking per-process memory usage is one of the most trivial things OS/Pref tools do.

Measuring it is easy. Defining it is what's hard. If three processes each have the same 10MB executable mapped into memory, plus 10MB of heap data, how much memory is each process using? There's no easy answer to that question.

    Defining it is what's hard.
    how much memory is each process using?
20MB.

    Oh but they are sharing the pages the executable is mapped into.
    So how can you can you say they are each using that much RAM?
Because that 10MB of RAM won't be freed until the last process exits. Each process is using 20MB of physical pages. If only 1 was running it would use 20MB.

The semantics that each process is sharing 5 HUGEPAGES of heap isn't really important as even if 1 was running alone it uses that much memory.

If you are sharing that much data with executables that you have this problem there is some low hanging fruit for memory optimizations you can do.

     Oh but you aren't *actually* using 60MB of Heap, only 40MB
Indeed. And in cases where these 3 children have the same parent you look at the ParentMem + 40MB (child binary+individual heaps) to report a better picture.

Shared/unshared semantics are not hard. Have you ever read /proc/$PID/maps ? Because it clearly labels what is/isn't shared physically. When you are optimizing for memory usage you rarely look at shared readonly pages as the kernel put them there for you.

   Defining it is what's hard. 
Injecting an interpretation before taking a measurement is not sound science or engineering.

Measurements inform Interpretation. Not vice versa.

Re: Chrome will aggressively throttle background tabs

#50
How about displaying more info about the "weight" of a page, when it comes to downloaded assets, cookies / local storage, RAM and CPU usage? I know there are ass backwards and fugly ways to see all of that, but why can't I see a list of all open tabs, with columns of such info which I get to define and sort as I please? Why not have the option to that info pop up when hovering over a tab, and to show notification icons for certain thresholds, user definable with sensible defaults? There's a lot of things browsers should be doing. So what if 100 people don't care; the one person that does become more aware of what is going on more than makes up for it. *

And just let us allow tabs to grab all the resources they want on a opt-in basis. Why not?

* Before anyone brings up the inevitable economic argument - it wouldn't take a lot of man hours to do these things, I dare say it would just take one or two persons who are capable to be willing and allowed to do them. And compared to all sorts of things that browsers vendors made and get scrapped, you at least know tabs will always use ram, CPU and load assets over the network, so it's not ever going to be completely useless.

Post reply on HN