1

I'm here to ask why my firefox is sucking up so much resources from my pc: how can I see what's going on under the hood?

Firefox situation:

  • 1 open tab, with youtube playing some music
  • extensions: ABP adblock plus, Https everywhere
  • logged into firefox account

Screenshot

  • 4
    615MB isn't that bad these days considering all the graphics, video and text effects used by even the most basic modern webpage. Mine is regularly pushing twice that amount. – Mokubai Jun 12 at 15:00
  • But there are more processes other than that one! It's consuming more than 1G – Kodeeo Jun 12 at 15:27
  • Ah, and that is a side effect of the browser trying to speed up all the things I detailed in my answer. Firefox Quantum uses multiple processes to handle downloading, page processing, video handling and graphics card rendering. Chrome and other modern browsers all use similar methods. The media-rich web and resulting large browser requirements are why 4GB is no longer considered enough for the normal use and is only recommended for "light" use. – Mokubai Jun 12 at 15:32
  • To follow up @Kodeeo: I run FF with 4-6 tabs: Google news, Quora, StackOverflow and some random other page. I see 11 firefox processes with Virtual Size of 2.5G to 3.5Gb. None of those first 3 pages are really disgustingly laden with videos; they look pretty simple compared to most of the internet. So... 30Gb of buffering? That's insane. Sure doesn't work well on my machine with 6Gb physical RAM. – Ira Baxter Sep 10 at 21:26
6

Playing video and showing a "simple" webpage is not as easy as you think it is.

YouTube in particular is a pretty demanding webpage.

  • it is highly dynamic, with several large sections of comments (which are expandable and contain sub menus and dynamically appearing "add comment" boxes)
  • it has a large area of "suggested" videos, all of which equate to yet another image for the browser to load and show to you.
  • it can have video of several different types in the main area and needs to be able to play hevc, h.264, webm and some others. All of these need some program within your browser to play as well as associated buffers to download and pass data to your graphics card. If your graphics card lacks hardware video decoding for the format selected then the browser must decode the video itself and use a lot more memory.
  • the webpage does not fully unload when you navigate within the site, it has a lot of dynamic self management and navigation going on.
  • there are several (tens, if not more) pieces of javascript running doing everything from handling mouse events to advertising tracking and more.
  • all of the data you see has to be handled by the browser and processed in some way before handing over to your graphics card.
  • the webpage is designed to be used on resolutions all the way from 1280*720 up to the newest 4k and 8k resolutions and will either load larger resolution elements or rely on raster images (which equates to yet another format to decode and be able to view - more code and buffers)
  • YouTube also uses code to check your speed and might start with a lower quality stream and pre-buffer a high quality stream once it can see the connection speed is up to it or vice versa. This is yet more downloading and buffering of potentially larger amounts of data for the same amount of video.

All of this means libraries that do lots of work with lots of elements. All those elements take up RAM to track, to buffer their data and to handle.

In this way a modern browser is much more of a container or host for web-applications. The web is no longer "just" text and pictures and your browser is effectively a whole web "operating system" that handles all the display and running of web "programs".

Even Edge, Microsoft's vaunted "efficient" web browser, chews up upwards of 1GB of RAM to view just SuperUser and YouTube on machines I have used.

Because of all this work that a modern browser has to do just to show a webpage there has been a large amount of effort to make it faster and, while they were at it, more reliable and more secure.

Firefox Quantum is Mozilla's answer and it uses multiple processes to handle downloading, page processing, video handling and graphics card rendering. Chrome and other modern browsers all use similar methods. The downside is that there is some level of "bloat" in duplicated memory structures and necessary inter-process communication.

The media-rich web and resulting large browser requirements are why 4GB is no longer considered enough for the normal use and is only recommended for "light" use. 

  • Thank you. I could have tought about it, so listening music from youtube it's not a power-wise habit! – Kodeeo Jun 12 at 15:28
  • 3
    Not really, no. Dedicated programs for playing music will be a lot smaller and more efficient both in terms of power and memory use. Even a video player like VLC would be better as it doesn't have to handle a lot of the web related issues and can load just what it needs to play the current things. – Mokubai Jun 12 at 15:33
  • @Kodeeo As an example, My Firefox under normal use, with far too many tabs and some bits going vs VLC playing full HD video: i.stack.imgur.com/cZfc0.png – Mokubai Jun 12 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.