Linux cgroups cpuset w / subs导致cgconfig无法启动

前端之家收集整理的这篇文章主要介绍了Linux cgroups cpuset w / subs导致cgconfig无法启动前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在尝试使用cpuset子系统分离2组时遇到问题.这工作正常,但是如果我去向该组添加子组(在本例中为user1),cgconfig将无法以“无法删除非空组”开头.删除群组滥用者/ user1将完美启动.然而,这打破了我正在尝试的东西.

这是一个无法启动的示例cgconfig.

CentOS 6.5版(最终版)
2.6.32-431.5.1.el6.x86_64
libcgroup-0.40.rc1-5.el6_5.1.x86_64
在VM内部.

  1. mount {
  2. cpuset = /cgroup/cpuset;
  3. cpu = /cgroup/cpu;
  4. cpuacct = /cgroup/cpuacct;
  5. memory = /cgroup/memory;
  6. devices = /cgroup/devices;
  7. freezer = /cgroup/freezer;
  8. net_cls = /cgroup/net_cls;
  9. blkio = /cgroup/blkio;
  10. }
  11.  
  12. group normal {
  13.  
  14. blkio {
  15. blkio.throttle.write_bps_device="253:0 72428800";
  16. blkio.throttle.read_bps_device="253:0 72428800";
  17. blkio.reset_stats="";
  18. blkio.weight="700";
  19. blkio.weight_device="";
  20.  
  21. }
  22. memory {
  23. memory.limit_in_bytes = "1673003008";
  24. memory.memsw.limit_in_bytes="1673003008";
  25. }
  26.  
  27. cpuset {
  28. cpuset.mems = "0";
  29. cpuset.cpus = "0-2";
  30. }
  31. }
  32.  
  33.  
  34. group abusers {
  35.  
  36. cpu {}
  37. blkio {}
  38.  
  39. memory {
  40. memory.limit_in_bytes = "38442369024";
  41. memory.memsw.limit_in_bytes="81203822592";
  42. }
  43.  
  44. cpuset {
  45. cpuset.mems = "0";
  46. cpuset.cpus = "3";
  47. }
  48.  
  49. }
  50.  
  51.  
  52. group abusers/user1 {
  53. cpu {
  54. cpu.shares = 200;
  55. cpu.cfs_quota_us = 10000;
  56. cpu.cfs_period_us = 100000;
  57. }
  58.  
  59. blkio {
  60. blkio.throttle.write_bps_device="253:2 10485760";
  61. blkio.throttle.read_bps_device="253:2 10485760";
  62. blkio.reset_stats="";
  63. blkio.weight="100";
  64. blkio.weight_device="";
  65.  
  66. }
  67.  
  68.  
  69. memory {
  70. memory.limit_in_bytes = "1024M";
  71. memory.memsw.limit_in_bytes="1280M";
  72. }
  73.  
  74.  
  75. }

解决方法

什么设备是253:0?我的猜测是特定设备没有非root用户的rw权限.因此,要么您有什么错误的设备要阻止它,要么您需要为非root用户设置rw权限.

猜你在找的Linux相关文章