We would like to allocate chunks of cpu-time and RAM-hours to the users every few months. This is on a Linux server. I think process accounting
can help keep track of usage but it does not enforce a usage policy. What would be a good way to enforce a usage policy. What we want is something like a bank account from which an user can withdraw cpu-time and memory-hours.
If I understand correctly ulimit puts a cap on different resources per shell instance and hence seems inadequate. I would appreciate if you correct me if I am wrong about ulimit. I suspect I am.
Check out cgroups
http://en.wikipedia.org/wiki/Cgroups
cgroups (control groups) is a Linux kernel feature to limit, account and isolate resource usage (CPU, memory, disk I/O, etc.) of process groups.
Demo from RedHat
http://www.youtube.com/watch?v=KX5QV4LId_c
pam_limits is an option you can try. Options are set and documented in /etc/security/limit.conf, which you can set as low as per user: