Score:1

Firefox: "isolate+" process CPU usage 100%

bv flag

I have a completely new Ubuntu install with firefox. When browsing on my usual sites, I get over 100% CPU usage due to the process "isolate+". Google has been completely useless. I have tried to disable hardware acceleration in firefox, I have uninstalled the snap version and installed the .deb version. The only extension I have is ublock. OS: Ubuntu 22.04 Thinkpad T16, 16GB RAM, i7 1260P, NVidia MX550 (driver=nouveau)

This problem does not exist when I boot into Windows with the same device. (dual boot)

Please help me.

edit: The easiest way to reproduce this behaviour is to try lection 45 of "typing jungle (UK)" on edclub.com. (I'm trying to learn a new keyboard layout...) status after applying changes suggested by @Raffa

kanehekili avatar
zw flag
Try to install the native NVIDIA driver for the MX550 and start your session with X server, not Wayland (since that driver doesn't work well with NVIDIA) and report back.
Andrej H. avatar
bv flag
@kanehekili Thank you for your quick answer. Installing NVidia drivers 530 and 525(nvidia recommended this one on their site) and switching to xorg did not help whatsoever! It only disabled my touchpad driver for some reason.
David avatar
cn flag
Sounds like you got the drivers from the Nvidia site. It is recommended you use the ones from the Ubuntu site.
Andrej H. avatar
bv flag
@David No, I downloaded and installed the drivers using the built-in app "additional drivers"
Score:9
jp flag

About isolate+

Assuming you are seeing this in the top command interactive screen output in the terminal, the + sign means the string is shortened to fit in the current terminal window ... Expanding/maximizing the terminals window should reveal the rest of the process's command name string as Isolated Web Co which should actually be Isolated Web Content but the characters excess of 15 are disposed off as a result of the limit for the command field in /proc/{PID}/stat.

This is related to the new Firefox’s Site Isolation feature AKA Project Fission which seems to be enabled by default in the late versions of Firefox ... It involves using/utilizing GFX WebRender(a GPU-based 2D rendering engine) which relies on system driver/support for your GPU ... If you experience issues from that, then it's most likely a GPU driver/setting issue and you need to either update/change the driver to a more stable/tested/better one(if available) or change the GPU driver settings if that is an option e.g. NVIDIA optimus/hybrid cards to select a single active GPU for example.

Disabling this safety feature is not recommended for pure safety fail-safe reasons.

This feature, however, can be disabled in Firefox's configuration tab(about:config) by setting both the fission.autostart and gfx.webrender.all options to false and restarting Firefox afterwards.

About actuality

Other than that, you might find the following resource from Mozilla Support useful:

Firefox uses too much memory or CPU resources - How to fix

However, if you are assuming the Web Browser(Firefox, Chrome, ... etc.) is the only/default culprit in this interaction, then hold your horses ... Webpages are in fact a set of programmatic instructions/codes i.e. they are computer programs that are written/coded to interact with and use system resources e.g. CPU, GPU, memory, disk space ... etc. ... The fact they do so through a proxy(The Web Browser) in a somewhat controlled/isolated environment doesn't change what they actually are ... Therefore, like any other program, they can be useful/harmful, well written/coded or otherwise, system resources efficient or a resources hogging son of a web.

I have tested the mentioned example website in your question:

https://www.edclub.com/sportal/program-3/2945.play

on both Firefox and Google-Chrome Web Browsers and noticed unexpectedly high CPU/GPU usage similar to your numbers mentioned in your question(although Google-Chrome showed a bit less CPU usage (around 50%) as it's GPU utilization engine seemed a bit more efficient) ... I then manually inspected the source code of that web page to find out that they use a lot(more than I would normally expect in a web page) of code rendered scenes/views i.e. they paint the picture you see almost entirely from scratch using your computer's resources (Please don't take it as if I'm criticizing their code, but rather describing it) ... I then ran a standardized web analyzing tool(Lighthouse) and got the following results:

Therefore, the high load you see is normal ... It is the result of a rather intensive browser's web elements drawing/rendering process ... This will raise the CPU/GPU load/utilization for a short while at the initial scene drawing then settle down then spike again when new scene parts are drawn e.g. when moving the view … This is reflected in your system's load averages at 1, 5 and 15 minutes of 2.36, 1.20 and 0.80 respectively which falls within the normal expected average load on a modern(quad core CPU or more) desktop computer.

About discrepancy

Web browsers have two main components: UI and engine ... While UIs are highly portable and cause no discrepancy, engines are not portable and might cause discrepancy between different operating systems or even between different hardware.

Engines vary, performance-wise, depending on OS or hardware ... Some engines have better support/utilization for some OSs/hardware than others ... Therefore, the same web browser/web browser engine might and will show some discrepancy between different OSs or even between different hardware on the same OS.

About alternatives

  • You can tweak the engine configuration for your needs:

    For example, the rendering behavior of the Gecko engine in Firefox can be changed to e.g. enable WebGPU in about:cofig by setting(add any none-existing option) gfx.webrender.all, dom.webgpu.enabled, layers.gpu-process.enabled, layers.mlgpu.enabled, media.gpu-process-decoder and media.ffmpeg.vaapi.enabled to true … Then, restarting Firefox afterwards.

    Also, see this Ubuntu discourse topic about enabling hardware acceleration support for WebRender.

  • You can always install another browser with a different engine:

    As I mentioned above, after testing your example web-page, Google-Chrome showed less CPU usage than Firefox ... The reason as I see it is that the Blink engine used by Google-Chrome(and supposedly the Chromium browser family) seemed (On my system and probably will on your system as well) to offer better support/utilization for the GPU which in turn took much of the load for the rendering process off the CPU while the Gecko engine used by Firefox didn't seem to offer as such support/utilization for the same GPU which in turn put all/most of the rendering process on the CPU instead.

About GPU

Why blame GPU support when it's the CPU load that is high ... It's the CPU that's not doing its job flawlessly ... Can it be that the CPU support is the culprit?

No, f your CPU is not supported, then most likely you'd not have time/way to notice increased CPU load from a web content rendering process ... Trust me, you wouldn't have had a chance to install a web browser let alone launching and using one.

CPU support is foremost a 0 or 1 binary chance ... Nothing in between would be productively workable.

That said, a CPU(used to be AKA "micro-processor" long time ago when Earth was flat) is a actually a silicon-based(until now) micro-processor(s) chip ... Likewise, the GPU, RAID, Network, Encryption ... etc. have their own specialized and dedicated micro-processor(s) chips that are designed to do a certain job oftentimes more efficiently than the mighty CPU itself.

Can the CPU do everything alone? ... Sure, like old times when it was known as "the" micro-processor ... So computer's life goes on ... Hardware(Graphics acceleration, Network flow management, RAID management, Encryption ... etc.) done with separate specialized micro-processor(s) chips have an equivalent Software(Graphics acceleration, Network flow management, RAID management, Encryption ... etc.) done with the CPU.

Will the CPU load be the same in either case? ... No ... Will it at least be equivalent to the total load of those hardware chips? No, It will be much higher because those specialized chips are good at doing what they are made to do ... Take the GPU for example. It's made so that it handles many(much more than a CPU can) small processes in parallel(e.g. rendering thousands small parts of a picture/scene/view at the same time). The CPU on the other hand likes bigger processes with little threads/parts in parallel and will finish them faster than a GPU, but will choke on rendering the canvas/scene/view of a very complex web component.

Web Engines should prefer a GPU when rendering web content but will use the CPU when their transaction with a GPU fails ... Moreover, It can be hard for developers to add support for all the GPUs on multiple platforms/OSs ... So, for the most part, multi-platform browsers keep painting/rendering on the CPU as an easy portable/compatible alternative because CPUs have almost universal support on different OSs while GPUs don't ... i.e. It's common and normal to have computer users asking for a driver/support for a certain GPU on a certain OS, but how often do they ask for a driver to their CPU?

The reason CPUs are universally supported (apart from the obvious reasons that no OS can run on them without proper support) is their architectures are limited in variety and their working mechanisms i.e. addresses, bridges, buffers … etc. are standardized and they are backward compatible by nature … Other chips, however, are mostly not.

Andrej H. avatar
bv flag
Thanks for the answer. The drivers are updated. webrender.all was already set to false. I set fission.autostart to false and restarted firefox. Now it is no longer isolate+, but the process "Web Content" which causes over 85% cpu-usage. edit: even after sudo apt update and sudo apt upgrade + system restart.
Raffa avatar
jp flag
@ahermann Now that your CPU usage is down to around 85%, I would consider the normal Firefox Mozilla recommended troubleshooting procedure linked in my updated answer.
Andrej H. avatar
bv flag
Oh, sorry for the miscommunication, the overall CPU usage is at 140%, it's just that "Web Content" was the highest offender. All of them are firefox based though.
Andrej H. avatar
bv flag
I added a screenshot showing the current state as given by the command top
Raffa avatar
jp flag
@ahermann I updated the answer respectively ... I hope you find it useful.
Andrej H. avatar
bv flag
Thank you very much for this answer. Though for some reason, I do not observe the same behaviour in Windows. Even with firefox. Which is exactly why I'm so puzzled. During this lecture, the spike only gets worse (probably exacerbated by the T16's rather poor cooling capabilities, as an offices oriented laptop). Soo, while the site is heavy, the discrepancy to windows is enormous. In windows, at the same lecture, my CPU is around 30%, and it doesn't start to lag.
Andrej H. avatar
bv flag
I'm very sorry, but the troubleshooting page was less then helpful. This is a fresh Ubuntu install, with no additional programs running in the background (minimal install), updated drivers, I tried two different firefox versions (snap and non-snap), .... something's going wrong on the Linux side of things. Either it's a driver issue with my integrated graphics, a driver issue with the mx550, or a Linus issue.
Raffa avatar
jp flag
@ahermann Underneath the hood, things are not as simple and identical as they appear ... It's complicated :-) ... I tried to explain more and updated the answer ... Please feel free to ask for more explanation when you need it.
Andrej H. avatar
bv flag
Sooo... I've tried your suggestions and now my CPU actually reached 800% usage upon just opening the site and when I tried to open the lecture, firefox crashed. I do not actually want to try out a new browser, I like firefox and it works perfectly on windows, so changing values to different ones does not really make sense to me, it works with the default values on windows. (And actually on my other Ubuntu installs)
Andrej H. avatar
bv flag
I also have similar spikes while using google maps, or while doing simple operations in jupyter-lab.
Raffa avatar
jp flag
@ahermann It seems your GPU doesn't rhyme with Firefox under Ubuntu ... The culprit is GPU support ... While this might get fixed with future system/Firefox updates, I can't think of a straight to the point advice regarding currently fixing Firefox other than "WebGpu"(*which may work better with hardware acceleration enabled*) and that sadly didn't work for you ... AFAIK that's all there is to do.
Andrej H. avatar
bv flag
wait... why isn't the GPU at fault? It's the CPU usage that doesn't let me work... and an i7 1260p should easily be able to handle those sites with integrated graphics.
Raffa avatar
jp flag
@ahermann I have updated the answer for that ... And integrated graphics is still considered a GPU that needs support and driver though.
Andrej H. avatar
bv flag
Sorry, but your last update sounds more like you are talking to a retarded child. I'm not that dumb. Afaik, Ubuntu has excellent support for intel integrated graphics. And, again, I do not have any troubles if I use the laptop with Windows. We're talking about a 12th gen i7 with sufficient cooling and you're talking to me like I'm the idiot for thinking it should be able to handle a website with some animations. Are you seriously arguing that it's normal to have massive lag when changing to satellite view in google maps????
Raffa avatar
jp flag
@ahermann OOOOH ... Please No, ... Hold your horses ... Don't misunderstand me please ... You (*and everyone else who reads my post*) have my **full respect** ... I'm here to help and not to show off ... In fact I honestly consider you spending time to read my answer as an honor ... The problem with written language is it lacks the tone and the facial expressions as well as it's limited even in verbosity ... I respect the readers and include only the most accurate information to my knowledge and try not to keep anything back ...
Raffa avatar
jp flag
@ahermann My writing style is the best I know in English language which is not my native language and my knowledge is limited like everyone else ... It's just I like to help and not impose my point of you on anybody ... So please don't try to impose your point of view on me ... Most contributes here (myself included) are highly skilled professionals that are very well paid elsewhere ... The only reason we are here as volunteers is to try and help others for free as much as we can in our free time ... As we believe knowledge is a gift that must be given back in the most humble way :-)
Raffa avatar
jp flag
@ahermann Simply put ... The information in my answer is the best I know on that subject and I'm sharing it... If you know better, please share and teach me and will be very grateful to you ... This site is peer-reviewed as well and anyone including you can post an answer next to mine to describe things better ... I happily accept constructive criticism as well with a smile ... Think of it this way ... Instead of me giving(*information/knowledge*) all the time, I would love it if someone corrects me so I walk away with new information and believe me it has happened and happens and I like it.
Raffa avatar
jp flag
@ahermann We help each other ... This is the main motive here ... So, please be kind to me and smile :-) ... If my solution worked for you then that is the whole point behind all this and everyone is happy ... If, however, it didn't work for you then it might help somebody else ... And someone in the future might post an answer that works for you ... I also try not to answer with information that I don't know very well out of respect to the asker ... We, however, might be of different technical backgrounds so what is clear to you might not be as clear to me and vice versa :-) keep this in mind
Raffa avatar
jp flag
@ahermann I edited the answer and improved my style a bit to remove words that I think might have offended you and are not technical ... I hope I did well :-)
Andrej H. avatar
bv flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/145819/discussion-between-ahermann-and-raffa).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.