2

I tried to put memory limit on programs, by using their desktop shortcuts in order to apply the same limit for their child process too.

I found that "Web Content" is a separate process in what is web content and it uses high memory not only in my computer.

I am using for instance for Firefox and child processes in Firefox's .desktop shortcut having an execution line:

Exec=sh -c "ulimit -m 131072;nice -u username 19; cpulimit -l 25 -- ../firefox/firefox/firefox"

Although sometimes, Firefox uses a little bit higher than 25(i.e 26,27) but it seemed that it worked. Also GeckoMain is limited in terms of cpu.

However, I noticed that process named "Web Content" continues to use much higher CPU when Firefox is open. How can I apply cpu and memory limit to "Web Content"?

1 Answer 1

0

"Web Content" is a subprocess of FireFox. If you run pgrep -a "Web Content" it will list all of these processes. The penultimate field will be the process ID of the parent FireFox, for example:

4940 /usr/lib64/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 38 -prefMapSize 289537 -jsInit 285716 -parentBuildID 20220214091044 -appdir /usr/lib64/firefox/browser 4376 tab

where 4376 is the parent ID.

0

You must log in to answer this question.