Wols Lists wrote:
> On 31/08/2024 19:39, Dale wrote:
>> I did a lot of searching and almost all of it relates to using cgroups
>> for services, like mysql or something.  I haven't found anything that
>> explains how to do it for a program started by a user.  It may be doable
>> but I've yet to find it.
>
> I did a quick search and found this ...
>
> https://unix.stackexchange.com/questions/555080/using-cgroup-to-limit-program-memory-as-its-running
>
>
> reading through it, it appears to tell you (a) how to set up the
> cgroup, (b) how to put a running program into a cgroup, and (c) (most
> importantly) how to start a program in a cgroup.
>
> So what you'd do is create the cgroup, then edit the firefox and
> seamonkey desktop files to use cgexec to start them.
>
> Beyond that tip, you're on your own but it looks promising. I've not
> done it, so I don't know ...
>
> Cheers,
> Wol
>
>


It looks like I do need to do this.  Firefox just went nuts on memory
again.  One of my Firefox profiles was using 98% of memory. 

>From that link, it looks like that is done manually.  In other words,
when I start Firefox, I have to add the process to the cgroup by hand. 
Shouldn't there be a way to do it automatically?  Like add it to the
command that runs the program name in the application menu? 

I did see where a lot of services are listed in the directory mentioned
in link tho.  I also found out elsewhere that I have to enable more
cgroup controls in the kernel.  I did that the other day.  I just need
to reboot now.  Once I reboot and those extra drivers are working, I can
peek at things.  See how it is done with other things. 

For something that is designed to do this sort of thing, why is it so
hard to find docs for how to do it?  I've read of other people having
Firefox and other programs go nuts on memory before.  I can't be the
only one who wants to set limits on a process like this.  :/ 

Thanks.  If you find anything else, let me know. 

Dale

:-)  :-) 

Reply via email to