Limit CPU and RAM utilization for new user in RedHat

We have a system with 4 Xeon Processors each with 10 cores, total 512 GB RAM and 10 TB Hard Drive.

we want to create multiple user accounts with different resource limitations as :

User 1: RAM : 50GB, PROCESSOR: 10 Cores , User folder in home directory of 10GB space.

User 2: RAM : 100GB, PROCESSOR: 30 Cores , User folder in home directory of 100GB space.

Could you please suggest me how to set this kind of limitations for each user.

Thanks in advance..

Some of what you want can be done with /etc/security/limits.conf, which lets you set hard and soft limits for things like memory use and maximum number of processes, controlled by user or group.

1 Like

For the rest - limitation of space in the HOME directory - there are disk quotas.

Here is a document describing the setup.

You can set up quotas based on users as well as based on groups.

I hope this helps.

bakunin

1 Like

Hey thanks a lot bakunin,

It's good explained here.

---------- Post updated at 12:42 PM ---------- Previous update was at 12:56 AM ----------

Whether it's necessary to set both soft and hard values for each item ? I'm able to set maxlogins with hard limit only..but I'm not able to set memlock and nproc

You do not need to: a "hard limit" is like a wall: once set, it can't be changed (by the user, that is). A "soft limit" is different: it is set, but the user can change it (up to the maximum of the hard limit) himself.

I hope this helps.

bakunin