Most Chrome users can relate to this: you have a bunch of important tabs open, your laptop’s fans start to sound like a rocket taking off, your computer slows to a crawl, and finally it crashes, losing everything.
No way in hell I’m using Chrome on my retina MacBook Pro – accepting its horrible tab management, I opt for Safari. Especially on OS X, Chrome’s got some serious soul-searching to do when it comes to its resource usage. On Windows, Chrome is performing just fine for me.
That being said, this article’s Google Trends graph is silly. Sure, there’s a rise in queries for “Chrome slow”, but that aligns perfectly with Chrome’s rising popularity.
I’m writing this in Chrome on a Retina MacBook Pro. Currently I have ~50-60 tabs open and a couple of Chrome Developer Tools windows open. I have had some issues with the dev/beta channels lately, but stable, at least for now, is fine.
How many tabs do you have open?
I gave up using Chrome on Linux. I was regularly hitting a memory wall as soon as I got a little careless and opened more than a handful of tabs open. With Firefox, it is mostly OK although I still kinda object on principle to giving up 1.5gbs or so of memory to a browser.
That’s true. I remember when I had just 4GB of RAM and I ran in a lot of freezes because Chromium was taking a lot of memory. Even now, with 10 tabs opened it takes 2,6 GB of RAM.
This also applies to OSX while the Windows version of Chrome seems to be a lot lighter than OSX and Linux counterparts.
Is it actually USING 2.6GB of physical memory, or does the Chrome process merely have 2.6GB of virtual memory mapped onto various objects?
Edited 2015-05-18 18:12 UTC
What difference does that make?
(It depends totally on the swapping policy of your OS, or if you allow swapping at all. If you don’t swap all virtual memory is physical RAM…)
Edited 2015-05-18 18:33 UTC
What? Not even close.
No? Oh please, enlighten me!
Do you know what virtual memory is at all?
If a tasks memory is not in RAM it is paged to disk – where else would it be? In nirvana?
And if your system is not paging/swapping (, e.g. because you want to save your SSD) all “virtual” memory is mapped to physical RAM.
So again: Where is your “huge difference”?
Edited 2015-05-18 23:59 UTC
Please tell me you’re not serious.
On Linux virtual memory does not mean phsyical memory + any available swap. Virtual memory, on Linux, means (and I’m literially quoting the manual page here): “The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out and pages that have been mapped but not used.”
Which means not only does virtual memory count pages which may not be mapped at the moment, it also includes all shared code in memory that the process can use. So if you have processes A, B and C all using the same library, that library may exist in memory only once, but the virtual memory stats will treat each process independently.
I suspect you are confusing virtual memory with resident memory, the size of memory of a process in RAM.
I recommend you read the “top” man page for further details on how to interpret memory statistics.
Edited 2015-05-19 00:31 UTC
Virtual memory is a per-process mapping table of memory addresses. When the process asks for memory, the OS gives him a range of addresses, but this range is not the actual memory range – it is a virtual range. To which “real” addresses in the memory this virtual addresses map is written in the mapping table.
The benefit of this is that the OS can now rearrange the “real” memory how he wants without need to notify the process – it just modifies the mapping table. In this way the OS can swap some (not frequently used) pages to the disk (or compresses the content) – to free up the memory for other needs (disk cache). One other technique commonly used is to map a file into a memory range so the process can threat reading/writing to and from a file like it would be memory (and let the OS be smart and do the caching the most efficient way).
Not every OS handles it the same way!
We just had the News os MorphOS here on OSnews.
MorphOS has no concept of virtual address spaces or of posix shared objects (1). But there is a Web-browser based on webkit.
So (most of) the libs, webkit needs, are statically linked.
A lot of work was done to reduce memory usage, but it is still a memory hog.
Googles fork of webkit seems to behave even worse.
(1) MorphOS libraries like all Amigaish libraries need to be purely reentrant to work.
Edited 2015-05-19 03:56 UTC
cybergorf,
I’m hoping I can diffuse this by saying you are both right. It’s common for linux users to use “top’s” definition of virtual memory to mean address space, but it can also mean disk backed ram. The different definitions for virtual memory are to blame rather than anybody’s misunderstanding of the subject, we just need to be more careful with context to avoid confusion.
Yes.
On OSX vmmap gives a nice feedback. Here e.g. on my chrome root task, showing that only 140K of 1.5G are reserved but not allocated:
[code]
REGION TYPE VIRTUAL
=========== =======
ATS (font support) 32.1M
ATS (font support) (reserved) 8K reserved VM address space (unallocated)
Activity Tracing 2048K
CG backing stores 9152K
CG image 100K
CG raster data 96K
CG shared images 368K
CoreAnimation 1412K
CoreGraphics 4K
CoreImage 8K
CoreServices 8K
CoreUI image data 108K
Dispatch continuations 16.0M
Foundation 72K
IOKit 6404K
Image IO 996K
Kernel Alloc Once 8K
MALLOC 100.2M see MALLOC ZONE table below
MALLOC (admin) 48K
MALLOC freed, no zone 5124K
MALLOC_LARGE 3580K
Memory Tag 242 12K
Memory Tag 251 20K
Memory Tag 255 547.7M
Memory Tag 255 (reserved) 140K reserved VM address space (unallocated)
OpenCL 32K
STACK GUARD 56.2M
Stack 243.1M
VM_ALLOCATE 17.3M
__DATA 26.9M
__IMAGE 528K
__LINKEDIT 73.0M
__TEXT 240.8M
__UNICODE 552K
mapped file 160.5M
shared memory 12K
=========== =======
TOTAL 1.5G
TOTAL, minus reserved VM space 1.5G
ROFLMAO!! I’d have countered with:
Oh, but do *you* know who Vanders is?
—
http://www.osnews.com/story/8996/Interview_With_Main_Syllable_Devel…
http://www.osnews.com/story/3966/Interview_with_Syllable_Project_Ma…
http://www.osnews.com/story/18218/Five_Questions_Kristian_Vanders_v…
http://www.osnews.com/story/2437/Syllable_s_Project_Leader_Vanders_…
Now I do, very impressive!
We where obiously not talking about the same thing and should both both have considered different other definitions.
I reluctantly have to agree. I still really want to love Chrome but it has developed a serious case of middle-age spread in the last year or so. On both my Windows 8.1 desktop and SparkyLinux laptop it has become quite proficient at gobbling up all available resources with Gmail open in my primary tab. I don’t recall that it was that bad during the timeframe that I transitioned from Windows 7 to 8.
I totally despise Firefox and IE so I have long ago dismissed those as viable.
I have no problems. I keeps many tabs open for days. Chrome very rarely crashes for me. I wonder if this is mostly a Chrome on OS X problem.
Firefox, best browser out there
Firefox (on Windows 8.1) is the only browser that routinely goes into a coma for me and won’t recover without a 3-finger salute. I still prefer it over the others though.
The sad thing about all of this is that pretty much the only ‘support’ you get from browser vendors when it comes to hanging/crashing is disable all your extensions, boot up in safe mode, etc etc. It’s like we’ve regressed back to the Windows 3.1 days.
Edited 2015-05-18 15:28 UTC
Unfortunately, sometimes it is because of the extensions and the browser isn’t robust enough to let the extension crash on its own and report the extension to you. So you have to do the investigation on your own by disabling all the extensions and enabling them one by one until the problem occurs again.
Also, the profile might get corrupted because of those crashes or because of your computer’s crashes and all hell breaks loose. For such instances there’s “about:support” where you can migrate the important information to a new profile.
In your case it might also be because of some issues between Firefox and your video drivers?
Anyway, Firefox is far from perfect, but I like the freeness, openness and flexibility that the other browsers don’t have. Chrome comes pretty close nowadays, but it’s becoming slower and less stable by the day. Firefox has lower memory consumption and is pretty close in terms of performance.
Yes, I understand everything you say. My point is that I don’t have these kinds of problems on Windows (or Linux for that matter). As long as my drivers and hardware are good, I can pretty much run anything I want and the OS can handle it.
Therefore, I’m not happy about the fact that we’re now regressing to running all of our apps in applications (browsers) that CLEARLY can’t handle the strain. That’s why I made the Windows 3.1 reference; in the old days, one misbehaving app would frequently bring down the whole OS. And now we’re going back to that.
I understand that it has advantages for developers, but as an end user, I feel like we’re taking one step forward and two steps back.
Stop using shitty, buggy extensions. I haven’t had to send a three finger salute because of a browser since IE6. Firefox is great, and it’s even better if you can use it in 64-bit mode (on Windows this generally means Waterfox or Firefox Developer Edition’s win64 build).
We wouldn’t need shitty browser extensions if the browsers themselves weren’t so shitty. For example, I had to install a Firefox extension to force Youtube to play Flash videos, because the HTML5 versions would just display a black screen.
Firefox handles HTML5 video just fine, the hell were you doing?
Really?
https://www.google.com/search?q=firefox+youtube+html5+blank&ie=utf-8…
I’m not saying that it doesn’t work for YOU, but a lot of people have had problems with it.
Edited 2015-05-18 23:32 UTC
I’ve never had a problem with Chrome on OS X: I’m writing this in Chrome on my MBPr right now, with 20 tabs open across 2 windows (I had a clean up earlier today).
I have this problem constantly. It seems there are some other variables involved since so many people do have this issue. I’ve even tried disabling all my extensions and this still happens (although it is better).
Yes, I wouldn’t be at all surprised to discover it’s a plugin or plugin related problem, which is why I’m a little baffled by it being called a “Chrome” issue. The same sort of problems can affect Firefox with some plugins.
Use Chrome everyday on my MBPr with >20 tabs open (haven’t started safari since I got the machine one year ago). I Never reboot the machine unless there is a system update – just close the lid and continue the next day. Have about 30 extensions installed.
I have not seen the problems mentioned in the article, so I guess the culprit would be a leaking extension and/or webpage.
So, this is mainly an OS X problem. I think it should be reflected in the title.
BTW, I like how Chrome is tooted as more cross-platform and more-secure than Firefox, while it fails at both (see cvedetails for the security thing).
But, marketing…
I wouldn’t know. I couldn’t possibly use Chrome with that many tabs.
Firefox, sure, because Tab Groups is amazing. I can deal with the occasional hang (which are never fatal for me), but, damn, Chrome’s tab management is completely and utterly worthless.
Also, I still have problems with frequently crashing tabs on Chrome.
https://opensource.conformal.com/wiki/xombrero
Everything else is bloated cowfart.
I like Chrome for it’s devtools and some of the general webkit ui and how websites appear.
But on Linux, Ubuntu? Even the old 14.04, 14.10 and onwards, Chrome, Chromium (whatever derivative, you name it!) just plain crashes. The instability was annoying. Every couple days, crud, all my browser instances and tabs freeze and close immediately.
Have switched to Firefox for my main work load. But for the important developer stuff with javascript, I keep that one instance of Chrome/Chromium open.
Firefox that being said, has the occasional freeze. But at least all the tabs/browser instances just freeze and stand pending, or blank out. Unlike Chrome, they don’t instantly crash and close.
Man, Google and Mozilla, improve your stuff!!! Not expecting Spartan (with good web standards support) or what have you to be fixed by MSFT in Redmond. But I’m open to surprises….
FWIW:
While not released yet, Vivaldi is 100x more stable than Chrome on OS X and has the best tab mgmt approach of all.
The last I checked, Vivaldi lacks a way to quickly search/filter open tabs. To me that’s an essential tab management feature when there are a large number open. Firefox and Safari, for example, provide tab searching in their tab groups/show all tabs options.
This is something that Opera used to have, and implemented better than any other browser since (using its Windows Panel), so maybe it’s a feature that’ll show up in Opera inspired Vivaldi at some point.
I’m a chronic tab abuser with usually no icons visible anymore. I like Chrome, mostly because I’m used to it and it works for me (used to use Opera for years before Chrome). True, the laptop used to crawl and overheat, until I invested five minutes of my time in finding a memory saver / tab suspension extension. I went for The Great Suspender. It will suspend the open pages after a configurable idle time, and can resume on tab re-focus, and supports whitelists for tabs you don’t want to suspend like mail, online video or music or social media. Simple.
Haven’t worked with it, but the Chrome extension OneTab is purported to SUBSTANTIALLY improve resource usage–with trade-offs of course.
Microsoft’s new Edge browser actually looks pretty promising on the resource front, among others.
By default Chrome will create 1 OS process per open tab. The idea here is that if one page causes a crash then usually only the process for that tab will die but the others will survive.
If you often have multiple tabs open on the same domain (for example multiple documents open from Google Docs/Drive) and these pages are unlikely to cause a crash you can ask Chrome to manage all tabs from that domain by a single process.
To do this use the launch parameter –process-per-site.
If all of your tabs have been loaded from different domains then you will see no benefit so don’t expect wonders.
For a detailed discussion see http://www.ghacks.net/2015/02/08/save-memory-in-chrome-by-using-one…
As far as I know Firefox will soon also be using 1 process per tab.
Happy hacking,
Richard
Just a bit slower. Safari has major memory leak problems. I regularly end up with safari web processes in the 8GB range, and my system slows to a crawl from swapping.
As for what Chrome’s doing, every other major web browser has crash management that will recover your browsing state after quitting or a crash. With Safari, I augment it with an extension that keeps a history so I can also go back in time.
I gave up on Chrome ages ago because of its argumentative developers. I don’t remember what it was, but I posted a legitimite bug, and they just told me I was wrong. Okay. Fine. I can use another browser.
Had no problem with memory or speed, but i mostly gave up on chrome because of a old and annoying bug: on almost every page it loads a white page before content, constant flashes. Old bug marked as “will not solve”. If you will not solve and won’t allow me to configure the color of the blank page I say good bye.
Correlation vs. Causation – causation is too hard!
Runnning web apps as “full fledged” desktop apps, memory virtualisation in each tab, notifications, google sync .. All this does not run on air.
Even Internet Explorer is quciker and more memory efficient than Chrome is (latest version at least).
At the pace of how dirt cheap memory is nowadays, nobody really cares about this anyway (except maybee MacBook users).
As long as people keep praising Apple for no longer allowing users to upgrade the RAM on their laptop, things will remain like this.
Not to mention that if hardware acceleration is enabled (which it is, by default) Chrome crashes my MacBook Air every day.
It’s really fucking annoying.
Chrome can be slow and suck memory. Firefox can be slow and suck memory. IE and Safari can be slow and suck memory, all depending on extensions/hardware acceleration/system parameters. Sounds like business as usual to me.
I think the really sad thing is that we really aren’t able to pick browsers we like anymore. Much like mainstream operating systems, we’ve gone from being able to choose the one we liked most to having to choose the one we hate the least and/or the one that gives us the least trouble syncing with our mobile devices. I remember when I used Firefox because I really liked it. Now I use Chrome because well, hey, it’s a bit faster for me and my bookmarks sync with Chrome on Android. I’d use FF on Android, except it crashes every few minutes and I’ve yet to discover a really working sync solution between Chrome and Firefox, so Chrome on the desktop it is.