Firefox on FreeBSD: shared web content processes, -isForBrowser and dom.ipc.processCount

dom.ipc.processCount is 8 (the default here). Recently, I often see more than eight content shared web content processes, for example:

2021-12-27 17.21.06.png


Is this excess allowed, by design?

A later shot:

1640626246064.png

After a few tests, it seems that the expected number is used if, say, I have three windows open before quit. For example, eight -isForBrowser content processes after Firefox finished opening previous windows and tabs:

1640627297673.png

The excesses seem to begin when I load any restored non-loaded tab.

I'm not immediately concerned about performance etc., just curious about the number of content processes.

<https://cgit.freebsd.org/ports/log/www/firefox>

Code:
% pkg info -x firefox
firefox-95.0.2,2
% pkg -vv | grep -e url -e enabled
    url             : "pkg+http://pkg0.bme.freebsd.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    url             : "https://alpha.pkgbase.live/current/FreeBSD:14:amd64/latest",
    enabled         : no,
    url             : "file:///usr/local/poudriere/data/packages/main-default",
    enabled         : yes,
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #118 main-n251923-4bae154fe8c: Sat Dec 25 08:03:37 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400045 1400045
%
 
If you run Firefox on a machine within Mozilla's installations it makes perfect sense.
Sorry, Xmas mood. x-)
 
Thanks. With reference to the screenshots, can you tell, are any of the -isForBrowser content processes not shared web content?
 
No. If you're not yet aware, there's a port: <https://www.freshports.org/www/firefox/> with a number of patch files <https://cgit.freebsd.org/ports/tree/www/firefox/files> and so on.
I've been running Firefox since version 0.9. Maybe I'm more aware than you. But do the patch files have anything to do with the issue you are trying to bring up with FreeBSD? If so, which patch files and exactly what within those files? Don't make us hunt for it if you already know.
 
Isn't this a question for Mozilla?

To help understand why it's sometimes inappropriate to begin with Mozilla for Tier-3 questions:

Supported Build Hosts and Targets — Firefox Source Docs documentation

Don't make us hunt for it if you already know.

Generally: if I know the answer to a question, I do not ask – I don't like to waste space.



Back on topic:

… do the patch files have anything to do with …

Sorry, I don't know, I'm not a coder.

If I understand correctly, it's relatively easy to see, on FreeBSD, approximately how many shared web content processes are running.



Easy relative to Linux, for example, where scores of -isForBrowser processes might be seen when Firefox presents a single tab:
 

Attachments

  • VirtualBox_Manjaro_28_12_2021_04_59_54.png
    VirtualBox_Manjaro_28_12_2021_04_59_54.png
    474.9 KB · Views: 122
If we ignore the first question, this single alternative question should be easier to answer:
  • with recent versions of Firefox, do you ever see many more -isForBrowser processes than the number that's set for dom.ipc.processCount?
A view of about:config in Firefox:

1640669147985.png

As pictured in post #1, you can use the F4 key with sysutils/htop to filter: -isForBrowser

If not htop(1), use whatever you find easiest for a filtered view of things. ps aux | grep firefox | grep isForBrowser | sort or whatever.

Thanks
 
Generally: if I know the answer to a question, I do not ask – I don't like to waste space.

That's not what I'm asking. You asked why there were so many processes. I asked if this isn't a question for Mozilla, not FreeBSD. You pointed to a bunch of patches which I assumed meant therein lies the problem--as if it is a problem--but why are you pointing us at those patches? We need some context and clarity.

I'm not a "coder" either. I'm a programmer.
 
Please: did anyone else find the excesses (pictured in the opening post) with Firefox 95.⋯ or 96.⋯?

Early indications are that Firefox 97.⋯ is free, or almost free, from the issue (if, in fact, it was an issue):

1644771421922.png
  • nine -isForBrowser Firefox processes
  • maybe one more than expected – not nearly as many more as in the opening post.

Code:
% pkg info -x firefox
firefox-97.0_3,2
% grep pkg /var/log/messages | grep firefox
Feb 11 23:16:57 mowa219-gjp4-8570p-freebsd pkg[2177]: firefox upgraded: 97.0_2,2 -> 97.0_3,2
% zgrep pkg /var/log/messages.0.bz2 | grep firefox
Feb  3 09:43:37 mowa219-gjp4-8570p-freebsd pkg[2388]: firefox upgraded: 95.0.2_2,2 -> 96.0.3,2
Feb  4 16:33:09 mowa219-gjp4-8570p-freebsd pkg[2484]: firefox upgraded: 96.0.3,2 -> 97.0_1,2
Feb  6 12:35:11 mowa219-gjp4-8570p-freebsd pkg[2116]: firefox upgraded: 97.0_1,2 -> 97.0_2,2
Feb  9 19:18:44 mowa219-gjp4-8570p-freebsd pkg[4743]: firefox-97.0_2,2 deinstalled
Feb  9 19:19:42 mowa219-gjp4-8570p-freebsd pkg[4761]: firefox-97.0_2,2 installed
Feb  9 19:20:27 mowa219-gjp4-8570p-freebsd pkg[4871]: firefox-97.0_2,2 deinstalled
Feb  9 19:21:09 mowa219-gjp4-8570p-freebsd pkg[4905]: firefox-97.0_2,2 installed
% date ; uname -aKU
Sun 13 Feb 2022 16:49:48 GMT
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #3 main-n253116-39a36707bd3-dirty: Sat Feb 12 16:47:35 GMT 2022     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400051 1400051
% bectl list -c creation
BE                    Active Mountpoint Space Created
n250511-5f73b3338ee-d -      -          4.94G 2021-11-13 15:43
n252381-75d20a5e386-b -      -          6.80G 2022-01-12 23:23
n252450-5efa7281a79-a -      -          6.49G 2022-01-14 19:27
n252483-c8f8299a230-b -      -          4.84G 2022-01-17 14:24
n252505-cc68614da82-a -      -          4.90G 2022-01-18 14:26
n252531-0ce7909cd0b-h -      -          5.71G 2022-02-06 12:24
n252997-b6724f7004c-c -      -          836M  2022-02-11 23:07
n253116-39a36707bd3-a -      -          24.5M 2022-02-12 17:19
n253116-39a36707bd3-b NR     /          128G  2022-02-12 18:33
%

Postscript

Sorry, the first screenshot was too soon. A later screenshot showed a greater number of processes:

2022-02-13 19-07-58.png
 
Last edited:
Back
Top