0

The following output (from a Vagrant VM running CentOS 6.6) mostly speaks for itself:

[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$'
       /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 ~]# 

How to reconcile the man page statement that implies this won't exist on 2.4 kernels, with the fact that it doesn't exist on this 2.6 kernel?

  • 1
    It doesn't exist on 2.4 or higher kernels. – Mark Plotnick Oct 19 '17 at 23:56
  • @MarkPlotnick, ha! Please post that as an answer (with some reference or demonstrated proof). I was thinking this was a new tunable, not an old deprecated one. And was worried about having to configure it when I tweaked fs.file-max! Thanks. – Wildcard Oct 20 '17 at 0:29
2

The man page in man7.org and in Debian has a more useful description:

/proc/sys/fs/inode-max (only present until Linux 2.2)

This file contains the maximum number of in-memory inodes. 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.

Starting with Linux 2.4, there is no longer a static limit on the number of inodes, and this file is removed.

Based on the last sentence, it's not there since it's not needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.