TEXT   14

fs

Guest on 31st July 2022 05:17:10 PM

  1. Documentation for /proc/sys/fs/*        kernel version 2.2.5
  2.         (c) Rik van Riel <riel@nl.linux.org>
  3.  
  4. For general info and legal blurb, please look in README.
  5.  
  6. ==============================================================
  7.  
  8. This file contains documentation for the sysctl files in
  9. /proc/sys/fs/ and is valid for Linux kernel version 2.2.
  10.  
  11. The files in this directory can be used to tune and monitor
  12. miscellaneous and general things in the operation of the Linux
  13. kernel. Since some of the files _can_ be used to screw up your
  14. system, it is advisable to read both documentation and source
  15. before actually making adjustments.
  16.  
  17. Currently, these files are in /proc/sys/fs:
  18. - dentry-state
  19. - dquot-max
  20. - dquot-nr
  21. - file-max
  22. - file-nr
  23. - inode-max
  24. - inode-nr
  25. - inode-state
  26. - super-max
  27. - super-nr
  28.  
  29. Documentation for the files in /proc/sys/fs/binfmt_misc is
  30. in Documentation/binfmt_misc.txt.
  31.  
  32. ==============================================================
  33.  
  34. dentry-state:
  35.  
  36. From linux/fs/dentry.c:
  37. --------------------------------------------------------------
  38. struct {
  39.         int nr_dentry;
  40.         int nr_unused;
  41.         int age_limit;         /* age in seconds */
  42.         int want_pages;        /* pages requested by system */
  43.         int dummy[2];
  44. } dentry_stat = {0, 0, 45, 0,};
  45. --------------------------------------------------------------
  46.  
  47. Dentries are dynamically allocated and deallocated, and
  48. nr_dentry seems to be 0 all the time. Hence it's safe to
  49. assume that only nr_unused, age_limit and want_pages are
  50. used. Nr_unused seems to be exactly what its name says.
  51. Age_limit is the age in seconds after which dcache entries
  52. can be reclaimed when memory is short and want_pages is
  53. nonzero when shrink_dcache_pages() has been called and the
  54. dcache isn't pruned yet.
  55.  
  56. ==============================================================
  57.  
  58. dquot-max & dquot-nr:
  59.  
  60. The file dquot-max shows the maximum number of cached disk
  61. quota entries.
  62.  
  63. The file dquot-nr shows the number of allocated disk quota
  64. entries and the number of free disk quota entries.
  65.  
  66. If the number of free cached disk quotas is very low and
  67. you have some awesome number of simultaneous system users,
  68. you might want to raise the limit.
  69.  
  70. ==============================================================
  71.  
  72. file-max & file-nr:
  73.  
  74. The kernel allocates file handles dynamically, but as yet it
  75. doesn't free them again.
  76.  
  77. The value in file-max denotes the maximum number of file-
  78. handles that the Linux kernel will allocate. When you get lots
  79. of error messages about running out of file handles, you might
  80. want to increase this limit.
  81.  
  82. The three values in file-nr denote the number of allocated
  83. file handles, the number of used file handles and the maximum
  84. number of file handles. When the allocated file handles come
  85. close to the maximum, but the number of actually used ones is
  86. far behind, you've encountered a peak in your usage of file
  87. handles and you don't need to increase the maximum.
  88.  
  89. ==============================================================
  90.  
  91. inode-max, inode-nr & inode-state:
  92.  
  93. As with file handles, the kernel allocates the inode structures
  94. dynamically, but can't free them yet.
  95.  
  96. The value in inode-max denotes the maximum number of inode
  97. handlers. This value should be 3-4 times larger than the value
  98. in file-max, since stdin, stdout and network sockets also
  99. need an inode struct to handle them. When you regularly run
  100. out of inodes, you need to increase this value.
  101.  
  102. The file inode-nr contains the first two items from
  103. inode-state, so we'll skip to that file...
  104.  
  105. Inode-state contains three actual numbers and four dummies.
  106. The actual numbers are, in order of appearance, nr_inodes,
  107. nr_free_inodes and preshrink.
  108.  
  109. Nr_inodes stands for the number of inodes the system has
  110. allocated, this can be slightly more than inode-max because
  111. Linux allocates them one pageful at a time.
  112.  
  113. Nr_free_inodes represents the number of free inodes (?) and
  114. preshrink is nonzero when the nr_inodes > inode-max and the
  115. system needs to prune the inode list instead of allocating
  116. more.
  117.  
  118. ==============================================================
  119.  
  120. super-max & super-nr:
  121.  
  122. These numbers control the maximum number of superblocks, and
  123. thus the maximum number of mounted filesystems the kernel
  124. can have. You only need to increase super-max if you need to
  125. mount more filesystems than the current value in super-max
  126. allows you to.

Raw Paste


Login or Register to edit or fork this paste. It's free.