Cpu, memory - limit by user

Hi all !

I'm new in this site, so sorry if this question is into wrong place.

How can I limit cpu/core and memory usage by user?
System: RedHat Ent. Linux. 6.4

Tks,

I don't have experience with your requested per-user limits, but I have seen a limit for threads per user:

# cat /etc/security/limits.d/threads.conf
* soft  nproc       6000
* soft  sigpending  6000

And found the following resource that will be more fair to other users regarding CPU consumption:

1 Like

Looks like it can be done with cgroups, but i have never configured those.

Regards
Peasant.

Have a look at the limits.conf manpage. You can limit CPU and memory usage using limits.conf hard values.

1 Like

Hi Peasant,
You're right. I've configured the /etc/cgconfig.conf and it works properly !

Tks all !