des at des.no
Fri Jan 4 04:34:42 PST 2008
Robert Watson <rwatson at FreeBSD.org> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > Robert Watson <rwatson at FreeBSD.org> writes:
> > > The right answer is presumably to introduce a new LIMIT_SWAP, which
> > > limits the allocation of anonymous memory by processes, and size it to
> > > something like 90% of swap space by default.
> > Not a good solution on its own. You need a per-process limit as
> > well, otherwise a malloc() bomb will still cause other processes to
> > fail randomly.
> That was what I had in mind, the above should read RLIMIT_SWAP.
You don't want the default to be so high. You want a low default, with
the possibility for the admin to increase the limit for a particular
user in login.conf or similar without rebooting (which is currently not
possible since the default datasize == maxdsiz, which can only be
changed in the kernel config or loader.conf)
You may also want to have a collective limit for unprivileged users, so
root will still be able to log in if something goes wrong.
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-current