The Deep Tour of /proc/sys/fs/

http://www.systhread.net/texts/199910tfsp.php

The Deep Tour of /proc/sys/fs/

dentry-state

The status of the directory cache. It holds six values:

  • nr_dntry: always 0
  • nr_used: unused directory cache entries
  • age_limit: the number of seconds since the entry was made
  • reclaimed: this illustrates when memory is short
  • want_pages: internal to the kernel

dquot-nr and dquot-max

These files contain disk quota information, dquot-nr is the number of allocated disk quota entries and the number of free disk quota entries. The dquot-max file has information about the maximum number of cahced disk quota entries. If the number of free cached disk quotas is low and you have a lot of simultaneous users, raising it can improve performance.

file-nr and file-max

The value in file-max denotes the maximum number of file handles, while file-nr has a set of three values which denote:

  • the number of allocated file handles
  • the number of used file handles
  • the maximum number of file handles

If your system is sending you messages about running out of file handles, file-max is an obvious first place to look at changing.

NOTE: Document is based on 2.2.9-19 Mandrake. There is a "per process" file handle parameter which cannot be modified within /proc in this distro, it can be changed within the source, however.

inode-state, inode-nr and inode-max

The value in inode-max denotes the maximum number of inode handlers. It should be 3 to 4 times larger than file-max (to account for STDIN, STDERR, STDOUT and network socket file handles). If your system uses a lot of small files or you are getting messages about running out of inodes, increase the value.

While not related directly to tuning, inode-state and inode-nr are related to inodes-max in that inode-nr contains the first two entries of inode-state which contains two values and four dummy values, the two values are:

  • nr_inodes the number of inodes the system has allocated
  • nr_free_inodes the number of free inodes

If a filesystem problem on a system with a lot of command line users begins to bog, keeping an eye on these may help predicate and prevent a possible problem.

super-nr and super-max

The file super-max holds the maximum number of super block handlers and super-nr shows the current in use. Since every mounted filesystem needs a super block you may want to plan on having a lot of these if you are going to have a lot of mounted filesystems.


你可能感兴趣的:(The Deep Tour of /proc/sys/fs/)