(I now run Chrome in a Ubuntu VM under bhyve on FreeBSD, which has the same memory limiting effect, plus giving me U2F support when I pass a USB controller through to the VM)
Ask HN: One tab on Chrome takes about 100MB memory, why?
51–60 of 210 posts
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#52Earlier quoted context omitted.
Another implied solution perhaps... don't use so many tabs? (I promise you, I'm speaking to myself as I say that. I use way too many, myself)
I'm currently at 30 Firefox tabs and it's using 1.24gb of memory. Much less than 100mb/tab.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#53Yes, it is a design fault.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#54I'm eager for info too. But while we're waiting, I have a genuine, not snarky, question too: does this ever actually negatively impact people's use of their computer? I can't recall ever feeling like my browser having lots of tabs open has changed the experience. RAM and resource usage hasn't been on my mind in years.
Indeed, "free memory" is the biggest waste of money and energy imaginable. Unless you lack the memory necessary to do something else, you shouldn't care. If the question really needs answering, the poster should just get a heap profile. Some instructions are here: http://goog-perftools.sourceforge.net/doc/heap_profiler.html You may also wish to try the memlog flag to chrome, or rebuild chrome with TCMALLOC_SMALL_BUT_…
This is exactly the attitude that leads to such problems. Applications that assume they can use all of the available memory on the machine are hostile to multitasking environments.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#55> One tab on chrome takes about 100MB memory, why? Two reasons 1) Because, Chrome is ready to do something with that tab: browse the web. Do this, create a browser that doesn't use much memory when a tab is idle. Switch back to that tab and interact with the page or go to a new page. You will experience latency. It will feel slow. That's why the tab uses a lot of memory. It is staying ready at all times to be interac…
1 is entirely possible. Opera 12.x takes ~3-10MB per TAB (+the weight of the media used on the page). There is zero latency, opening new/switching tabs is instantaneous. Google devs use 16-32 core machines, often with hundreds of gigabytes ram. Why would they bother optimizing?
Many of the folks who work in our monorepo have an additional Linux workstation - not sure what the specs are on it, or what the average split is between laptop and workstation surfing. I also haven't paid that much attention to see if the folks I know on the Chrome team have substantially different usage.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#56Earlier quoted context omitted.
1 is entirely possible. Opera 12.x takes ~3-10MB per TAB (+the weight of the media used on the page). There is zero latency, opening new/switching tabs is instantaneous. Google devs use 16-32 core machines, often with hundreds of gigabytes ram. Why would they bother optimizing?
The standard machine has 32 GB. So I guess 0.32 hundreds... And for completeness, 6 physical cores, 12 logical with HT. Still beefy, but nothing out of the ordinary.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#57Yes, it is a design fault.
What is design fault? Could you elaborate
>with say 30 tabs open, 3+ GB is gone, chrome is such a dominant memory consumer! in fact it takes about 10X more memory than everything else combined
The last words in OP's post were "is this a design fault?"
Yes.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#58Earlier quoted context omitted.
1 is entirely possible. Opera 12.x takes ~3-10MB per TAB (+the weight of the media used on the page). There is zero latency, opening new/switching tabs is instantaneous. Google devs use 16-32 core machines, often with hundreds of gigabytes ram. Why would they bother optimizing?
this is supposed to be exaggerated but who the fuck uses a 32 core computer with hundreds for gigabytes of ram. Do you mean their data centers?
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#59Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#60Earlier quoted context omitted.
Indeed, "free memory" is the biggest waste of money and energy imaginable. Unless you lack the memory necessary to do something else, you shouldn't care. If the question really needs answering, the poster should just get a heap profile. Some instructions are here: http://goog-perftools.sourceforge.net/doc/heap_profiler.html You may also wish to try the memlog flag to chrome, or rebuild chrome with TCMALLOC_SMALL_BUT_…
Unless you lack the memory necessary to do something else, you shouldn't care. This is exactly the attitude that leads to such problems. Applications that assume they can use all of the available memory on the machine are hostile to multitasking environments.
If you have very little, it will turn off many optimizations, turn on features that reduce memory (like tab suspension built into the browser), and overall adjust the whole browser to use less resources but go slower.