4

Once in a while, firefox starts using 100% of one of my CPUs. The fact is that I may have 50 tabs opened. Looking at the output of htop I can see that one particular tab is generating the problem. Most others are either at 0% or at least under 5%, but one will be over 100%.

So with htop I know which tab process, but how could I translate that PID into a tab name or URL? Is there an easy way? Or maybe a plugin I could install in Firefox which would be similar to htop but show the info on a per tab basis (opposed to Linux processes as in htop).

To find the process with htop:

  1. I hit F4 and enter "firefox" so only firefox processes and threads appear.
  2. I hit F5 to see the list of threads
  3. I ignore the main process which is a total of all the others and search for the one process which specifically has 100% CPU usage

I looked at the parameters on the command line, all the parameters look the same for all the different processes so that part doesn't help at all.

enter image description here

(Click on the picture to enlarge, easier to read!)

P.S. I'm under Ubuntu 18.04 using the default Gnome environment, although I have had such problems on all versions, so that should have nothing to do however the solution may only work on newer systems, which would be fine too.

  • 2
  • Wow! You should write an answer about the about:performance, that's 1,000× better than I've been dreaming of having in my browser! :-) – Alexis Wilke Mar 27 at 21:00
  • There's absolutely no reason to have 50 tabs open in any browser. Really. That's crazy! Create some bookmark folders in your Bookmarks Toolbar. Stuff'm full of bookmarks. Close 40+ tabs. Be happy. – heynnema Mar 28 at 0:10
  • @heynnema I have 512Gb of RAM and 64 CPUs, so it still flies no problem, it's just a big waste when a page uses 100% of one CPU when I'm not actively using that page. – Alexis Wilke Mar 28 at 0:14
  • 1
    I'm jealous of your system... however... I'll bet that you also have 2000 app/shortcut icons on your desktop, yes? Nobody can reasonably work with 50 tabs open... how many clicks does it take you to find the tab you want? Don't want to make a big deal about this... just observ'in. – heynnema Mar 28 at 0:17
10

In Firefox, find the problems and shut them down:

  • Open the Task Manager by clicking on the 'hamburger' menu icon then More then Task manager - OR - type about:performance in the address bar.

  • Browse in the Task Manager to find likely problem processes

  • Expand subtasks by clicking the right-arrowhead at the left side of the task's name

  • Hover over tasks and their sub-tasks to decide which is a problem

  • Close problem tasks (you can't close a sub-task)

More detail's at https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-or-cpu-resources. I'm especially fond of using the extension OneTab to pull tabs offstage into a list to free up the memory and CPU they were using.

| improve this answer | |
  • 1
    OneTab looks cool, it may be more practical than saving all my tabs as bookmarks. – Alexis Wilke Mar 27 at 21:30
  • 1
    +1 excellent answer! Good job! – heynnema Mar 28 at 0:14
  • 1
    grreat, sadly I can only once upvote. :D – nobody Mar 28 at 8:15

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.