Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | Documentation for /proc/sys/fs/* kernel version 2.2.10 |
2 | (c) 1998, 1999, 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 | |
9cfe015a | 26 | - nr_open |
1da177e4 LT |
27 | - overflowuid |
28 | - overflowgid | |
a2e0b563 | 29 | - suid_dumpable |
1da177e4 LT |
30 | - super-max |
31 | - super-nr | |
32 | ||
33 | Documentation for the files in /proc/sys/fs/binfmt_misc is | |
34 | in Documentation/binfmt_misc.txt. | |
35 | ||
36 | ============================================================== | |
37 | ||
38 | dentry-state: | |
39 | ||
40 | From linux/fs/dentry.c: | |
41 | -------------------------------------------------------------- | |
42 | struct { | |
43 | int nr_dentry; | |
44 | int nr_unused; | |
45 | int age_limit; /* age in seconds */ | |
46 | int want_pages; /* pages requested by system */ | |
47 | int dummy[2]; | |
48 | } dentry_stat = {0, 0, 45, 0,}; | |
49 | -------------------------------------------------------------- | |
50 | ||
51 | Dentries are dynamically allocated and deallocated, and | |
52 | nr_dentry seems to be 0 all the time. Hence it's safe to | |
53 | assume that only nr_unused, age_limit and want_pages are | |
54 | used. Nr_unused seems to be exactly what its name says. | |
55 | Age_limit is the age in seconds after which dcache entries | |
56 | can be reclaimed when memory is short and want_pages is | |
57 | nonzero when shrink_dcache_pages() has been called and the | |
58 | dcache isn't pruned yet. | |
59 | ||
60 | ============================================================== | |
61 | ||
62 | dquot-max & dquot-nr: | |
63 | ||
64 | The file dquot-max shows the maximum number of cached disk | |
65 | quota entries. | |
66 | ||
67 | The file dquot-nr shows the number of allocated disk quota | |
68 | entries and the number of free disk quota entries. | |
69 | ||
70 | If the number of free cached disk quotas is very low and | |
71 | you have some awesome number of simultaneous system users, | |
72 | you might want to raise the limit. | |
73 | ||
74 | ============================================================== | |
75 | ||
76 | file-max & file-nr: | |
77 | ||
78 | The kernel allocates file handles dynamically, but as yet it | |
79 | doesn't free them again. | |
80 | ||
81 | The value in file-max denotes the maximum number of file- | |
82 | handles that the Linux kernel will allocate. When you get lots | |
83 | of error messages about running out of file handles, you might | |
84 | want to increase this limit. | |
85 | ||
86 | The three values in file-nr denote the number of allocated | |
87 | file handles, the number of unused file handles and the maximum | |
88 | number of file handles. When the allocated file handles come | |
89 | close to the maximum, but the number of unused file handles is | |
90 | significantly greater than 0, you've encountered a peak in your | |
91 | usage of file handles and you don't need to increase the maximum. | |
92 | ||
93 | ============================================================== | |
9cfe015a ED |
94 | |
95 | nr_open: | |
96 | ||
97 | This denotes the maximum number of file-handles a process can | |
98 | allocate. Default value is 1024*1024 (1048576) which should be | |
99 | enough for most machines. Actual limit depends on RLIMIT_NOFILE | |
100 | resource limit. | |
101 | ||
102 | ============================================================== | |
1da177e4 LT |
103 | |
104 | inode-max, inode-nr & inode-state: | |
105 | ||
106 | As with file handles, the kernel allocates the inode structures | |
107 | dynamically, but can't free them yet. | |
108 | ||
109 | The value in inode-max denotes the maximum number of inode | |
110 | handlers. This value should be 3-4 times larger than the value | |
111 | in file-max, since stdin, stdout and network sockets also | |
112 | need an inode struct to handle them. When you regularly run | |
113 | out of inodes, you need to increase this value. | |
114 | ||
115 | The file inode-nr contains the first two items from | |
116 | inode-state, so we'll skip to that file... | |
117 | ||
118 | Inode-state contains three actual numbers and four dummies. | |
119 | The actual numbers are, in order of appearance, nr_inodes, | |
120 | nr_free_inodes and preshrink. | |
121 | ||
122 | Nr_inodes stands for the number of inodes the system has | |
123 | allocated, this can be slightly more than inode-max because | |
124 | Linux allocates them one pageful at a time. | |
125 | ||
126 | Nr_free_inodes represents the number of free inodes (?) and | |
127 | preshrink is nonzero when the nr_inodes > inode-max and the | |
128 | system needs to prune the inode list instead of allocating | |
129 | more. | |
130 | ||
131 | ============================================================== | |
132 | ||
133 | overflowgid & overflowuid: | |
134 | ||
135 | Some filesystems only support 16-bit UIDs and GIDs, although in Linux | |
136 | UIDs and GIDs are 32 bits. When one of these filesystems is mounted | |
137 | with writes enabled, any UID or GID that would exceed 65535 is translated | |
138 | to a fixed value before being written to disk. | |
139 | ||
140 | These sysctls allow you to change the value of the fixed UID and GID. | |
141 | The default is 65534. | |
142 | ||
143 | ============================================================== | |
144 | ||
a2e0b563 AD |
145 | suid_dumpable: |
146 | ||
147 | This value can be used to query and set the core dump mode for setuid | |
148 | or otherwise protected/tainted binaries. The modes are | |
149 | ||
150 | 0 - (default) - traditional behaviour. Any process which has changed | |
151 | privilege levels or is execute only will not be dumped | |
152 | 1 - (debug) - all processes dump core when possible. The core dump is | |
153 | owned by the current user and no security is applied. This is | |
154 | intended for system debugging situations only. Ptrace is unchecked. | |
155 | 2 - (suidsafe) - any binary which normally would not be dumped is dumped | |
156 | readable by root only. This allows the end user to remove | |
157 | such a dump but not access it directly. For security reasons | |
158 | core dumps in this mode will not overwrite one another or | |
5d3f083d | 159 | other files. This mode is appropriate when administrators are |
a2e0b563 AD |
160 | attempting to debug problems in a normal environment. |
161 | ||
162 | ============================================================== | |
163 | ||
1da177e4 LT |
164 | super-max & super-nr: |
165 | ||
166 | These numbers control the maximum number of superblocks, and | |
167 | thus the maximum number of mounted filesystems the kernel | |
168 | can have. You only need to increase super-max if you need to | |
169 | mount more filesystems than the current value in super-max | |
170 | allows you to. | |
171 | ||
172 | ============================================================== | |
173 | ||
174 | aio-nr & aio-max-nr: | |
175 | ||
176 | aio-nr shows the current system-wide number of asynchronous io | |
177 | requests. aio-max-nr allows you to change the maximum value | |
178 | aio-nr can grow to. | |
179 | ||
180 | ============================================================== |