Subject: Re: Default 'login.conf' in new installs?
To: Peter Seebach <>
From: David Laight <>
List: current-users
Date: 10/11/2006 22:37:29
On Wed, Oct 11, 2006 at 04:18:38PM -0500, Peter Seebach wrote:
> In message <20061011211319.GE9078@cyclonus>, Christian Biere writes:
> >The kernel knows how much RAM the machine has once booted. A file doesn't
> >and there's no way to use expressions or relative values in login.conf. The
> >more arbitrary settings like "number of open files" could of course be
> >mirrored in login.conf.
> Do the current defaults for process limits reflect available memory?  I
> thought they were static.

A lot of the current default 'hard' limits match things like 'available
memory'.  IMHO this is stupid as it allows a single user process to
consume all the system resources.

Both the 'soft' and 'hard' limits for user processes should be based
on some expectation of the size/requirements of user programs.

It may, for instance, be expedient to set the soft limit for RLIM_NOFILES
to 256 (in case it ends up in a byte somewhere), but have the hard limit
at 1024 (or maybe higher).

The kernel limit onthe number of files should probably be killed off.

root can increase the hard limit anyway - although some values need stopping
because they just break things (eg RLIM_NOFILES = unlimited).

A user can (probably) exceed the available swap with multiple processes
anyway, to a large memsize limit may not be so stupid on a sun3.
(Especially since such systems are probably in the hands of people who
understand some of what is going on!)


David Laight: