title: Using Cgroups to limit cpu usage
body: <p>I am trying to use cgroups in order to limit the CPU usage. I am using this guide 
  <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu_and_memory-use_case.html">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu_and_memory-use_case.html</a></p>
  
  <p>My /etc/cgconfig.conf file is the following</p>
  
  <pre><code>mount {
  cpu     = /mnt/cgroup/cpu,cpuacct;
  cpuacct = /mnt/cgroup/cpu,cpuacct;
  }
  
  group wheel {
      cpu {
              cpu.shares="800";
      }
      cpuacct {
              cpuacct.usage="0";
      }
  }
   group test1 {
      cpu {
              cpu.shares="200";
      }
      cpuacct {
              cpuacct.usage="0";
      }
  }
  </code></pre>
  
  <p>My cgrules.conf is the following</p>
  
  <pre><code>@wheel cpu,cpuacct wheel
  @test1 cpu,cpuacct test1
  </code></pre>
  
  <p>Althouth when I try to run:</p>
  
  <pre><code>dd if=/dev/zero of=/dev/null bs=1024k
  </code></pre>
  
  <p>I see that the cpu usage in 100% for the users belong to group wheel and test1</p>
  
  <p>I have checked the services with 
     service cgconfig status
  and is up </p>
  
  <pre><code>Loaded: loaded (/usr/lib/systemd/system/cgconfig.service; disabled)
  Active: active (exited) since Mon 2015-03-02 17:29:19 EET; 7min ago
  Process: 1240 ExecStop=/usr/sbin/cgclear -l /etc/cgconfig.conf -e   (code=exited, status=3)
  Process: 56536 ExecStart=/usr/sbin/cgconfigparser -l /etc/cgconfig.conf -s         1664 (code=exited, status=0/SUCCESS)
  Main PID: 56536 (code=exited, status=0/SUCCESS)
  </code></pre>
  
  <p>Can anyone tell me what am I doing wrong?
  Thanks a lot</p>