this.prepareSubSystem();
}
public String startNewWorker(int cpuNum, String workerId)
throws SecurityException, IOException {
CgroupCommon workerGroup = new CgroupCommon(workerId, h,
this.rootCgroup);
this.center.create(workerGroup);
CgroupCore cpu = workerGroup.getCores().get(SubSystemType.cpu);
CpuCore cpuCore = (CpuCore) cpu;
cpuCore.setCpuShares(cpuNum * ONE_CPU_SLOT);
StringBuilder sb = new StringBuilder();
sb.append("cgexec -g cpu:").append(workerGroup.getName()).append(" ");
return sb.toString();
}