7 ms·
> The reason for Chrome's massive memory requirements is that they make memory vs. CPU/performance/security tradeoffs on a regular basis, and usually make them
by fouric 6y ago
> The reason for Chrome's massive memory requirements is that they make memory vs. CPU/performance/security tradeoffs on a regular basis, and usually make them against memory.
This is generally a good trade. Memory is not very useful (modulo filesystem caches) when you're not using it, and has a very low cost when you are (extremely tiny power consumption). CPU cycles cost power (leading to heat dissipation and battery life loss) when you use any amount, and latency when you use too much. Latency directly affects user experience and efficiency, which is a much higher cost than "my RAM is at 75% usage".
Additionally, Chrome's tradeoff is such that it works out better on cheaper devices. Memory is far cheaper than more powerful processors - which also reduce battery life, which is even more expensive. On more expensive devices, you have all the memory you need for Chrome anyway, so you're just getting better latency.
Finally, there are very few cases where you should have a large number of Chrome tabs open anyway. Multi-tasking is impossible (the human brain simply doesn't support it) and rapid context-switches are inefficient. As much fun as it might be to have 5 tabs open on each of 10 different topics, you're simply decreasing your productivity and capacity for focus. Even when doing multi-disciplinary research, there are a ton of ways to get around the problem of running out of memory due to Chrome tabs: printing pages to PDF, turning off JavaScript, downloading research papers and reading them in a native PDF viewer, extracting content from webpages and inserting into local documents, and the classic using darn bookmarks instead of tabs like they were intended to be used.
(of course, in an ideal world, all web browsers would use absolutely no memory or processing power whatsoever - I'm just defending this particular engineering tradeoff)
- Someone 6y ago“Memory is not very useful (modulo filesystem caches) when you're not using it, and has a very low cost when you are (extremely tiny power consumption” One problem is that CPUs have various ways to use less power or even switch off parts when not in use, but you always pay the same for RAM. For battery-operated devices that sleep most of the time such as smartphones, that means being careful with memory usage is the way to go. I think that’s part of the reason iPhones ship with less RAM then Android devices (reference counting needs less RAM than garbage collection for the same performance level)
- fouric 6y agoI'm specifically referring to applications (like Chrome) that you use interactively in the foreground. When using one of these applications, your device is not off or in sleep mode - it is on, you are interacting with it, and it is either consuming more CPU or less. A memory-hungry, CPU-light design drains your battery more slowly than one the other way around. Additionally, the extra power cost of adding more RAM to a device is very low relative to even using 25% of total CPU TDP. [1] gives 3W per DIMM for DDR3 (which is an upper bound, given that LPDDR3 will consume far less power while fully on, let alone in deep sleep mode) and [2] gives 2.5W for DDR2. Edit: aha, found a paper[3] on RAM power consumption in a phone. Far less than 5% in either "suspended" or "idle" states, under 10% in almost every other benchmark, and universally lower than CPU power consumption. [1] http://www.buildcomputers.net/power-consumption-of-pc-components.html http://www.buildcomputers.net/power-consumption-of-pc-compon... [2] https://superuser.com/questions/40113/does-installing-larger-ram-means-consuming-more-energy https://superuser.com/questions/40113/does-installing-larger... [3] https://www.usenix.org/legacy/event/atc10/tech/full_papers/Carroll.pdf https://www.usenix.org/legacy/event/atc10/tech/full_papers/C...
- arghwhat 6y ago> Memory is not very useful when you're not using it, and has a very low cost when you are ... CPU cycles cost power when you use any amount ... Of course important to remember that increased memory utilization results in increased CPU utilization. The range of degradation is quite wide: Increased cache misses (which cost a significant number of cycles), access patterns not in line with the prefetcher, and increased TLB misses. It's for good reason that one of the most potent optimization techniques for hot code is to reduce the memory footprint and memory access.
- fouric 6y agoI specifically said that I was talking about an engineering tradeoff, however - that is, when you have to choose between one or the other. Excluded from that is the possibility of improving both memory and CPU consumption at the same time - that means that you haven't hit the edge of the curve, so to speak.
- arghwhat 6y agoYou wrote it as an "pick memory utilization or CPU utilization", stating memory as being practically free. I just wanted to correct that by saying that its utilization is very expensive for the CPU. Rather the trade off you're thinking of is "caching vs. realtime computation" rather than just "memory vs. cpu". Outside caching, it's pretty universal that more memory utilization just means poorer performance, both in wallclock time and in CPU utilization.
- andrekandre 6y ago> Finally, there are very few cases where you should have a large number of Chrome tabs open anyway. from what i observe in others, it seems that tabs get created when a new task needs to be done in the same site (that is already open) but dont want to loose context of the previous ones... from my own personal experience, i like to reuse them as much as i can, but it gets harder as more and more get added, its easier to start from scratch and get a new tab open and go where i want to go... i think browsers could be doing much more than just tabs and bookmarks to help people organize, because right now it seems like the equivalent of a desk with lots of papers strewn around where someone grabs yet another blank peice to start writing on...
- fouric 6y ago> from what i observe in others, it seems that tabs get created when a new task needs to be done in the same site (that is already open) but dont want to loose context of the previous ones... Could you give a few examples of this? I still can't think of anything particularly common that would reasonably justify more than a dozen tabs at once... > i think browsers could be doing much more than just tabs and bookmarks to help people organize, because right now it seems like the equivalent of a desk with lots of papers strewn around where someone grabs yet another blank peice to start writing on... Yes, I completely agree. I'm working on a piece of software that goes several levels beyond what browsers currently offer for information organization, and (per the topic) it optimizes for CPU consumption at the expense of memory, for the reasons I gave in my comment. However, for the browsers that we have now, bookmarks are much better for organization than tabs. You can tag them, name them, and put them into folders - none of which you can do with tabs.
- andrekandre 6y ago> Could you give a few examples of this? I still can't think of anything particularly common that would reasonably justify more than a dozen tabs at once... as an example, someone asks "hey can you update the appstore screenshots" and while i may still have appstore open on anothet tab, ill open a mew one just for that task, then later somone asks, hey whats up with jira ticket 1234, now i already have 3 tickets open in jira, and i dont wanna disturb those, somill open another tab, same with online docs like confluence, or web searches on google... at some poont the overwhelming number of tabs themselves get to be too much, so clearing context to yet-another-tab, is a way of coping i think... i see this all the time in group meetings btw > I'm working on a piece of software that goes several levels beyond what browsers currently offer for information organization, and (per the topic) that sounds cool. one idea ive had for a while is that sites (like confluence ot jira, or gdocs) are basically apps, so they should be treated as such and automatically grouped together (im windows or tabs) just like native apps...
- kortex 6y agoUnaffiliated plug: The Great Suspender is really handy for automatically suspending unused tabs after X minutes for us taboholics.
- ksec 6y agoAnd for those using Safari, you could simply restart your browser and most of the tabs will not be loaded until you click on it.
- wolco 6y agoMultiple open tabs is such a common scenerio. A common use-case: I visit a site I open a new link in a separate tab. Those tabs are visited later. Having gmail open, slack web client, jira, git and the dev and prod versions of a site I'm building is a common scenerio.
- MereInterest 6y ago> Finally, there are very few cases where you should have a large number of Chrome tabs open anyway. Multi-tasking is impossible (the human brain simply doesn't support it) and rapid context-switches are inefficient. I agree that the human brain doesn't task switch effectively, but that is exactly why I want to have many tabs open. In the case of reading Hacker News, I will go through the main page once, opening each article and comment page in a new tab, then will use that as a to-read list. If I am researching how to do a task, I will open have several pages open for documentation, stack overflow posts, bug reports, etc. These are open not for the sake of multitasking, but in order to reduce the amount of working memory I need. For example, if a post mentions that a particular workaround may be required, then I want to keep that tab open until I have verified that that workaround is not needed in my case.
- rossjudson 6y agoSounds like you want bookmarks with state/tagging.
- 0-O-0 6y agoAre there any solutions with good UX for this workflow?
- fouric 6y agoI guess I'm making two claims here: (1) you should only open tabs for the task you're currently working on and (2) that very few tasks require large numbers of tabs. Fine, maybe it's more then a dozen, but the graph of "number of tabs used by a task" versus "frequency of that number occurring" is an inverse exponential (e.g. most tasks require 1 tab, fewer require 2, even fewer require 3, etc.), and I've never noticed myself actually needing more than...probably 20 tabs to complete a single task before. > In the case of reading Hacker News... This isn't a "task" - you're reading a bunch of completely separate articles, one at a time. You're consuming, not producing/processing/working on a task/problem - and each element of consumption is separate than all of the others. > If I am researching how to do a task... I understand and agree with this definition and workflow! This is how tabs were designed to be used. However, I haven't ever seen a common task (for programmers - who have even more demanding requirements than the general populace) that requires a "large" number of tabs. I guess that's kind of vague and I can always change the number, but really, think about it - how often does a task require more than a dozen tabs? More than two dozen tabs? Just for fun, I opened every frontpage article (as of the time I accessed it - whoops, should have used Wayback HN or something) in Chrome. All 30 articles took 3.9 GB RAM, and adding all 30 pages of comments consumed another 300 MB, so 4.2 GB. total.
- kerkeslager 6y ago> Finally, there are very few cases where you should have a large number of Chrome tabs open anyway. How users use the program determines how the program should be implemented, not the other way around.
- nostrademons 6y agoWe actually measured this when I was at Google. It turns out most Googlers and users of HN are weird - having lots of tabs open is the exception, not the rule, but it's an exception that's very common among the techie demographic that constitutes Google employees and people who criticize them. The average web user doesn't know what tabbed browsing is, and then another large plurality uses only a handful (~2-3) of tabs. The percentage of web users who have 10+ tabs open is in the low single digits.
- TeMPOraL 6y agoThat's a very interesting result - in particular, because it doesn't agree with my anecdotal evidence of almost everyone I know outside of tech; I can't think of a single person whose computer I've seen that doesn't keep >10 tabs open in perpetuity, even across restarts.
- cxr 6y ago> The average web user doesn't know what tabbed browsing is My anecdotal observations are that this often causes extreme number of tabs. I've seen multiple examples from social media in the last month of people scrolling through their mom's (/little brother's/etc) phone, showing hundreds of tabs, but usually all duplicates of the same dozen or so. I remember seeing similar things firsthand (but not to as great an extent) when the first generation iPad came out. And I've also witnessed the same in offices, where doing something in an app or an existing page will arbitrarily open a new window or tab, leading to an explosion of windows and tabs all hidden beneath the IE11 icon in the Windows taskbar. By all signs, it seems true that (a) average people don't know what tabs are, and (b) they have a lot of them. So it makes me wonder about your methodology. I used to be a Mozillian, and I remember the less-than-rigorous excuses that Firefox UX folks reached for when backfilling justifications for their design whims.
- wadkar 6y agoRe: large number of tabs Use the great suspender extension; my friend in academia thanks me every single time we meet. And now I see them have 4 chrome windows open with each having ~20+ tabs in it!!! For them everything happens in browser, its synced and the great suspender lets them run that monstrosity without choking their MacBook Airs
- TeMPOraL 6y agoDoesn't this kill the primary benefit of tabs, namely that the content is already loaded and you don't need to hit the server again?
- account42 6y agoKind of, but if you have enough tabs the cost may become to high. I my FF set up so that tabs are suspended only after a generous time limit and have also excluded some sites so that they are never suspended. Would be nice to be able to suspend the tabs to disk instead of throwing the state away completely.
- ahed 6y agolink https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg/related?hl=en https://chrome.google.com/webstore/detail/the-great-suspende...
- limomium 6y ago> Memory is not very useful when you're not using it It's also not very useful when someone else is hogging all of it! There is an opportunity cost to the user and other programs. It is supremely selfish to only think of oneself, and reserve all the common resources because "well it was just laying around". I PAY for the capacity in case I NEED it, not for some bloated browser to snorf it all up because they can't be assed to write reasonable software.