CPU percentage limits
The goal of the project is to add the CPU percentage usage accounting to the existing racct/rctl infrastructure. I want to make it possible for the system administrator to limit either a particular process, a particular user or a particular jail to for example 30% CPU.
- CPU limits for process
- CPU limits for user
- CPU limits for jail
May 21 - June 10: add racct/rctl cpu usage accounting, applicable only to a thread, support only for one scheduler.
June 11 - June 24: add racct/rctl cpu usage accounting, applicable also to a user, support only for one scheduler.
June 25 - July 1: add support for the second scheduler
July 2 - July 8: testing
July 9 - July 13: Mid-term Evaluations
July 9 - July 22: switch implementation to the second approach using periodic racct_set() iterating over all processes from racctd
July 23 - August 5: revising/improving the percentage calculation algorithm
August 6 - August 12: documentation, testing
August 13: End of coding (soft)
August 13 - August 19: documentation, testing
August 20: End of coding (hard)
Apply the patch as follows
patch -p1 < patch-file.patch
Required kernel options
rctl -a user:tom:pcpu:deny=60
- Adds a 60% cpu limit for user tom.
rctl -a process:1657:pcpu:deny=70
- Adds a 70% cpu limit for process with id 1657.