Chrome is still a memory hog on macOS compared to Safari

2»

Comments

  • Reply 21 of 36
    dewmedewme Posts: 5,335member
    ITGUYINSD said:
    This article is being questioned by others saying the person who tested did not count the "Safari renderer" processes (which are rather large memory consumers) when counting Safari usage.

    I, personally, set Safari and Chrome to open the same 5 tabs at start, and if you count ALL the Safari processes, it's actually MORE than Chrome.

    This article is just untrue.
    Yeah, I also noticed that Safari consumes memory even when it's not loaded because it has some background services running either all of the time or at first invocation. You have to be careful when comparing memory consumption of "first party" apps compared to third party apps. It's not unusual for the platform owner (and others) to run "helper" services inside surrogate hosting processes or with service names that aren't obvious to the casual observer to be associated with an application that is loaded on-demand. There's absolutely nothing nefarious about this at all, it allows services that would otherwise be unmanageable to be better managed, services that listen for certain events to react accordingly, or simply to provide a faster launch of the primary app when it is loaded on demand. The generic or obscure naming of these services makes finding all the places where a software application's full runtime stack is actually consuming memory a bit more difficult. No big deal.

    To all of those who think that the Google engineers who developed and work on Chrome are a bunch of misfits, try applying for a job at Google to show them how a "manly man" can code circles around their software development team members. I have zero hesitation saying that by and large the software engineers working for all the big platforms including, but not limited to, Google, Microsoft, Amazon, Apple, Oracle, etc., are some of the best and most brilliant developers in the software development industry. Every one of these companies ALWAYS has openings, often in the hundreds, waiting to be filled by developers who meet their standards. Those positions go unfilled not because of the lack of applicants or funding, but because they cannot find enough applicants who meet their standards. 
    edited February 2021 muthuk_vanalingamllamaderekmorr
  • Reply 22 of 36
    I have not used Google Chrome in quite a while, but I do use Brave just about exclusively. I do only run one application at a time, and for the most part, have no memory issues with it. The times I have memory issues are when I visit the site yahoo.com. Besides viewing some stories on that site (some contain videos that I also look at), when I leave it, most of the memory it consumed is not "given back". I'm willing to bet that issue is prevalent with all browsers.

    I do at times run the freeware application Memory Clean while browsing with Brave, and it definitely helps with memory management.
    watto_cobra
  • Reply 23 of 36
    dewme said:
    I suspect Chrome is spinning up a full process for each tab while Safari is spinning up new threads within the same process to do the same thing. 

    No, this is not poor programming, it’s a purposeful design choice that Google uses to improve resilience and fault tolerance. Google also has a more open plug-in/extension model. Isolating plug-ins/extensions into their own process and memory address space within a tab keeps a poorly behaving, e.g., memory leaker, plug-in from bringing down the entire Chrome application if something goes wrong. Google made a choice and they chose resiliency and fault tolerance over memory efficiency. This makes perfect sense for their design intentions and as users it gives you a choice if you have to use or access certain sites or use certain plug-ins that are not as stable as you’d like. There are times when I'd rather have a single tab crash than have the entire browser crash. This may be more of a concern on Windows, but it's not a defect, just a characteristic of the application.

    I've had to make these kinds of design choices and there have definitely been valid reasons for choosing out-of-process over in-process. Other reasons for running out-of-process include separating the lifetime of your server process from the lifetime of your clients, maintaining state between client sessions, and keeping your service/app running and doing things in the background. Yes, it costs more in memory consumption but most virtual memory based systems including Windows can handle low memory situations reasonably well, i.e., allowing the system to slow down rather than running out of memory and crashing. It's up to the designer to choose the model that best fits their design intentions and you'll find a mix of in-proc and out-of-proc services on all OSs that support these models. Google took one approach and Apple took another. No big deal in a world where you can have as many browsers on your computer as you would ever want to have.

    If you “have” to use Chrome for a particular site it should not present a problem unless doing so requires you to open multiple tabs and you have so little memory that you get into a heavy paging situation. It’s not like you get a rebate or any material benefits from having a lot of free RAM just sitting there doing nothing. 
    And the design choice still sucks on a Mac. 
    watto_cobra
  • Reply 24 of 36

    Firefox fills my RAM and starts writing to disk after several minutes. I keep it around because I can’t log into eBay in Safari on macOS or iOS. 
    Ebay works fine on all of my Macs and Apple mobile devices (iPhone & iPad).  Must be something going on with your system.
    king editor the gratechadbagllamaStrangeDayswatto_cobra
  • Reply 25 of 36
    I'm wondering if Chrome's notorious RAM consumption is something to do with their sandboxed approach?



    Perhaps try the new Edge?

    Hint: The new Edge beta (for PC at least) finally shuts down resources for tabs that are no longer in use. Options start from five mins of inactivity I believe. Great idea.
    edited February 2021 MplsPwatto_cobra
  • Reply 26 of 36
    dewmedewme Posts: 5,335member
    davefor said:
    I'm wondering if Chrome's notorious RAM consumption is something to do with their sandboxed approach?



    Perhaps try the new Edge?

    Hint: The new Edge beta (for PC at least) finally shuts down resources for tabs that are no longer in use. Options start from five mins of inactivity I believe. Great idea.
    Yes, running each browser tab and every extension in its own process absolutely consumes a lot more memory. This model is actually quite useful in scenarios where an extension is misbehaving because it can be killed without bringing down the whole browser application. But yeah, if your normal workflow (one that I cannot imagine outside of a test lab) requires you to keep 54 tabs open at a time, you're going to need gobs of memory or need to use a different browser.  
    muthuk_vanalingam
  • Reply 27 of 36
    nicholfd said:

    Firefox fills my RAM and starts writing to disk after several minutes. I keep it around because I can’t log into eBay in Safari on macOS or iOS. 
    Ebay works fine on all of my Macs and Apple mobile devices (iPhone & iPad).  Must be something going on with your system.
    I get stuck in Captcha loops. I googlerized it several months ago, and it seems to be a common affliction across platforms. I appreciate you giving me a glimmer of hope!
    chadbagwatto_cobra
  • Reply 28 of 36
    fred1 said:
    Sadly, however, some web sites still don’t work on Safari. My bank’s web site, for example, and Zoom only plays with the Chrome browser. 
    Yikes, if your bank’s website doesn’t work with Safari that’s some sloppy programming. Most of my career has been web dev and writing HTML standards-compliant code is part of the job. 
    watto_cobra
  • Reply 29 of 36

    Firefox fills my RAM and starts writing to disk after several minutes. I keep it around because I can’t log into eBay in Safari on macOS or iOS. 
    That’s weird, I use ebay on Safari without issue. 
    king editor the gratewatto_cobra
  • Reply 30 of 36
    dewme said:
    I suspect Chrome is spinning up a full process for each tab while Safari is spinning up new threads within the same process to do the same thing. 

    No, this is not poor programming, it’s a purposeful design choice that Google uses to improve resilience and fault tolerance. Google also has a more open plug-in/extension model. Isolating plug-ins/extensions into their own process and memory address space within a tab keeps a poorly behaving, e.g., memory leaker, plug-in from bringing down the entire Chrome application if something goes wrong. Google made a choice and they chose resiliency and fault tolerance over memory efficiency. This makes perfect sense for their design intentions and as users it gives you a choice if you have to use or access certain sites or use certain plug-ins that are not as stable as you’d like. There are times when I'd rather have a single tab crash than have the entire browser crash. This may be more of a concern on Windows, but it's not a defect, just a characteristic of the application.

    I've had to make these kinds of design choices and there have definitely been valid reasons for choosing out-of-process over in-process. Other reasons for running out-of-process include separating the lifetime of your server process from the lifetime of your clients, maintaining state between client sessions, and keeping your service/app running and doing things in the background. Yes, it costs more in memory consumption but most virtual memory based systems including Windows can handle low memory situations reasonably well, i.e., allowing the system to slow down rather than running out of memory and crashing. It's up to the designer to choose the model that best fits their design intentions and you'll find a mix of in-proc and out-of-proc services on all OSs that support these models. Google took one approach and Apple took another. No big deal in a world where you can have as many browsers on your computer as you would ever want to have.

    If you “have” to use Chrome for a particular site it should not present a problem unless doing so requires you to open multiple tabs and you have so little memory that you get into a heavy paging situation. It’s not like you get a rebate or any material benefits from having a lot of free RAM just sitting there doing nothing. 
    Both are sandboxed and support background processes (web workers and service workers). I do remember that when the Chromium team worked Webkit to make Blink, one of the main reasons was isolated processes for tabs. I don’t recall if Webkit also added this or not, so I wouldn’t put a ton of stock into that argument. 

    What is more likely to be the case is that the memory allocation and clean up schedules are significantly different between the two browsers. Additionally, Chrome has conditional logic to allow it to compile down to windows and linux binaries. Lastly, Chrome supports many more features and draft specs that Webkit does not. I help write web standards and work on browser dev and I can say from my experience, it takes much much longer to get features rolled out on Safari than on Chrome. 

    I think you’re right that this is likely a design and approach choice, but it likely goes much deeper than process isolation. If anything, I would imagine process isolation to be better at keeping track of and releasing memory when it is finished. I’d love to see someone from the Chromium team and/or Safari team go over just what the root cause is for this, but my strongest suspicion is that Webkit calls more MacOS specific shared linked libraries and Chromium/Blink needing to be OS compatible roll their own functionality which simply doesn’t run as lean 

    dewmewatto_cobra
  • Reply 31 of 36
    mcdave said:
    MplsP said:
    What in God's name could require Chrome to use 10-20x the amount of memory that Safari uses??? Just one of the reasons I keep Chrome off my MBP. For another reason, search Chrome Keystone Mac
    Data harvesting’s hard work.
    This couldn't be more untrue. The data harvesting happens on their servers not on your machine’s software. 
  • Reply 32 of 36
    maestro64 said:
    fred1 said:
    Sadly, however, some web sites still don’t work on Safari. My bank’s web site, for example, and Zoom only plays with the Chrome browser. 
    That is because they have not fully updated to HTML 5 or their using feature which they developed using one browser and never bother to test with the others. There sites out there which support activeX and .net. I do run into site which do not work on mobile safari but fine on the Mac safari, sorry to say there are lots of hack programmers out there.
    VBScript and ActiveX controls have not been supported for years. That stuff is dead. Even IE doesn’t support that anymore, which was the only place any of it ever ran. I hear what you’re saying about old web pages, but you have to dig pretty deep to find something that isn’t modernized to at least work for IE 10 or better. The only sites I ever had an issue with were US government sites. 
    watto_cobra
  • Reply 34 of 36
    MplsPMplsP Posts: 3,911member
    Unfortunately, i have two clients that both use sharepoint log-ins, so i am forced to use two different web browsers to avoid conflicts. Until Apple can come up with a way to log two different accounts into one website, I’m forced to use Chrome AND Safari.
    Use a private browsing tab
  • Reply 35 of 36
    maestro64maestro64 Posts: 5,043member
    dewme said:
    I suspect Chrome is spinning up a full process for each tab while Safari is spinning up new threads within the same process to do the same thing. 

    No, this is not poor programming, it’s a purposeful design choice that Google uses to improve resilience and fault tolerance. Google also has a more open plug-in/extension model. Isolating plug-ins/extensions into their own process and memory address space within a tab keeps a poorly behaving, e.g., memory leaker, plug-in from bringing down the entire Chrome application if something goes wrong. Google made a choice and they chose resiliency and fault tolerance over memory efficiency. This makes perfect sense for their design intentions and as users it gives you a choice if you have to use or access certain sites or use certain plug-ins that are not as stable as you’d like. There are times when I'd rather have a single tab crash than have the entire browser crash. This may be more of a concern on Windows, but it's not a defect, just a characteristic of the application.

    I've had to make these kinds of design choices and there have definitely been valid reasons for choosing out-of-process over in-process. Other reasons for running out-of-process include separating the lifetime of your server process from the lifetime of your clients, maintaining state between client sessions, and keeping your service/app running and doing things in the background. Yes, it costs more in memory consumption but most virtual memory based systems including Windows can handle low memory situations reasonably well, i.e., allowing the system to slow down rather than running out of memory and crashing. It's up to the designer to choose the model that best fits their design intentions and you'll find a mix of in-proc and out-of-proc services on all OSs that support these models. Google took one approach and Apple took another. No big deal in a world where you can have as many browsers on your computer as you would ever want to have.

    If you “have” to use Chrome for a particular site it should not present a problem unless doing so requires you to open multiple tabs and you have so little memory that you get into a heavy paging situation. It’s not like you get a rebate or any material benefits from having a lot of free RAM just sitting there doing nothing. 
    You are correct this is about proper memory management, and swapping memory around for foreground vs background tasks. Yes there are always trade offs, no doubt and loading up memory and holding to ensure performance over anything else is not always good. The fact Chrome allocated itself all that memory within a very short time is not good. It is poor program or if it was not poor programming base on your trade-off scenario that is not backed up by the fact that Google has claimed their browser is suppose to be lightweight, i.e. easy on system resources and we know it is not as fast as Safari is today. I got back to my point about this was done on purpose to be a memory hog which starves the system of necessary resources that other Apps could be using.

    To your point, Apple and Google took two different paths but the end results is not the same, and the end user suffers more under on path verse the other. 
    watto_cobra
  • Reply 36 of 36
    maestro64maestro64 Posts: 5,043member
    ITGUYINSD said:
    This article is being questioned by others saying the person who tested did not count the "Safari renderer" processes (which are rather large memory consumers) when counting Safari usage.

    I, personally, set Safari and Chrome to open the same 5 tabs at start, and if you count ALL the Safari processes, it's actually MORE than Chrome.

    This article is just untrue.
    You are correct I have seen Safari kick off many processes, this does depend on the website you visit, some websites create a lot of safari or extension processes. When i was having memory issue with my Mac I began looking at very closely what was using up memory and Safari was not the issue many time i could have 20 tabs open. Long and short it turned out my HDD was going bad and the system was having issue doing the virtual memory disk swap and it made the system use more physical memory than it should have. I was maxing out the physical memory and it became very slow.

    In the example in this article it is specifically looking at opening two websites and monitoring what each app does with memory over time. The fact they Chrome is allocating 1G of memory in 2 minutes does not make sense, there is no reason for the app to keep allocating more memory over time especial if the app is not actively doing something. Even with Safari starting other process as needed it does not keep allocating memory to it own process over time.

    The people saying this is not accurate they try to divert your attention to something else which this article is not specifically looking which why Chrome is loading more up memory over time. If watch Safari and it is associated processes when they start up it is not allocating more memory over time. I can not tell you if all the all safari process use up more than 1G. But can tell i never seen Safar itself chew up that much memory, and as you close tabs Safari processes are shut down and frees up memory.
    watto_cobra
Sign In or Register to comment.