Skip to content
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

High CPU usage #572

Open
ibahnasy opened this issue Jun 5, 2017 · 26 comments
Open

High CPU usage #572

ibahnasy opened this issue Jun 5, 2017 · 26 comments
Labels
bug Something is broken! Needs: Testing Needs more investigation

Comments

@ibahnasy
Copy link

ibahnasy commented Jun 5, 2017

Firefox process is consuming about 50% of CPU only when this extension is enabled.

┆Issue is synchronized with this Jira Task

@jonathanKingston
Copy link
Contributor

jonathanKingston commented Jun 5, 2017 via email

@jonathanKingston jonathanKingston added the Needs: Testing Needs more investigation label Jun 5, 2017
@ibahnasy
Copy link
Author

ibahnasy commented Jun 5, 2017

FF 53.0.3 (64-bit) on Arch Linux but I'm sorry I cannot paste the whole output of about:support so if you want to check for specific value please let me know.
What happens is that FF starts and I open an empty container and the CPU usage is still fine at this point; once I open a website (tested google.com) in the container, then CPU usage average is 25%.
If I closed the container it goes back to the normal.

@jonathanKingston
Copy link
Contributor

@bakulf could this have anything to do with the Photon bug that @kjozwiak mentioned in out latest meeting? I don't have the bug id to see if it is relevant at all. However this isn't the first report on increased CPU usage.

I suspect the increase in messaging whilst removing some of the SDK code would likely add some overhead and perhaps web extensions might be a little more CPU but I wouldn't expect from one tab to have this level of measurable increase at all.

@ibahnasy
Copy link
Author

ibahnasy commented Jun 9, 2017

I removed ~/.mozilla and re-installed the extension and now all seems to be working very well.
Might be Firefox caching issue.

@kjozwiak
Copy link

kjozwiak commented Jun 9, 2017

@bakulf could this have anything to do with the Photon bug that @kjozwiak mentioned in out latest meeting? I don't have the bug id to see if it is relevant at all. However this isn't the first report on increased CPU usage.

Bug#1369761 which was related to the ContextualIdentityService not being initialized before the first paint.

I loaded several websites within containers and non-containers using Win 10 x64 and Ububtu 16.04.2 x64 but I didn't really notice significant increases in average CPU usage. As @ibahnasy mentioned above, perhaps it's more evident when you have more data cached? I'll keep an eye on CPU usages on my personal machine that's running the container experiment which has a profile that's pretty old with lots of data.

@jonathanKingston
Copy link
Contributor

@kjozwiak well currently debugging cache is hard due to this I guess: https://bugzilla.mozilla.org/show_bug.cgi?id=1372103

@kjozwiak
Copy link

@kjozwiak well currently debugging cache is hard due to this I guess: https://bugzilla.mozilla.org/show_bug.cgi?id=1372103

When I was originally testing the m-c implementation of containers, I ran into this several times as it was really difficult to debug cache issues when it came to container related problems. I asked if we could add some userContextId information into about:cache but I never ended up creating the bug :/

@jonathanKingston
Copy link
Contributor

@kjozwiak no worries at least it was captured.

@benselme
Copy link

benselme commented Nov 9, 2017

Same thing here. This extension pins one of my cores to 100% several times a day. Firefox 56.0 on Linux Mint 18.

@mimischi
Copy link

mimischi commented Apr 5, 2018

I've also been noticing high CPU usage from Firefox. Running the most recent version 59.0.2 (64-bit) with i3wm. Closing all windows, thus making sure to close all existing processes, and re-opening solves the problem.

I'm usually running several windows in different workspaces and have them open for days straight, sometimes restarting my machine and re-opening Firefox while restoring the previous session. This means I sometimes run dozens of inactive tabs, some of them in their own respective containers.

If I can help debug this in anyway, I'd be willing to help!

$ uname -a
Linux Michaels-T460s 4.15.14-1-ARCH #1 SMP PREEMPT Wed Mar 28 17:34:29 UTC 2018 x86_64 GNU/Linux

@mimischi
Copy link

mimischi commented Aug 8, 2018

As a current workaround, I installed Auto Tab Discard. It suspends tabs that are unused for several minutes.

I've been using it for 1-2 weeks and haven't experienced the previous problems.

@kendallcorner kendallcorner added the bug Something is broken! label Dec 5, 2019
@caputchinefrobles
Copy link

I don't know if it helps but it's still happening while firefox 73.0b11 (developer) on linux (arch). All cores gets 100% cpu and as soon as I disable the extension it drops by less than 10% depending on what kind of page I'm visiting. I really like this addon, but this bug is making me drop its usage on my laptop. In my workstation it doesnt seem to happen, or at least I dont notice due to a much more capable cpu.

@Darth-Falcon
Copy link

Darth-Falcon commented Mar 9, 2020

