Any ideas on how to limit Firefox memory usage? Wouldn't mind if I
could use it for other programs too.
I still use openrc. I'll look around and see what I can find. Now I
know what to look for. Thing is, not sure I use cgroups either, unless
it is on by default. o_O
I use slices on HPC to limit users from monopolising interactive nodes,
and our batch jobs kill anything that exceeds requested memory (hope
that wasn't 100h into a job!). I do this on login with user slices but
the concept is the same.
Walter Dnes wrote:
On Fri, Aug 23, 2024 at 07:42:05PM -0500, Dale wrote
I still use openrc. I'll look around and see what I can find. Now IThe bottom half of file /etc/rc.conf is devoted to cgroups settings.
know what to look for. Thing is, not sure I use cgroups either, unless
it is on by default. o_O
Look for the line...
# LINUX CGROUPS RESOURCE MANAGEMENT
I have searched for info on this. I did find the settings in rc.conf.
I see a lot of discussion about running services, like cups, mysql and
such, and controlling them. What I don't see is how to set up a regular program like Firefox or any other program that a user runs directly. I suspect it can be done but I can't find a howto that shows how to do it.
I'll keep digging but if anyone has a link they have ran up on before
and would like to share, it would be nice. It seems what I want to do
is not very common. Thing is, Firefox sometimes goes nuts and when it
does, it is determined to crash my system if I don't catch it. Even if
I had the full 128GBs, it would just take longer to consume it as well.
The best way I see to deal with this, limit its access to memory. It
seems there is a tool to do this, now to figure out how to use it.
Thanks to all for the help.
Dale
:-) :-)
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.
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 wonder tho, in one of the replies, it says to create a directory in
/sys. Don't those get cleared after a reboot? I'm almost certain /proc does but think /sys does too. If so, how does that survive reboots? I
may find more info as I search.
https://linux.die.net/man/1/cgexec
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 149:53:41 |
Calls: | 10,383 |
Files: | 14,054 |
Messages: | 6,417,777 |