Live data from Hacker News

Ask HN: One tab on Chrome takes about 100MB memory, why?

news.ycombinator.com

61–70 of 210 posts

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#61
post #9

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

Applications should use all available RAM they practically can for things like cache. Ideally they will hold on to it lightly so other applications can take what they need.

Entirely unused RAM is a waste if never used.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#62
post #59
post #58

Earlier quoted context omitted.

My desktop has 128 GB with 32 cores.

What CPU/mobo you using?

The one I mentioned is a precision w/ 2x2680. These dropped in price and flooded the market after leases finished. There are too many problems and finicky nonsense with adding extra video cards (due to the power supply). I also have an HP w/ 2x2680v2 128GB on the way. Using the HP I'll be able use for some projects a few of the old nanos and 295x2s I have sitting around. These are so cheap now.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#63
post #34
post #4

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

I'm perfectly willing to wait a second for the page to be reloaded from solid-state storage, if I haven't visited the page for an hour or more. Some people might say I shouldn't keep hundreds of tabs open for weeks. But I'm an old guy, and by my standards my laptop is a freakin supercomputer, so in my mind it should be able to handle all the web pages I can manually throw at it.

Well chrome will "suspend" tabs when it sees your system is running low on memory, and will resume them when you switch to them.

But it's a much harder problem to solve than many think. For example, if they start "suspending" my slack tab, or my email tab, and I begin missing messages I'm going to be quite upset...

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#64
post #12

(I have worked as an engineer on both Ubuntu and Chrome) > One tab on chrome takes about 100MB memory, why? It probably doesn't. Much of that apparent memory usage is shared between all tabs, and the browser renderer process, etc. in the form of shared memory. Quite a bit of it will be the executable code itself, which is "mapped" into memory, given an address, and allocated the full size but doesn't actually consume…

Additionally, the number you come up with (as "MiB of RAM used by an application") might also depend on the OS features the application uses and not directly be obvious by its functionality. Example: I've been doing some experiments around DWM thumbnails in MS Windows. My program doesn't really do much and shouldn't use too much memory (and doesn't, at least initially). I create a thumbnail for each visible window on…

But Windows itself does this when you hover over a taskbar entry, right? Explorer is never that heavy for me.

Or is the process totally different?

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#65
post #14
post #4

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

>Why would they bother optimizing?

Because they're also targeting Android devices.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#66

Earlier quoted context omitted.

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.

Applications should use all available RAM they practically can for things like cache. Ideally they will hold on to it lightly so other applications can take what they need. Entirely unused RAM is a waste if never used.

The OS should use all available RAM it practically can for things like cache.

Not the applications.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#67
post #14
post #4

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

>Google devs use 16-32 core machines, often with hundreds of gigabytes ram

You obviously have no idea what you are talking about. Most devs at Google use MacBook Pros.. which cannot even be upgraded to hold hundreds of gigs of ram.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#68
post #41

Earlier quoted context omitted.

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.

Apple doesn't even offer a 32GB option for their Macbook Pro computers. 32gb is far from standard.

Yes, they don't offer that on their laptops, but what the OP is talking about is a desktop machine. Apple definitely offers 32 GB in their desktops.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#69
post #62
post #59

Earlier quoted context omitted.

What CPU/mobo you using?

The one I mentioned is a precision w/ 2x2680. These dropped in price and flooded the market after leases finished. There are too many problems and finicky nonsense with adding extra video cards (due to the power supply). I also have an HP w/ 2x2680v2 128GB on the way. Using the HP I'll be able use for some projects a few of the old nanos and 295x2s I have sitting around. These are so cheap now.

Reminds me of this, https://medium.com/@timgasser/build-a-16-core-128gb-server-f... Looks like from supply and demand those prices increased a bit.

Re: Ask HN: One tab on Chrome takes about 100MB memory, why?

#70
post #30

Earlier quoted context omitted.

Yes indeed. My computer at work has 16 GB. It gets slow. Every now and then, I'll open a web page that pushes things past a limit. The browser becomes completely unresponsive and sometimes I can't even move my mouse. While I'm suffering from running out of memory, the browser decides to use up even more memory to pop up a dialog to taunt me about it. This can even happen without user action, for example when a page a…

Why don't you stop opening so many tabs. People complain about memory usage by chrome and other browsers but at the same time they are the ones that are using tabs as bookmarks instead of actually using bookmarks. 100tabs open out which 50 they will probably never go back to.

I don’t use my tabs as bookmarks. I use them as tabs, to switch between and to have open, to group into windows. It works very well.
Post reply on HN