4

I am having a problem trying to separate 2 groups using cpuset subsystem. This works fine, however if i go to add a subgroup to that group (in this case -- user1), cgconfig will fail to start with "Failed to remove a non-empty group". Removing group abusers/user1 will start perfectly. However, this breaks what i am trying todo.

Here is an example cgconfig that will fail to start.

CentOS release 6.5 (Final) 2.6.32-431.5.1.el6.x86_64 libcgroup-0.40.rc1-5.el6_5.1.x86_64 Inside of a VM.

mount {
    cpuset  = /cgroup/cpuset;
    cpu = /cgroup/cpu;
    cpuacct = /cgroup/cpuacct;
    memory  = /cgroup/memory;
    devices = /cgroup/devices;
    freezer = /cgroup/freezer;
    net_cls = /cgroup/net_cls;
    blkio   = /cgroup/blkio;
}

group normal {

  blkio {
                blkio.throttle.write_bps_device="253:0 72428800";
                blkio.throttle.read_bps_device="253:0  72428800";
                blkio.reset_stats="";
                blkio.weight="700";
                blkio.weight_device="";

  }
  memory {
    memory.limit_in_bytes = "1673003008";
    memory.memsw.limit_in_bytes="1673003008";
  }

  cpuset {
        cpuset.mems = "0";
        cpuset.cpus = "0-2";
     }
}


group abusers {

cpu {}
blkio {}

  memory {
    memory.limit_in_bytes = "38442369024";
    memory.memsw.limit_in_bytes="81203822592";
  }

  cpuset {
        cpuset.mems = "0";
        cpuset.cpus = "3";
     }

}


group abusers/user1 {
  cpu {
    cpu.shares = 200;
    cpu.cfs_quota_us = 10000;
    cpu.cfs_period_us = 100000;
  }

  blkio {
                blkio.throttle.write_bps_device="253:2 10485760";
                blkio.throttle.read_bps_device="253:2  10485760";
                blkio.reset_stats="";
                blkio.weight="100";
                blkio.weight_device="";

  }


  memory {
    memory.limit_in_bytes = "1024M";
    memory.memsw.limit_in_bytes="1280M";
  }


}
0

What device is at 253:0? My guess is that particular device doesn't have rw permission for non-root users. So either you have the wrong device for what you're trying to throttle, or you need to set rw permissions on it for non-root users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.