This problem just started for me today. On two separate machines CPU usage was near 100%, and the firefox task manager showed it was the multi container extension. As soon as I disabled the extension the CPU usage went away. Right before this happens I would try to open a tab that should open in container X, but instead opens in container Y. I then have to uncheck the always open in Y and recheck to always open in X. Running Firefox 73.0.1 on Zorin OS (linux) and Firefox Portable 73.0.1 on Windows 10.

@tibu
Copy link

tibu commented Mar 31, 2020

SImilar happening with me on Win10, Firefox 75.0b6 (64 bit), extension version 6.2.3.

@om23
Copy link

om23 commented Apr 15, 2020

Just started seeing this recently on Ubuntu 19.10 running Firefox 75.0 (64 bit), extension version 6.2.5.

Have high CPU usage from Firefox, when checking about:performance the multi-account-container add-on shows as Medium or High energy impact and 700-800 MB memory usage.

I've only started seeing this in the past 2-3 days. Have about 3-4 windows open with 20-30 tabs total. Have auto-syncing enabled for the add-on, its creating an (what looks like) infinite amount of "Work" and "Banking" containers even though I've deleted them on all my devices.

Update: After closing Firefox, all the windows did not restore when reopening (nor showed in history). Only two of the more recent ones did. I cleared out the containers of repeated instances and it seems to be running okay now, not seeing any high CPU or memory usage.

@barakreif
Copy link

barakreif commented Apr 17, 2020

Same, I'll be happy to contribute any type of profiling/re-pro if it helps (let me know what is needed).

image

image

@ergosteur
Copy link

Seeing the same on Ubuntu 20.04 and Windows 10, with Firefox 76.0.1 and add-on version 6.2.5. Also seeing a constant 15-20MB/s disk I/O on both platforms. Disabling the extension immediately drops CPU and disk I/O back to idle levels. Open to direction for further testing if it can be helpful.
image

@cstrzelc
Copy link

cstrzelc commented Jul 12, 2020

Same happening on MAC OSX, seeing intermittent high CPU where multi-account containers takes 100% of the CPU for minutes at a time. Firefox 68.8.0esr OSX 10.14.6, plugin version: 7.0.0

@Vittfarne
Copy link

Got hit with this a while back too, just found this on Reddit that suggest turning Sync off:
https://www.reddit.com/r/firefox/comments/i9ddc1/cpumemory_skyrocketed_maybe_due_to_multi_account/g2aczc4/

@gaul
Copy link

gaul commented Nov 1, 2020

I just experienced this with 82.0.2. Disabling and re-enabling the addon resolved my symptoms.

@gaul
Copy link

gaul commented Nov 3, 2020

One possible clue: I have many temporary containers of the form tmp123 from the Temporary Container addon. These show up in the multi-account containers list although do not exist on the other device.

@mrwm
Copy link

mrwm commented Nov 11, 2020

I made a firefox profile capture here: https://share.firefox.dev/32xy8dT

Disabling and re-enabling the extension temporarily clears the memory usage, and speeds firefox back up again.

@grahamperrin
Copy link

share.firefox.dev/32xy8dT

– Firefox 84, thanks.

Is this still an issue with (release) 88, or 89?

@mrwm
Copy link

mrwm commented Apr 23, 2021

I've disabled sync to get around this + the container cloning issue. Will test and report back in a few days after re-enabling sync.

@mrwm
Copy link

mrwm commented Apr 26, 2021

After enabling sync I got a spike in CPU and a flood of cloned containers. Replacing containers.jsonin the profile folder with backup, and relaunching firefox, I don't see any more cloned containers (yet) nor high CPU usage.

Not sure if it's normal, since I didn't observe my memory usage before enabling sync, but memory usage hovers at around 600-800Mb with a couple tabs ~5-7 tabs of reddit, email, youtube (both in and not in containers). No high CPU usage, nor slowdowns observed.

I observed the same thing with both firefox nightly 90.0a1 (2021-04-24) -> 90.0a1 (2021-04-26), and 88 on linux.


TL;DR: Huge cpu spike after enabling sync, along with flood of thousands of cloned containers. No other high CPU usages observed.


I'm still going to keep sync off though, since I'm still stuck with thousands of cloned containers with no end in sight.

@jsamr
Copy link

jsamr commented Jun 7, 2021

Pretty insane CPU usage from this extension:
image

image

5-10% of CPU on average and 38 threads for 5 open tabs; I first wondered if one of my extensions was mining bitcoins? I have only 5 containers (sync is enabled).

This CPU usage causes the UI to be laggy at times, with 500 to 1000ms delays when typing. Happens on bursts.

Remarks: I first noticed the issue after upgrading to Firefox 89.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken! Needs: Testing Needs more investigation
Projects
None yet
Development

No branches or pull requests