[Discuss] memory management
Mike Small
smallm at panix.com
Sat Jun 20 16:18:26 EDT 2015
Matthew Gillen <me at mattgillen.net> writes:
> going to start swapping if it can. What I want for desktop environments
> is behavior like: if you run out of memory, kill the thing that's
> hogging the most. My typical case is that if there is a process using a
> ton of memory, it's probably doing something wrong (e.g. javascript, or
> eclipse going into a death spiral because of the awful Android plugin),
> and /that/ is what I want OOM-killer to murder.
>
> I suppose the right answer is to wrap the problem programs in a script
> so that every time I start them I can
> echo 999 > /proc/[firefox-pid]/oom_score_adj
What about creating a second, less privileged user for running firefox
and using ulimit to keep it down to size? There are good reasons to not
run firefox as your main user anyway, at least not for general browsing.
I do this (minus the ulimit part), with the non-privileged firefox also
having restrictive plugins. For banking and a small number of other
sites I run firefox as my main user with no plugins. That way I don't
have to worry about librejs or requestpolicy messing up a financial
transaction. And if a site takes advantage of a firefox exploit it's
somewhat contained, assuming it's not my bank that hosts the exploit.
--
Mike Small
smallm at panix.com
More information about the Discuss
mailing list