Maximum Number of Handles

Function Description

System containers support limit on the number of file handles. File handles include common file handles and network sockets. When starting a container, you can specify the –files-limit parameter to limit the maximum number of handles opened in the container.

Parameter Description

Command

Parameter

Value Description

isula create/run

--files-limit

  

  • The value cannot be negative and must be an integer.
  • The value 0 indicates that the number is not limited by the parameter. The maximum number is determined by the current kernel files cgroup.

Constraints

  • If the value of –files-limit is too small, the system container may fail to run the exec command and the error “open temporary files” is reported. Therefore, you are advised to set the parameter to a large value.
  • File handles include common file handles and network sockets.

Example

To use –files-limit to limit the number of file handles opened in a container, run the following command to check whether the kernel supports files cgroup:

[root@localhost ~]# cat /proc/1/cgroup | grep files
10:files:/

If files is displayed, files cgroup is supported.

Start the container, specify the –files-limit parameter, and check whether the files.limit parameter is successfully written.

[root@localhost ~]# isula run  -tid --files-limit 1024 --system-container  --external-rootfs /tmp/root-fs  empty init 01e82fcf97d4937aa1d96eb8067f9f23e4707b92de152328c3fc0ecb5f64e91d 
[root@localhost ~]# isula exec -it 01e82fcf97d4 bash 
[root@localhost ~]# cat /sys/fs/cgroup/files/files.limit 
1024 

The preceding information indicates that the number of file handles is successfully limited in the container.

有奖捉虫

“有虫”文档片段

存在的问题

提交类型 issue
有点复杂...
找人问问吧。
PR
小问题,全程线上修改...
一键搞定!
问题类型
规范和低错类

● 错别字或拼写错误;标点符号使用错误;

● 链接错误、空单元格、格式错误;

● 英文中包含中文字符;

● 界面和描述不一致,但不影响操作;

● 表述不通顺,但不影响理解;

● 版本号不匹配:如软件包名称、界面版本号;

易用性

● 关键步骤错误或缺失,无法指导用户完成任务;

● 缺少必要的前提条件、注意事项等;

● 图形、表格、文字等晦涩难懂;

● 逻辑不清晰,该分类、分项、分步骤的没有给出;

正确性

● 技术原理、功能、规格等描述和软件不一致,存在错误;

● 原理图、架构图等存在错误;

● 命令、命令参数等错误;

● 代码片段错误;

● 命令无法完成对应功能;

● 界面错误,无法指导操作;

风险提示

● 对重要数据或系统存在风险的操作,缺少安全提示;

内容合规

● 违反法律法规,涉及政治、领土主权等敏感词;

● 内容侵权;

您对文档的总体满意度

非常不满意
非常满意
创Issue赢奖品
根据您的反馈,会自动生成issue模板。您只需点击按钮,创建issue即可。