(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…
If I Shift-Esc in Chrome with one tab open, it shows that this tab ("Add Comment") consumes 0 bytes of shared memory and 163 828 kB of private memory. Current window size is 1280x800. Assuming the render buffer is ARGB32 and assuming one render buffer (which is probably an incorrect assumption) that should be ~40MB. The GPU memory is listed as a separate entry in that view, but I don't know if that is also included i…
Ask HN: One tab on Chrome takes about 100MB memory, why?
201–210 of 210 posts
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#202Earlier 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…
I don't think X11 has anything to do with this. You should set ulimit for the browsers.
There is no reasonable way to account for the memory.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#203Earlier 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…
> I often end up having to hold down the power button for 5 seconds. If you enable the magic SysRq key, Alt+Print Screen+F will trigger the OOM killer. Quick enable for those who want it: kernel.sysrq = 1 in /etc/sysctl.d/90-sysrq.conf. > I blame most of it on Chromium and Firefox I rarely have this problem with modern Firefox, but also block ads so maybe that makes the difference. Chrome is always bad, though.
The end result is roughly as bad as just rebooting, so I might as well just reboot.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#204Earlier quoted context omitted.
And what functionality does it provide for that tons of javascript? I am asking honestly because most of the magic of gmail (which I love) is on the server side. The functionality that it has on the client side is trivial and in some cases atrocious. In these days it cannot even resize the compose box. The power of it's search bar should require trivial amount of client side code, so should the auto save. The only th…
(Key point: Gmail uses over 100MB where FastMail uses 10MB. Careful engineering helps a lot.) Gmail provides a lot more functionality with that JavaScript than you may think. There’s a fair bit of magic that goes into making an email client work as you want it to. That being said: most web apps are surprisingly inefficient in their memory usage (I find it surprising, anyway), and Gmail is no exception. I last used Gm…
Can you please convert your web interface into a generic mail user agent which works with all imap and smtp servers? This would be a much nicer solution than redirecting or fetching mails into a single account and imho your web interface feels snappier than MailMate on macOS and eMClient on Windows.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#205Earlier quoted context omitted.
If it's not implemented in the OS, wouldn't it make more sense to create an OS-level utility?
OS-level utility needs APIs that are not there in case of Android. All night-mode apps for Android are just a reddish overlay. It often falls apart when you something can't go through the overlay like AFAIR system passwords. I tried to use apps, but met with this wall several times. Android did have a night mode, but it was experimental and removed in later versions. So other than alternative ROMs there's nothing the…
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#206Earlier quoted context omitted.
If I Shift-Esc in Chrome with one tab open, it shows that this tab ("Add Comment") consumes 0 bytes of shared memory and 163 828 kB of private memory. Current window size is 1280x800. Assuming the render buffer is ARGB32 and assuming one render buffer (which is probably an incorrect assumption) that should be ~40MB. The GPU memory is listed as a separate entry in that view, but I don't know if that is also included i…
Zero bytes of shared memory? So you have no other processes running which have libc loaded in?
$ ldd chrome | wc -l
124
Shift-Esc is Chrome's own task manager. I don't know how they count.Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#207Earlier quoted context omitted.
I don't think X11 has anything to do with this. You should set ulimit for the browsers.
The browser loads images into the X11 server. Those images consume memory in the X11 server process. That bloats the X11 server up to be many gigabytes. There is no reasonable way to account for the memory.
The "reasonable way" to account for memory is to read the top(1) manual page to find out about the different memory usage statistics, then run top to find out which processes are using how much memory.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#208Earlier quoted context omitted.
The browser loads images into the X11 server. Those images consume memory in the X11 server process. That bloats the X11 server up to be many gigabytes. There is no reasonable way to account for the memory.
As a tab-hoarding Firefox user on machines running X11 with 2-4GiB of RAM who has spent time investigating Firefox and Chrome memory usage issues, I am having a really hard time believing your claim. Right now on the machine I am typing on there are 38 tabs open in Firefox 58.0, uptime 15 days, Xorg is taking up only 66088 KiB (66 MB) resident memory total. The "reasonable way" to account for memory is to read the to…
Your 66 MB is really low. Maybe your video driver is better than mine.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#209Earlier quoted context omitted.
> I often end up having to hold down the power button for 5 seconds. If you enable the magic SysRq key, Alt+Print Screen+F will trigger the OOM killer. Quick enable for those who want it: kernel.sysrq = 1 in /etc/sysctl.d/90-sysrq.conf. > I blame most of it on Chromium and Firefox I rarely have this problem with modern Firefox, but also block ads so maybe that makes the difference. Chrome is always bad, though.
This would, in some way, let me regain control. Most likely it will have killed the X11 server and dumped me to a text console login prompt. If not that, maybe a browser will be killed. The end result is roughly as bad as just rebooting, so I might as well just reboot.
Re: Ask HN: One tab on Chrome takes about 100MB memory, why?
#210Earlier quoted context omitted.
That may not actually be a practical approach to the problem. Years (and jobs) ago, we rolled significant caching into Vegas (video editor), allowing the app to take up 8GB of RAM in cached frames, even on 32-bit builds. There was no way for the OS to do this sort of work for us. The best that the operating system would have been able to do would have been to cache file reads for us. Caching the output of computation…
You're talking about a professional software suite meant to work on workstations often solely meant to run that suite. Chrome has to cooperatively share resources with other applications and with aggressive caching at application level, the only strategy at hands of the OS is to start swapping.
Applied absolutely, it results in deeply sub-optimal behavior in a large number of cases.
Another case could be image decode caching via glide for scrolling lists, or skia output tile caching in a browser, or texture caching in a game engine, or reference frame caching in a video decoder, or glyph caching in a word processor, or block caching in a constructive solid modeller, or result caching in a spreadsheet, or composition caching in a presentation tool, etc. etc. etc.
Caching is an enormously effective tool for applications and operating systems. If an operating system removed it as a tool for applications, it wouldn't likely be a competitive operating system.
Should applications abusively and single-mindedly monopolize memory usage? In some cases, maybe. In general, I think we'd tend to be on the same side of things. I like to see well-behaved applications (that make conservative and efficient use of system resources) and robustly managed operating systems (that don't let apps walk all over them).