• ditty@lemm.ee
    link
    fedilink
    English
    arrow-up
    32
    ·
    4 hours ago

    I switched back to Firefox over a year ago and I have not noticed it using much less RAM than Chrome tbh. It’s definitely the better browser for all the other reasons, but I wouldn’t list memory utilization as a big advantage over other browsers

    • cm0002@lemmy.world
      link
      fedilink
      arrow-up
      24
      ·
      3 hours ago

      The whole RAM thing is way overblown. Both browsers request a lot of RAM allocation, but only actually use a fraction of it. When the OS needs it for another process this “allocated, but unused” pool is the first to get used when “Free and unallocated” is gone

      Problem is windows reports it all as the same in the task manager so people see that “70%” usage and freak out.

      Tl:Dr Windows task manager is a fuckin lier.

      • otacon239@lemmy.world
        link
        fedilink
        arrow-up
        16
        ·
        3 hours ago

        There’s also the idea that free RAM is somehow a good thing. In an ideal system, the RAM would always be “full” of potentially useful data. Having a bunch of empty RAM means that it’s not being useful. That space could be used to hold plenty of regularly used files that would be instantly loaded instead of having to pull from the drive again.

        I don’t know when everyone started getting concerned with RAM usage, but in a perfect system, it would hold onto all of your frequently used programs and files that it could fit from boot and then those would load instantly.

        Some Linux distros even allow loading the entire OS into RAM for wild speeds.

        Idle RAM is just that. It does you no favors. Now, I do understand that you don’t want to be completely out, but we act like having 80% free is a goal for some reason.

        • Badabinski@kbin.earth
          link
          fedilink
          arrow-up
          5
          ·
          3 hours ago

          The problem is that the extra RAM used by a browser is held on an exclusive basis and so is not nicely reclaimable by the kernel. I love that Linux caches the shit out of files in RAM, it’s great. It’s also great that it can release that memory when I launch a chundering dumpster fire application that eats all of my RAM. If a browser had been holding that memory, then the godawful Linux OOM killer would have launched, halted all threads on the system, walked the entire process tree, and SIGKILLed something (probably not a browser tab) before letting everyone else resume.

          With the way memory is currently managed, a bloated browser is a liability. Cached state needs to be stored in something like a mmaped file so that the kernel can flush pages out of memory if someone else comes along with a malloc. Alternatively, there needs to be communication between a browser and a userspace OOM daemon. If the system started hitting a soft limit, then the browser could start unloading background shit more aggressively.

          Free memory is wasted memory, but so is memory that can’t be used for anything else when it’s needed.

          • otacon239@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            3 hours ago

            Yeah, I agree. Browsers all seemed to act like they are the only thing running on the computer at some point, practically resembling their own OS with the amount of containerization and complexity. There should definitely be a way for the OS to request some RAM be released from the browser.

  • N.E.P.T.R@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 hours ago

    I honestly dont care about my browser using a lot of resources (processes, RAM, etc) because it may be helpful to the isolation security model of the browser. Each and every website is a possible malicious app.

  • Didros@beehaw.org
    link
    fedilink
    arrow-up
    2
    ·
    4 hours ago

    I mean, you got like a 85% chance that anyone giving you software advice is, closer to 98% for hardware advice.

  • Vince@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 hours ago

    What is the acceptable amount of ram a browser should be using? Is there a way of knowing how much is “wasted”? Is it even possible to waste ram, like what is wasted, time? Electricity?

    • bassomitron@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 hours ago

      It’s only a problem if it doesn’t give it up when other apps need it and there’s not enough. Browsers just cache a bunch of shit in memory for speed and convenience, but they should unallocate it back to the pool if something else calls for it. The internet complaining about this for years and years are mostly doing so from a place of ignorance.

      • Badabinski@kbin.earth
        link
        fedilink
        arrow-up
        1
        ·
        3 hours ago

        The issue is that browsers don’t release much memory back to the system when it’s needed. I wish they’d work more like the Linux kernel’s VFS caching later, but they don’t (and might not be able to. For example, I do don’t think the Linux kernel has good APIs for such a use case).

      • Badabinski@kbin.earth
        link
        fedilink
        arrow-up
        1
        ·
        3 hours ago

        The issue is that browsers don’t release much memory back to the system when it’s needed. I wish they’d work more like the Linux kernel’s VFS caching later, but they don’t (and might not be able to. For example, I do don’t think the Linux kernel has good APIs for such a use case).

        • bassomitron@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          2 hours ago

          It does release it back to the system. It only doesn’t if you actively have a ton of windows/tabs open, in my experience. Even then, it’ll cache stuff to disk after awhile. Like on my phone, I’ve easily had over 20 tabs open in Firefox (Android) and it doesn’t suck up all of my phone’s ram (which only has 12GB). If your system is running less than 16GB, then that’s another matter and you really should add more, as 16GB is pretty much the baseline on computers these days.