当前位置:网站首页>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

边栏推荐
- Program process management tool -go Supervisor
- phpcms 提示信息页面跳转showmessage
- DNS多点部署IP Anycast+BGP实战分析
- The excel table is transferred to word, and the table does not exceed the edge paper range
- 解决msvcp120d.dll和msvcr120d.dll缺失
- Ripper of vulnhub
- Dynamic programming (interval DP)
- R language uses the aggregate function to calculate the mean value (sum) of dataframe data grouping aggregation without setting na The result of RM calculation. If the group contains the missing value
- 《剑指offer 03》数组中重复的数字
- 牛牛的组队竞赛
猜你喜欢

STL教程10-容器共性和使用场景

2022 northeast four provinces match VP record / supplementary questions

ArcGIS应用(二十一)Arcmap删除图层指定要素的方法

The world's most popular font editor FontCreator tool

Visual Studio 2022下载及配置OpenCV4.5.5

How should intermediate software designers prepare for the soft test

Duplicate numbers in the array of sword finger offer 03

Groovy测试类 和 Junit测试

Hongmeng fourth training

机器学习 3.2 决策树模型 学习笔记(待补)
随机推荐
Phpcms prompt message page Jump showmessage
Viewing binary bin files with notepad++ editor
金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
《剑指offer 03》数组中重复的数字
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函数将lattice包的多个可视化图像横向组合起来,ncol参数自定义组合图列数、nrow参数自定义组合图行数
小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
优化接口性能
Hongmeng third training (project training)
Sheet1$.输出[Excel 源输出].列[XXX] 出错。返回的列状态是:“文本被截断,或者一个或多个字符在目标代码页中没有匹配项。”。
Stm32hal library upgrades firmware based on flash analog U disk (detailed explanation)
mysql使用update联表更新的方法
Understand go language context in one article
The tutor put forward 20 pieces of advice to help graduate students successfully complete their studies: first, don't plan to take a vacation
Mysql根据时间搜索常用方法整理
Experience container in libvirt
cgroup简介
vulnhub之cereal
vulnhub之Ripper
libvirt 中体验容器