Skip to main content

Neither #Firefox nor #Chrome seem to be made for users who keep their browser running for several days without a restart.

Firefox just now: 12GB RAM usage.
After restart and reloading all previous tabs: 2GB RAM usage.

Either that's a huge memory leak or I just don't understand what it's caching there.

@fribbledom I refuse to believe its not a memory leak. The browsers of past never had this issue. Edge doesn't even have this issue (as far as I know)

More needs to be done. it's effect is widespread with users.


Why any browser would need 2GB of RAM usage to display at most a few MB of markup + images per page is completely beyond me. Do you have 1000 tabs open at once? Did you preload an entire 1080p feature film into RAM? Seriously WTF!! It happens to me too, even with only a few tabs and mild browsing for half the day. I just don't fucking get it.

@museus Nope, 37 tabs here. I just counted 😆

@fribbledom endlessly scrolling through feeds achieves this for me. Mastodon in particular often the culprit in my own experience. How many tabs you got open when hitting this level of RAM churn? Potential bug report in this!

I'm fully aware that all those "websites with their JavaScript" may harm my memory footprint, too... but then I'd absolutely expect reloading Mastodon, GMail or TweetDeck tabs to release some of my memory. It just doesn't.

@fribbledom My Chrome for Linux has been open for weeks. System says Chrome is using ~3GB, looking at Chrome Task Manager that is almost entirely Google Drive (1.6GB) and the AdBlock extension (1.1GB). Seems Chrome itself is OK, but certain web applications are horrific.

@fribbledom Could be a memory leak, could be not-quite-the-same-thing, just not giving memory back to the OS.

@fribbledom I have the same issue. the standard web browsers are horrible resource hogs. if you track power usage, you'll see the browser is constantly hitting the CPU too.

basically, at this point they're badly written operating systems. they don't use OS resource management, they re-create all of that themselves, poorly. oh and for some reason also ship with full-featured IDEs even though most users aren't developing web sites?

@fribbledom I think usually apps (i. e. your browser in this case) release memory lazily (by some signal by the OS I think? can't seem to remember) when other processes need it. So you won't see it in the statistic immediately unless you open something that allocates really much memory. E. g. MacOS used to show this percentage of memory as »reserved« and in blue back in the day, I think.

The memory is the info their stealing from you as you use the browser

@fribbledom malloc on many systems is extremely conservative and almost never gives memory back to the OS. Try to get some stats from the allocator instead. It might just be hoarding free’d memory.

@fribbledom have a look at `about:cache` next time is gets bad, there's also `about:memory` which shows memory usage per process and should help you figure out if its an extension or a particular website.

@Anke I don't keep it running overnight, that'd be indeed silly and wasteful. I just let it sleep / hibernate.

@fribbledom yeah i frequently run into the hundreds of tabs.

never gets above 6.5gb and if it does, I kill it.

@fribbledom strange... Been keeping firefox up for about a month and have it used up to 4-5 GiBs of RAM. Maybe it depends on machine specs you are running, e.g. on RAM or else?

@fribbledom I should compare but the last few days I’ve been using windows apps for as much as I can instead of using the browser. (I need to track down the privacy policies for those though in case they’re worse)

@fribbledom p sure all browsers have an enormous memory leak by now. i haven't tried one lately that didn't.

@fribbledom you trigger the memory growth by rapidly opening and closing a single tab. I wondered if this was a result of caching recent tabs, but it actually persists even if you simply open and close one.

@vinzv Yeah, I do get similar numbers after a fresh start. It's another story after a couple days, though... sometimes after just a few hours.

@fribbledom that's nuts. I keep Firefox running all the time with a ridiculous number of tabs. Currently using about 500mb

@fribbledom OK cool. Same as me in this case. Leave this with me and I will report back if I spot something helpful or decide we should escalate to a bug.

@zyx Wow, thank you for all the constructive support!

@fribbledom Mozilla told me they'd only be able to fix it by destroying the entire third-party addon ecosystem. It doesn't look fixed to me…

@fribbledom @zyx AFAIR, I once read something that the browsers don't release memory they have reserved in the past to be able to reuse it faster in the future. Or something like that...

Avertissement de contenu: browsers & memory usage

@fribbledom Firefox is even worse than Chrome at that. I want to recommend it to more people, but it’s a memory leak with an icon.

@fribbledom I think they both have an internal memory allocation pool and they never return it all to the OS. I'm not even sure if Firefox uses glibc malloc or if they ship their own.

@fribbledom @vascorsd What if you keep using Firefox for a few more day? Will it be killed by OOM?

@fribbledom @vascorsd It sounds like mem leak than cache. 😅

@fribbledom Close slack, visit about:memory, minimize memory usage button. Will cause Firefox to release free memory back to OS. Results of variable usefulness.