当前位置:网站首页>CGroup introduction
CGroup introduction
2022-07-03 11:51:00 【InfoQ】
- What is? cgroups ?
- Why cgroups ?
- cgroups How did it happen ?
- How to use cgroups ?
1 What is? cgroups ?
2 Why cgroups?
echo pid > /sys/fs/cgroup/network/<new_class>/tasks3 cgroup How is it realized ?
- Each task points to a css_set Structure pointer .
- One css_set Contains a series of points cgroup_subsys_state Pointer to structure , Every cgroup_subsys_state Corresponding to one cgroup subsystem.
- cgroup hierarchy Files can be mounted and browsed 、 Execute user mode operation .
- see cgroup Under all the tasks PID.
- tasks: A series of pids. Process ID Writing this file will move it to this cgroup.
- cgroup.procs: A series of process groups IDs. Group processes ID Writing this file will move it to this cgroup.
- notify_on_release flag: Whether to run release agent?
- release_agent: The path used to publish the notification ( This file exists only at the top cgroup)

4 How to use cgroups ?
## Limit cpu、mem Use
cd /sys/fs/cgroup/cpu_mem_cg
mkdir cg2
cd cg2
/bin/echo 2-3 > cpuset.cpus
/bin/echo 1 > cpuset.mems
/bin/echo 51565 > tasks
## Limit net Use
cd /sys/fs/cgroup/net/cg3
/bin/echo 51565 > tasks

边栏推荐
- Vulnhub geminiinc
- How PHP solves the problem of high concurrency
- MCDF实验1
- R language ggplot2 visualization: gganimate package creates dynamic line graph animation (GIF) and uses transition_ The reveal function displays data step by step along a given dimension in the animat
- Xml的(DTD,xml解析,xml建模)
- Numpy np.max和np.maximum实现relu函数
- 利用Zabbix动态监控磁盘I/O
- PHP server interacts with redis with a large number of close_ Wait analysis
- Viewing binary bin files with notepad++ editor
- Using onvif protocol to operate the device
猜你喜欢
随机推荐
DS90UB949
uniapp实现点击加载更多
鸿蒙第四次培训
vulnhub之raven2
Niuniu's team competition
Sheet1$.输出[Excel 源输出].列[XXX] 出错。返回的列状态是:“文本被截断,或者一个或多个字符在目标代码页中没有匹配项。”。
. \vmware-vdiskmanager. exe -k “c:\\xxxxx.vmdk”
Web security summary
836. 合并集合(DAY 63)并查集
ArcGIS应用(二十一)Arcmap删除图层指定要素的方法
基于turtlebot3实现SLAM建图及自主导航仿真
银泰百货点燃城市“夜经济”
MySQL uses the method of updating linked tables with update
Based on MCU, how to realize OTA differential upgrade with zero code and no development?
Event preview | the live broadcast industry "rolled in" to drive new data growth points with product power
Groovy测试类 和 Junit测试
Using onvif protocol to operate the device
R language uses data The table package performs data aggregation statistics, calculates window statistics, calculates the median of sliding groups, and merges the generated statistical data into the o
R语言使用gridExtra包的grid.arrange函数将ggplot2包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数
R语言使用gridExtra包的grid.arrange函数将lattice包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数









