Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== CPU percentage limits ====== ===== Project description ===== 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. ===== Deliverables ===== * CPU limits for process * CPU limits for user * CPU limits for jail ===== Milestones ===== * **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)** ===== Contact ===== * [[/RudolfTomori|Rudo Tomori]] - student * [[/EdwardTomaszNapierala|Edward Tomasz NapieraĆa]] - mentor ===== SVN repositary ===== * https://socsvn.freebsd.org/socsvn/soc2012/rudot/ ===== Patches ===== * %%FreeBSD%%-CURRENT http://www.ms.mff.cuni.cz/~tomor6am/racct-pcpu/racct_pcpu_current_oct_25_2012.patch * %%FreeBSD%% 9-STABLE http://www.ms.mff.cuni.cz/~tomor6am/racct-pcpu/racct_pcpu_releng_9_oct_25_2012.patch ==== Apply the patch as follows ==== cd /usr/src\\ patch -p1 < //patch-file.patch// ==== Required kernel options ==== options RACCT\\ options RCTL ==== Usage examples ==== 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. ===== Useful links ===== * [[/Hierarchical_Resource_Limits]] summerofcode2012/cpulimits.txt Last modified: 2017/09/18 14:03by KubilayKocak