-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ublock origin uses 26.6gb of memory on firefox #994
Comments
Is this "Virtual memory" by any chance? If "yes", then it's just how Firefox is handling WASM code. Nothing to worry about as this is only address space reservation. |
The problem is that everything gets laggy when this happens. The only way I can run without the whole system lagging is if I disable ublock origin (with ublock disabled, VIRT is at 1500 or so on a fresh launch). |
Any chance you somehow ended-up on 32bit system? (Ubuntu 18.04 is released as 64bit, but there are some ways for 32bit install). |
Addressable memory usage is not physical memory usage. You need to detail how you measured Firefox's memory usage. I get 4.8 MB on my side as per
This is an extraordinary claim and requires actual evidence, use https://profiler.firefox.com/ to make the case that uBO is your issue. |
I will try this profiler some other day (never used, so afraid of sharing the profile without understanding what data it contains), good tip. And my first time over here, so my thanks for uBlock Origin 🎉 Today I decided to have a look at the virtual memory of firefox. I have the exact same case. Normally upon launch, or if I edit lists I have: Then after a while: But I came here, and searching for memory in the issues found this one, because I went to Without uBlock Origin: After re-enabling uBlock Origin: Looking at But when I disable it, then it gets the same amount as the other 3 processes (Main process, Web content, and another web content). I am not super concerned about virtual size, as it may grow for many different reasons (application allocated, externally dynamically loaded libraries, etc), but I feel like whenever my system starts to get a bit slow, or the fan is going a bit crazy after watching 1 youtube video while looking at 1 or 2 github issues in other tabs, after I close the browser then open again, and reload the video and tabs, it seems to perform a bit better (though normally I would have navigated to hacker news, company e-mail, stack overflow, news sites, etc, so could be from previous used tabs perhaps too?). Anyway, just thought it would be useful to report my case too, in case it ever gets re-opened or another issue is created 👍 I am not sure if this is a problem with uBlock. I am working on a software that is replacing an old GUI. The new system is written in Python, and started quite small, but suddenly it started using a lot of virtual memory. Later we found out it was due to libraries loaded by modules (especially protobuf and zeromq). I think what would be useful, is a note maybe in the docs explaining why this is normal to expect when installing uBlock Origin, and could prevent further issues like this. Thanks ps: another think I tested, was opening ps2: to clarify, I feel like the browser gets slower, but there is no indicationg that it's because of uBlock Origin. It would still be helpful to know that that amount of virtual memory is expected, and maybe know the reason too :) |
It's just virtual memory -- it's merely addressable space, nothing to do with physical memory. The high addressable space is just the result of loading WASM modules. At launch uBO loads a lz4 decompression module, which is then unloaded afterward, hence addressable space will be a bit lower after launch. Nothing in this thread shows any performance issue. |
What does Virtual memory size in top mean?:
|
Thanks for the explanation! |
By the way, you can prevent uBO from using WASM by toggling advanced setting |
That reduced the virtual memory to 2GB. Not sure if anything discussed here deserves going to the readme or some other doc. I suspect most users won't really care about it. Thanks @gorhill ! |
It's not something that's recommeded as disabling WebAssembly also disables WASM based functionality in uBO. |
And that also made uBO less performant since now it has to use JS instead of WASM, and nothing was gained since only addressable space was consumed, completely unrelated to physical memory usage. |
"Virtual Memory is not Physical Memory" - this is splitting hairs. When the "extensions" field in uBO is a useful and very necessary tool -- why wouldn't you make efforts to optimize its speed and memory usage? I think it should be a design goal to never exceed 150MB of memory usage with the default blacklists / settings while idling. I think 150MB is more than reasonable. Ulysses by James Joyce only takes up a generous estimate of 1.3 MB of space. Surely uBO can do its job with an amount of memory equivalent to 100 of these: |
Excerpt from README file:
Do not add pointless comments here, the issue is closed. If you have profiling data supporting your claims, open a new issue with these. |
Prerequisites
Description
Ublock origin uses TONS of memory. I have no custom settings, and have tried resetting to defaults and starting a fresh profile. Upon launch it uses 32gb of memory, and then settles down to 26.6gb if ublock is enabled.
A specific URL where the issue occurs
about:blank
Steps to Reproduce
Start firefox
Expected behavior:
Normal memory usage (2.5gb or so)
Actual behavior:
Firefox's memory usage jumps to 26gb
Your environment
The text was updated successfully, but these errors were encountered: