Live data from Hacker News

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

news.ycombinator.com

11–20 of 210 posts

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

#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 memory until it needs to be read from disk.

And a large part of that memory is going to be the giant white pixel buffer that you want it to draw into, which is typically mapped to a texture buffer in the GPU memory.

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

#13

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

I sometimes run into the issue when I'm working on my addons for World of Warcraft. I'll frequently have 2 instances of the game open (~4gb of RAM each) + my editor + whatever else I havn't bothered to close and a ton of chrome tabs. Typcially those extra things are pdf documents, skype, qbittorrent and others I can't recall at the moment. I hit my cap of 16gb RAM pretty consistently.

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

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

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

#15

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

My laptop has 8 GB of memory and I have to make sure to have no more than 4 or 5 Chrome tabs open when I use a VM.

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

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

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)

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

#17
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 the screen (say 5 of them), and -ding-, my process uses >400 MiB.

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

#19

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

Yes, absolutely. I've had Chrome tabs take an inordinate amount of RAM and CPU and make the fans spin up. Enough so that other things were slow.
Post reply on HN