????????
????cgroups ??Linux????????????????????????????????????????????????????? cpu?????????????????????????????????????????? Docker ????? cgroups ????????????????????cpu??????????????????
?????????????????????? cgroups ???????????????????????????????????????????á???????????????????? web ?????????????????????????????????????? cgroups ???? web server ????????????е????????????μ??????????????????顣
??????????????????????????? cgroups ???????÷???
????· cgroups ????????
????· cgroups ????????????
????· cgroups ??÷???????
????· cgroups ????е?????
???????????
????cgroups????
????cgroups ???????control groups??cgroups?????????????????????????????????????????????£?
????· cpu ????????????????? cpu ??????
????· cpuacct ????????????? cgroups ?е????? cpu ?????檔
????· cpuset ??????????? cgroups ?е??????????? cpu ???????????
????· memory ?????????????????? memory ???????
????· blkio ????????????????????豸 io??
????· devices ????????????????????????Щ?豸??
????· net_cls ???????????? cgroups ?н???????????????????????? tc ??饗traffic control????????????п????
????· freezer ?????????????????? cgroups ?е?????
????· ns ?????????????? cgroups ??????????ò???? namespace??
?????????????????????????????????????????????????????????? cpu ??????????????????????????? cpu ???????????????????????????????????????????? memory ???????????????????????????????????????? Traffic Control ???????????ɡ????????????????????????????????????????????????????????????????? cgroups ????????????????????Ч?????????????????????cgroups ???ú??????й???????????????????? cgroups ???????cgroups????????????????
????cgroups ??????Hierarchy??
?????????? cgroup ???????????? control group ??????????????? cgroups ??????????????cgroup ????????????????????????????cgroup ????????????????? cgroups ??????cgroups???????? attach ?????????? cgroups ???????????????????? attach ?? cgroups ?????????????????????? cgroups ???????? attach ????? cpu ?????С?

??????????????????cgroups????????????????????????ν??????????????????? cgroup ???壨????cpu_cgrp?? memory_cgrp)??????? cgroups ???? attach ?? cpu ?????? cpuacct ?????? ??? cgroups ?????е? cgroup ???????? cpu ??????????????????????? cpu ?????????????? ????? cgroups ???? attach ?? memory ????????? cgroups ?????е? cgroup ???????? memory ??????????????
?????????? cgroups ?????У????????cgroup ???壩?????????????????????????????????? cgrp1 ???е??????????60%?? cpu ???????? cgrp2 ???е??????????20%?? cpu ??????
????cgroups?????
?????????С???????????? cgroups ??????????????????????????? cgroups ??????? attach ?? cgroups ??????????????????????????С???????????????????????? cgroups ??????????????
??????????? cgroups ?????е???cgroup ???壩??????????????????????????????б??У????????????б??е????н????????????????????????????????????????????????? cgroups ?????????У????????? cgroups ??????????????????????????????? cgroup ??????????????????

???????????????????????????????? cgroups ?????????????P??????????????????????????????????????????????????????css_set??cgroups subsystem set???? ???????css_set?????????????css_set??????????С????????????????????css_set?????css_set???????????????????????css_set????????????css_set????????????????
????????е?”M×N Linkage”???????css_set?????????????????? cgroups ?????ж????????????? cgroups ??????????css_set??????????cgroups??????????? ??????? cgroups ????????????????ж?????????á?
???????css_set??????? cgroups ??????????????????????css_set?μ??????ж????????????????? cgroups ?????????css_set??????????css_set?μ?????б?????????????????????