首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在Linux内核的2.6版本中不存在可调的fs.inode-max内核?

为什么在Linux内核的2.6版本中不存在可调的fs.inode-max内核?
EN

Unix & Linux用户
提问于 2017-10-19 23:14:28
回答 1查看 1.1K关注 0票数 0

以下输出(来自运行CentOS 6.6的Vagrant )主要说明了它自己:

代码语言:javascript
复制
[root@localhost ~]# echo 131072 > /proc/sys/fs/inode-max
-bash: /proc/sys/fs/inode-max: No such file or directory
[root@localhost ~]# sysctl -q -p
[root@localhost ~]# echo 'fs.inode-max = 131072' >> /etc/sysctl.conf
[root@localhost ~]# sysctl -q -p
error: "fs.inode-max" is an unknown key
[root@localhost ~]# man proc | col -b | grep -A6 '/proc/sys/fs/inode-max如何协调说明在2.4内核中不存在的手册页语句,以及它在这个2.6内核中不存在的事实?
       /proc/sys/fs/inode-max
        This  file  contains the maximum number of in-memory inodes.  On
        some (2.4) systems, it may not be present.  This value should be
        3-4 times larger than the value in file-max, since stdin, stdout
        and network sockets also need an inode to handle them.  When you
        regularly run out of inodes, you need to increase this value.

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# 

如何协调说明在2.4内核中不存在的手册页语句,以及它在这个2.6内核中不存在的事实?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-12-09 00:06:01

man7.org中的手册页和Debian有一个更有用的描述:

/proc/sys/fs/inode-max (仅在Linux2.2之前出现)该文件包含内存中最大数量的inode。这个值应该是文件最大值的3-4倍,因为stdin、stdout和网络套接字也需要一个inode来处理它们。当您经常耗尽inode时,您需要增加这个值。从Linux2.4开始,对inode的数量不再有静态限制,该文件将被删除。

根据最后一句,它不存在,因为它不需要。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/399238

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档