LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-18-2019, 02:11 PM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Firefox: Process for each tab: How?


I've read about browsers trying to keep an errant tab from bringing down the whole browser by running a separate process for each tab. Sounds like a good idea but how does someone actually turn that on for Firefox?

I've seen a few pages that claim to show how it's done for Firefox running on Windows but nothing that shows, specifically, how to do the same thing on Linux. I've toyed with the "Content per process" setting but it seems to have zero relationship to the number of processes/tab.

Is this "tab == process" feature Windows-only?

If so, is the best (or only) way to identify what tabs are pegging the CPU utilization via the Task Manager and the so-called "Energy impact"? Sometimes, browser performance is so-o-o sluggish it appears that it's hung and trying to open up the Task Manager might take a very long time.

I typically have htop(1) running in a virtual console to monitor who's taking over the CPU when I sense performance problems but see no means of tying Firefox PIDs to particular tabs so as to identify which process/tab to kill. Often, Firefox might be catatonic while the rest of the desktop is working just fine. Knowing what PID to clobber would be handy in those instances. Not being able to identify the culprit tab often means my best course of action is to "killall -9" everything Firefox-related and restoring the tabs when asked after restarting the browser and hoping the problem doesn't recur right away.

Surely there's a better way (besides returning to Chromium) or making the Task Manager my default page---so I don't have to wait quite so long to access it when performance goes south. (If that's even possible.)

Thoughts? Ideas?

TIA...
 
Old 10-19-2019, 08:11 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Try this: Go to Edit-->Preferences-->General-->Performance and uncheck "Use recommended settings."

Source: https://support.mozilla.org/en-US/kb...mance-settings
 
1 members found this post helpful.
Old 10-19-2019, 09:51 PM   #3
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by frankbell View Post
Try this: Go to Edit-->Preferences-->General-->Performance and uncheck "Use recommended settings."

Source: https://support.mozilla.org/en-US/kb...mance-settings
I've recently re-checked that, Firefox 69 seems to perform much better

in the past it would be a hog, and restricting it mitigated negative effects.
However since 68 I've found Firefox to be less of a burden on mem and cpu so I'm letting it decide once again.
Time will tell, but thus far I'm happy with it.

@rnturn

what version of Firefox are you running?
 
Old 10-19-2019, 09:56 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
I also left that setting at the default. It has been working well for me.

Firefox Quantum was a huge leap forward in usability. I know it broke a number of older plugins, but I've found adequate replacements (either updated older plugins or new replacements) for the few plugins I use, and I think Mozilla made the correct choice in moving to Quantum.

There were lots of dust bunnies that needed to be cleared out of the Firefox code.

Last edited by frankbell; 10-19-2019 at 10:00 PM.
 
Old 10-21-2019, 08:46 AM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Firerat View Post
what version of Firefox are you running?
69.0.1 (x86_64)

I've already unchecked the recommended performance settings checkbox. My hope in doing that was that would unlock the individual processes feature. Even with that unchecked, when I issue:
Code:
ps -ef | grep firefox | wc -l
I still see something wa-a-ay less than the number of tabs that are opened. It makes me think that the "tab == process" feature is vaporware. :^/
 
Old 10-21-2019, 08:54 AM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
I get something that seems to match well with number of open tabs

Code:
pidof firefox
I did just notice that I have to load pages in the tabs to get new pid

Last edited by Firerat; 10-21-2019 at 08:56 AM.
 
Old 10-21-2019, 02:27 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Firerat View Post
I get something that seems to match well with number of open tabs

Code:
pidof firefox
Am I missing a smiley?

That gives me the PID of the main Firefox process (currently 3720) but not the count of the separate processes. It can vary wildly but, if each tab were a separate process, would currently expect a count in the neighborhood of 50.
 
Old 10-21-2019, 02:57 PM   #8
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
pidof firefox

two tabs
Code:
32523 32457 32357 32312 4044
three tabs
Code:
32523 32457 32357 32312 5735 4044
one tab
Code:
32523 32457 32357 32312 5735
four tabs
Code:
32457 32357 32312 6330 6259 6194 5735
I have a lot of bash open
Code:
pidof bash
32280 32109 29678 29607 27771 27711 27684 27306 27272 26248 24949 23637 17675 14109 9429 7571 5209 4400 3116 1158 1004 1003 984 970

what do you get with
Code:
ps -ef | grep firefox | wc -l
2 ?

how about
Code:
ps -ef | grep [f]irefox | wc -l
and you do know wc -l is redundant

Code:
ps -ef | grep -c [f]irefox
ps -ef | grep -c firefox
drop the -c and see why you get the extra 1


as for why you only have 1 PID for Firefox, I have no idea
 
Old 10-21-2019, 03:05 PM   #9
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
verbose

ps -e -o ppid,pid,cmd | grep [f]irefox
Code:
32312  5735 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 7305 -prefMapSize 215425 -parentBuildID 20191007230631 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 32312 true tab
32312  6194 /usr/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 7305 -prefMapSize 215425 -parentBuildID 20191007230631 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 32312 true tab
32312  6259 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 7305 -prefMapSize 215425 -parentBuildID 20191007230631 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 32312 true tab
32312  6330 /usr/lib/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 7305 -prefMapSize 215425 -parentBuildID 20191007230631 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 32312 true tab
    1 32312 /usr/lib/firefox/firefox
32312 32357 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 215425 -parentBuildID 20191007230631 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 32312 true tab
32312 32457 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 6298 -prefMapSize 215425 -parentBuildID 20191007230631 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 32312 true tab

Last edited by Firerat; 10-21-2019 at 03:07 PM. Reason: fixed wrapping in code box
 
Old 10-22-2019, 04:52 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I concur with Firerat: I have 8 tabs open right now, 'pidof firefox' returns 9 PIDs.
If I open another tab, it returns 10 PIDs.
When I close that tab, I get 9 PIDs again.
However, it does not seem to go beyond 10, which kindof agrees with the Preferences saying "Max 8 processes (Default)".

But - I also find many, many more firefox processes with e.g. 'htop'.
Dozens.
But again - with 'top' I find many processes called "Web Content" - and since I have no other internet facing app open atm, they must belong to FF.

Frankly, all this is slightly beyond me, but I don't see any reason to think that FF are lying or "selling vaporware" here.
 
Old 10-22-2019, 05:05 AM   #11
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Code:
for i in $(pidof firefox )
do
  echo == $i ==
  ps -p ${i}
  ps -f -p ${i}
  echo ====
done | grep -v "  PID"
the "Web Content" is indeed Firefox


tip, in top toggle command line with c

Last edited by Firerat; 10-22-2019 at 05:09 AM.
 
Old 11-19-2019, 11:57 AM   #12
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by ondoho View Post
Frankly, all this is slightly beyond me, but I don't see any reason to think that FF are lying or "selling vaporware" here.
I think "lying" is a strong way to describe manner in which Mozilla has chosen to promote this feature. I still don't see any way of tying a process to a specific tab no matter how I issue "ps". Even today: dozens of tabs open but only 11 processes. "htop" shows more than that but, still, there is no documented way that I'm able to discern that associates a particular Linux process using the information that I see in either ps or htop to a particular browser tab. I am able see a Firefox process chewing up CPU but cannot know which tab accessing which web site is the culprit. I've since discovered that NoScript seems to be a huge CPU hog on some sites but, since I can't link process to tab/web site, I cannot figure out what to whitelist to keep it from acting on web pages that cause it to swamp my desktop. Sure, I could visit each and every browser tab (keep in mind that the desktop can be almost catatonic when the system is unresponsive due to Firefox processes) and disable NoScript on the tab to see if it reduces the load... then re-enabling it should that tab not be the culprit. My only alternative I've come up with so far is to disable it entirely.

BTW, I'm still on 69.0.1. Newer versions have been insisting that I create an entirely new profile and a Mozilla account. So I'm sticking at this version until I figure out how to migrate bookmarks without having to put them on someone else's computer.

Later, all...
 
Old 11-20-2019, 01:51 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
rnturn, You really seem to have a fundamental problem with FF as you have shown in at least 2 different threads now.
Have you considered actively looking for something that suits your wants better, instead of keeping these futile discussions alive?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox opens a new empty tab each time I try to open a shockwave file. Joe Messing Linux - Desktop 7 08-18-2014 02:35 PM
FC 4. Modify ALT+TAB behaviour to CTRL+TAB xtracto Linux - Software 1 09-22-2005 02:06 PM
bash "tab tab" - how to turn off? nicflatterie Linux - General 2 04-04-2005 03:09 PM
Out of tab tab benjaminrtz Linux - Newbie 2 04-30-2003 12:39 PM
Redirecting output of tab tab benjaminrtz Linux - General 1 04-28-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration