Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
docs
提交
e4de3207
D
docs
项目概览
openeuler
/
docs
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e4de3207
编写于
9月 30, 2019
作者:
A
amyMaYun
提交者:
Gitee
9月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
描述更新
上级
9230abb3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
22 deletion
+20
-22
content/zh/docs/Container/最大句柄数限制.md
content/zh/docs/Container/最大句柄数限制.md
+20
-22
未找到文件。
content/zh/docs/Container/最大句柄数限制.md
浏览文件 @
e4de3207
...
...
@@ -7,23 +7,23 @@
## 参数说明<a name="zh-cn_topic_0182200840_section14494191892512"></a>
<a
name=
"zh-cn_topic_0182200840_table1869210387418"
></a>
<table><thead
align=
"left"
><tr
id=
"zh-cn_topic_0182200840_row1569373816419"
><th
class=
"cellrowborder"
valign=
"top"
width=
"16.77%"
id=
"mcps1.1.4.1.1"
><p
id=
"zh-cn_topic_0182200840_p106936387415"
><a
name=
"zh-cn_topic_0182200840_p106936387415"
></a><a
name=
"zh-cn_topic_0182200840_p106936387415"
></a>
命令
</p>
</th>
<th
class=
"cellrowborder"
valign=
"top"
width=
"38.47%"
id=
"mcps1.1.4.1.2"
><p
id=
"zh-cn_topic_0182200840_p15693173814112"
><a
name=
"zh-cn_topic_0182200840_p15693173814112"
></a><a
name=
"zh-cn_topic_0182200840_p15693173814112"
></a>
参数
</p>
</th>
<th
class=
"cellrowborder"
valign=
"top"
width=
"44.76%"
id=
"mcps1.1.4.1.3"
><p
id=
"zh-cn_topic_0182200840_p1626682291619"
><a
name=
"zh-cn_topic_0182200840_p1626682291619"
></a><a
name=
"zh-cn_topic_0182200840_p1626682291619"
></a>
参数指定值说明
</p>
</th>
</tr>
</thead>
<tbody><tr
id=
"zh-cn_topic_0182200840_row12693163810415"
><td
class=
"cellrowborder"
valign=
"top"
width=
"16.77%"
headers=
"mcps1.1.4.1.1 "
><p
id=
"zh-cn_topic_0182200840_p66931838134110"
><a
name=
"zh-cn_topic_0182200840_p66931838134110"
></a><a
name=
"zh-cn_topic_0182200840_p66931838134110"
></a>
lcrc create/run
</p>
</td>
<td
class=
"cellrowborder"
valign=
"top"
width=
"38.47%"
headers=
"mcps1.1.4.1.2 "
><p
id=
"zh-cn_topic_0182200840_p08101647154218"
><a
name=
"zh-cn_topic_0182200840_p08101647154218"
></a><a
name=
"zh-cn_topic_0182200840_p08101647154218"
></a>
--files-limit
</p>
<p
id=
"zh-cn_topic_0182200840_p5810124718426"
><a
name=
"zh-cn_topic_0182200840_p5810124718426"
></a><a
name=
"zh-cn_topic_0182200840_p5810124718426"
></a></p>
</td>
<td
class=
"cellrowborder"
valign=
"top"
width=
"44.76%"
headers=
"mcps1.1.4.1.3 "
><a
name=
"zh-cn_topic_0182200840_ul2964134315162"
></a><a
name=
"zh-cn_topic_0182200840_ul2964134315162"
></a><ul
id=
"zh-cn_topic_0182200840_ul2964134315162"
><li>
整数值,不能为负数。
</li><li>
指定为0表示不受限制,最大值限制由当前内核files cgroup决定。
</li></ul>
</td>
</tr>
</tbody>
<table><thead
align=
"left"
><tr
id=
"zh-cn_topic_0182200840_row1569373816419"
><th
class=
"cellrowborder"
valign=
"top"
width=
"16.77%"
id=
"mcps1.1.4.1.1"
><p
id=
"zh-cn_topic_0182200840_p106936387415"
><a
name=
"zh-cn_topic_0182200840_p106936387415"
></a><a
name=
"zh-cn_topic_0182200840_p106936387415"
></a>
命令
</p>
</th>
<th
class=
"cellrowborder"
valign=
"top"
width=
"38.47%"
id=
"mcps1.1.4.1.2"
><p
id=
"zh-cn_topic_0182200840_p15693173814112"
><a
name=
"zh-cn_topic_0182200840_p15693173814112"
></a><a
name=
"zh-cn_topic_0182200840_p15693173814112"
></a>
参数
</p>
</th>
<th
class=
"cellrowborder"
valign=
"top"
width=
"44.76%"
id=
"mcps1.1.4.1.3"
><p
id=
"zh-cn_topic_0182200840_p1626682291619"
><a
name=
"zh-cn_topic_0182200840_p1626682291619"
></a><a
name=
"zh-cn_topic_0182200840_p1626682291619"
></a>
参数指定值说明
</p>
</th>
</tr>
</thead>
<tbody><tr
id=
"zh-cn_topic_0182200840_row12693163810415"
><td
class=
"cellrowborder"
valign=
"top"
width=
"16.77%"
headers=
"mcps1.1.4.1.1 "
><p
id=
"zh-cn_topic_0182200840_p66931838134110"
><a
name=
"zh-cn_topic_0182200840_p66931838134110"
></a><a
name=
"zh-cn_topic_0182200840_p66931838134110"
></a>
lcrc create/run
</p>
</td>
<td
class=
"cellrowborder"
valign=
"top"
width=
"38.47%"
headers=
"mcps1.1.4.1.2 "
><p
id=
"zh-cn_topic_0182200840_p08101647154218"
><a
name=
"zh-cn_topic_0182200840_p08101647154218"
></a><a
name=
"zh-cn_topic_0182200840_p08101647154218"
></a>
--files-limit
</p>
<p
id=
"zh-cn_topic_0182200840_p5810124718426"
><a
name=
"zh-cn_topic_0182200840_p5810124718426"
></a><a
name=
"zh-cn_topic_0182200840_p5810124718426"
></a></p>
</td>
<td
class=
"cellrowborder"
valign=
"top"
width=
"44.76%"
headers=
"mcps1.1.4.1.3 "
><a
name=
"zh-cn_topic_0182200840_ul2964134315162"
></a><a
name=
"zh-cn_topic_0182200840_ul2964134315162"
></a><ul
id=
"zh-cn_topic_0182200840_ul2964134315162"
><li>
整数值,不能为负数。
</li><li>
指定为0表示不受限制,最大值限制由当前内核files cgroup决定。
</li></ul>
</td>
</tr>
</tbody>
</table>
## 约束限制<a name="zh-cn_topic_0182200840_section11526131712"></a>
...
...
@@ -45,14 +45,12 @@
容器启动指定--files-limit参数,并检查files.limit参数是否成功写入:
```
[root@localhost ~]# lcrc run -tid --files-limit 1024 --system-container --external-rootfs /tmp/root-fs empty init 01e82fcf97d4937aa1d96eb8067f9f23e4707b92de152328c3fc0ecb5f64e91d
[root@localhost ~]# lcrc run -tid --files-limit 1024 --system-container --external-rootfs /tmp/root-fs empty init
01e82fcf97d4937aa1d96eb8067f9f23e4707b92de152328c3fc0ecb5f64e91d
[root@localhost ~]# lcrc exec -it 01e82fcf97d4 bash
[root@localhost ~]# cat /sys/fs/cgroup/files/files.limit
1024
[root@01e82fcf97d4 /]# ./nofile 1026
pid [18] has used [4] fds, limit is [1024]
test limit for [1026]
file limit test pass, new allow 1020 limit 1020
```
可以看出,容器内文件句柄数被成功限制。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录