[CentOS] limits.conf

Wed Jul 29 14:44:34 UTC 2009
Kwan Lowe <kwan.lowe at gmail.com>

On Wed, Jul 29, 2009 at 9:45 AM, Eugene Vilensky<evilensky at gmail.com> wrote:
> Hello,
>
> I understand the function and reason of limits.conf, and I have some
> limited experience configuring values for (essentially single-user)
> Oracle systems.
>
> How do I understand correctly what my limits should be for multiuser
> system system, are there best practice guidance?
>
> Are there some typical settings this list has had experience with for
> multiuser environments?

I manage primarily multiuser systems (AIX, RH and CentOS). Without
knowing your workload it's hard to say, but here are some values I
change:

1) nproc limit - setting this will cap the number of processes that a
user can create. Size according to workload requirements. I use this
mainly to prevent a runaway process.

2) rss/data - on user accessible systems I set this to prevent things
like runaway queries.

3) maxlogins - need to set this because some settings are per login,
so a user could circumvent a resource limit with multiple logins. Also
required for some licensing compliance.

There are also filesystem limits that I enforce with edquota. I use
this mainly on /home.

You need to profile the system first. Use top, vmstat, etc.. to
determine what the typical workload requirements are for each user and
process.

The main goal is to allow each user to complete their workloads
without hogging resources or making the system unstable. Ideally the
users could batch submit their jobs or otherwise schedule the work so
that each job gets the full server. If this is not possible and users
are "selfish", then enforce strict limits so that they will tune their
jobs properly.