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

边栏推荐
- 金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
- Yintai department store ignites the city's "night economy"
- Concurrent programming - singleton
- 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
- P3250 [HNOI2016] 网络 + [NECPC2022] F.Tree Path 树剖+线段树维护堆
- Kibana - installation and configuration of kibana
- vulnhub之GeminiInc v2
- Some common terms
- R language uses grid of gridextra package The array function combines multiple visual images of the lattice package horizontally, and the ncol parameter defines the number of columns of the combined g
- MySQL uses the method of updating linked tables with update
猜你喜欢

The excel table is transferred to word, and the table does not exceed the edge paper range

Xml的(DTD,xml解析,xml建模)

Excel quick cross table copy and paste

AI模型看看视频,就学会了玩《我的世界》:砍树、造箱子、制作石镐样样不差...

2022 northeast four provinces match VP record / supplementary questions

Software testing weekly (issue 78): the more confident you are about the future, the more patient you are about the present.

Vulnhub's presidential

The tutor put forward 20 pieces of advice to help graduate students successfully complete their studies: first, don't plan to take a vacation

cgroup简介

VS2015的下载地址和安装教程
随机推荐
STL教程10-容器共性和使用场景
Nestjs配置服务,配置Cookie和Session
rxjs Observable filter Operator 的实现原理介绍
STL tutorial 8-map
AOSP ~ NTP ( 网络时间协议 )
Based on MCU, how to realize OTA differential upgrade with zero code and no development?
Capturing and sorting out external Fiddler -- Conversation bar and filter [2]
C language AES encryption and decryption
Software testing weekly (issue 78): the more confident you are about the future, the more patient you are about the present.
金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
Extrapolated scatter data
利用Zabbix动态监控磁盘I/O
Groovy test class and JUnit test
MySQL union和union all区别
Hongmeng third training (project training)
同事写了一个责任链模式,bug无数...
Slam mapping and autonomous navigation simulation based on turnlebot3
mysql使用update联表更新的方法
PHP基础
Sheet1$. Output [excel source output] Error in column [xxx]. The returned column status is: "the text is truncated, or one or more characters have no matches in the target code page.".