Too much RAM Consumption
What happened?
I've been using Zen Browser since yesterday and I've noticed that it's consuming unusually high amount of RAM. Almost 3GB ram on my 8GB M1 Air.
Reproducible?
- [X] I have checked that this issue cannot be reproduced on Mozilla Firefox.
Version
1.0.0-a.28
Severity impact
Medium
What platform are you seeing the problem on?
macOS - aarch64
Relevant log output
No response
Facing a similar issue on an 8GB M2 Macbook Air, Zen is using around 800MB of memory on a fresh open with only one DuckDuckGo tab open:
@thrzl how much memory does stock Firefox use on your device with one tab open?
@thrzl how much memory does stock Firefox use on your device with one tab open?
not more than 1GB
@thrzl how much memory does stock Firefox use on your device with one tab open?
Firefox actually also uses 800MB, and as more tabs are added, Firefox actually uses more ram than Zen. I was unaware that Firefox itself used this much memory.
As a workaround I've installed Auto Tab Discard which helps a bit, but this still is preventing me fom using this browser as much as I'd like to.
Yeah this is a lot, I usually observe Firefox use max of 2GB with more tabs than I have right now.
A single Twitch stream tab hogs 2GB.
Hey @mauro-balades
Can this be a kind of memory leak? my brother (the guy that we play overwatch with) reports this happens to him when he leaves Zen open all night, it reaches 5000mb.
But if he closes it and opens it again it gets back to normal (300mb)
Also had the same issue and it seems that Zen does not really close tabs nor minimize their consumption of RAM while being inactive or even closed. Also, on a clean open with only github opened, firefox uses 190MB whereas Zen uses more than 350MB and more CPU usage.
It is sad because Zen looked like a great alternative, and as @IAmJafeth proposed, it is probably a memory leak or lack of limit on inactive tabs but I hope it will be fixed soon.
Got same issue, I have 8 GB of RAM and have 4 workspaces (including default) and it consumes +4 GB. I think this browser still doesn't have a tab sleeper, just like Brave.
What does about:processes and about:memory show?
For me, after a few hours of browsing and an in-browser Zoom meeting:
about:memory memory report: memory-report.json
about:processes:
@thrzl The single most memory consuming process from your report is web extensions:
{
"process": "WebExtensions (pid 48502)",
"path": "vsize",
"kind": 2,
"units": 0,
"amount": 440066981888,
"description": "Memory mapped by the process, including code and data segments, the heap, thread stacks, memory explicitly mapped by the process via mmap and similar operations, and memory shared with other processes. This is the vsize figure as reported by 'top' and 'ps'. This figure is of limited use on Mac, where processes share huge amounts of memory with one another. But even on other operating systems, 'resident' is a much better measure of the memory resources used by the process."
}
Over time - the memory use seems to grow. It got to the point of having a memory footprint of 40GB, after a few hours. This happened twice so far - and both times had only a handful of tabs with static content, and only 1 extension (bitwarden)
Does it help when you go to about:memory and click Minimize memory usage? Or when you install Auto Tab Discard add-on?
@thrzl The single most memory consuming process from your report is web extensions:
{ "process": "WebExtensions (pid 48502)", "path": "vsize", "kind": 2, "units": 0, "amount": 440066981888, "description": "Memory mapped by the process, including code and data segments, the heap, thread stacks, memory explicitly mapped by the process via mmap and similar operations, and memory shared with other processes. This is the vsize figure as reported by 'top' and 'ps'. This figure is of limited use on Mac, where processes share huge amounts of memory with one another. But even on other operating systems, 'resident' is a much better measure of the memory resources used by the process." }
This itself is questionable, as the only extensions I have are uBlock Origin, Auto Tab Discard, and an au2001's iCloud Keychain extension.
I also wanted to ask what unit the memory usage is being measured in here?
At least on my end - it's definitely part of the main process rather than one of the individual tabs:
Main Process (pid 22568)
Explicit Allocations
24,112.50 MB (100.0%) -- explicit
├──23,704.16 MB (98.31%) -- js-non-window
│ ├──23,347.38 MB (96.83%) -- zones
│ │ ├──23,336.88 MB (96.78%) -- zone(0x12306de00)
│ │ │ ├──22,966.69 MB (95.25%) -- strings
│ │ │ │ ├──22,926.52 MB (95.08%) -- string(length=333802, copies=22926, "First Name,Last Name,," (truncated))
│ │ │ │ │ ├──22,926.00 MB (95.08%) ── malloc-heap/two-byte
│ │ │ │ │ └───────0.52 MB (00.00%) ── gc-heap/two-byte
│ │ │ │ └──────40.16 MB (00.17%) ++ (106 tiny)
│ │ │ └─────370.19 MB (01.54%) ++ (26 tiny)
│ │ └──────10.50 MB (00.04%) ++ (2 tiny)
│ ├─────303.96 MB (01.26%) ++ gc-heap
│ └──────52.83 MB (00.22%) ++ (3 tiny)
└─────408.34 MB (01.69%) ++ (34 tiny)
Other Measurements
23,213.30 MB (100.0%) -- decommitted
├──23,196.80 MB (99.93%) -- heap
│ ├──23,038.01 MB (99.24%) ── decommitted
│ └─────158.80 MB (00.68%) ++ unused-pages
└──────16.50 MB (00.07%) ++ (2 tiny)
(this is for my currently running process - which hasn't gotten to the crashing point yet - and the total is much higher than if you add all the tabs).
@lee-orr What is this string(length=333802, copies=22926, "First Name,Last Name,Office/Title..." (truncated))?
@lee-orr What is this `string(length=333802, copies=22926, "First Name,Last Name,Office/Title..." (truncated))
One of the tabs I had open had a csv in a text editor - strange that it ended up so large since the csv was just sitting open. I'll investigate this further in case it's an issue with that web page, and see if the memory issue occurs without that page.
Yep, it's a memory leak, and like stated above, one process is responsible for it, but according to my diagnosing (might be limited to the windows build), not the extensions, but rather streaming/video platforms.
Before garbage collection? (Yt tab open)
After garbage collection? (Yt tab open)
it seems to be reaching up to 5gb of ram and then garbage collecting/clearing cached media, might be issues with streaming services.
Closed the YouTube tab then let it reach 5gb and garbage collect
after this last memory collection the memory stays stable @ 1gb on 3 tabs.
Probable source:
@AtTheZenith What does about:memory report? What if you open Zen in safe mode? (press and hold the Shift key and launch Zen)
@AtTheZenith What does
about:memoryreport? What if you open Zen in safe mode? (press and hold the Shift key and launch Zen)
1.2gb ram usage (in safe mode) under normal workload, and surprisingly, i can't reproduce it anymore, 1.6gb ram in a normal window under normal workload, i can live with this.
note: by garbage collection i assumed the browser had a garbage collector doing its thing.
In my case, high memory consumption comes mainly from pinned tabs and Sidebar panels, which it would seem are never unloaded e.g. Meta's Messenger consumes about 300MB of RAM.
As @thrzl mentioned, Auto Tab Discard definitely helps here. For now, the best workaround I found was adding such memory intensive websites to Immediately discard the following hostnames when their tab is not active domain list.
I also noticed this extension does not work with Zen Sidebar panels, which are also kept in memory
i forgot to mention task killing the memory intensive program (that was consuming 3 out of 5 gb) kills my youtube tab
and @MariuszGaljanVT your hypothesis of it being pinned tab is valid, youtube for me hogs this much only when i have it pinned
agreed, i have 16gb, when i let zen open and load thee moodle tabs is goes to 8gb of ram, it just crashed my whole system, needed to hard poweroff if, using the flatpak on ubuntu 24.04.01
At work, I have a machine with 32GB that was topped up while using Zen for some hours. Checking the System Monitor, there was one "Isolated Web Co" consuming over 20GB! I just installed it yesterday and was browsing the same webpages I used in Chrome, and with the same extensions I have installed and in sync with Firefox.
From what I've heard in their Discord server, this is normal behavior, and memory usage will decrease if you have more processes open:
As for macOS though, it seems like a Firefox thing, I've experienced the same on that browser too so it's most likely not a Zen issue (MacBook Air M1)
From what I've heard in their Discord server, this is normal behavior, and memory usage will decrease if you have more processes open:
![]()
As for macOS though, it seems like a Firefox thing, I've experienced the same on that browser too so it's most likely not a Zen issue (MacBook Air M1)
In my case, it consumed so much RAM that vscode crashed for lack of memory
This is the memory usage on my Macbook (36 GB Ram)
- Zen has only 1 tab (Youtube video)
- Chrome has 13 tabs (1 Youtube video)
I often see meme about Chrome eating too much Ram, but now I see that Zen browser is eating even more
@piavgh What does about:processes show?
@piavgh What does
about:processesshow?
@niutech : how to navigate to that menu? I don't see about:processes anywhere
