diff options
Diffstat (limited to 'Documentation/sysctl/fs.txt')
-rw-r--r-- | Documentation/sysctl/fs.txt | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt new file mode 100644 index 000000000000..0b62c62142cf --- /dev/null +++ b/Documentation/sysctl/fs.txt | |||
@@ -0,0 +1,150 @@ | |||
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 | ||
26 | - overflowuid | ||
27 | - overflowgid | ||
28 | - super-max | ||
29 | - super-nr | ||
30 | |||
31 | Documentation for the files in /proc/sys/fs/binfmt_misc is | ||
32 | in Documentation/binfmt_misc.txt. | ||
33 | |||
34 | ============================================================== | ||
35 | |||
36 | dentry-state: | ||
37 | |||
38 | From linux/fs/dentry.c: | ||
39 | -------------------------------------------------------------- | ||
40 | struct { | ||
41 | int nr_dentry; | ||
42 | int nr_unused; | ||
43 | int age_limit; /* age in seconds */ | ||
44 | int want_pages; /* pages requested by system */ | ||
45 | int dummy[2]; | ||
46 | } dentry_stat = {0, 0, 45, 0,}; | ||
47 | -------------------------------------------------------------- | ||
48 | |||
49 | Dentries are dynamically allocated and deallocated, and | ||
50 | nr_dentry seems to be 0 all the time. Hence it's safe to | ||
51 | assume that only nr_unused, age_limit and want_pages are | ||
52 | used. Nr_unused seems to be exactly what its name says. | ||
53 | Age_limit is the age in seconds after which dcache entries | ||
54 | can be reclaimed when memory is short and want_pages is | ||
55 | nonzero when shrink_dcache_pages() has been called and the | ||
56 | dcache isn't pruned yet. | ||
57 | |||
58 | ============================================================== | ||
59 | |||
60 | dquot-max & dquot-nr: | ||
61 | |||
62 | The file dquot-max shows the maximum number of cached disk | ||
63 | quota entries. | ||
64 | |||
65 | The file dquot-nr shows the number of allocated disk quota | ||
66 | entries and the number of free disk quota entries. | ||
67 | |||
68 | If the number of free cached disk quotas is very low and | ||
69 | you have some awesome number of simultaneous system users, | ||
70 | you might want to raise the limit. | ||
71 | |||
72 | ============================================================== | ||
73 | |||
74 | file-max & file-nr: | ||
75 | |||
76 | The kernel allocates file handles dynamically, but as yet it | ||
77 | doesn't free them again. | ||
78 | |||
79 | The value in file-max denotes the maximum number of file- | ||
80 | handles that the Linux kernel will allocate. When you get lots | ||
81 | of error messages about running out of file handles, you might | ||
82 | want to increase this limit. | ||
83 | |||
84 | The three values in file-nr denote the number of allocated | ||
85 | file handles, the number of unused file handles and the maximum | ||
86 | number of file handles. When the allocated file handles come | ||
87 | close to the maximum, but the number of unused file handles is | ||
88 | significantly greater than 0, you've encountered a peak in your | ||
89 | usage of file handles and you don't need to increase the maximum. | ||
90 | |||
91 | ============================================================== | ||
92 | |||
93 | inode-max, inode-nr & inode-state: | ||
94 | |||
95 | As with file handles, the kernel allocates the inode structures | ||
96 | dynamically, but can't free them yet. | ||
97 | |||
98 | The value in inode-max denotes the maximum number of inode | ||
99 | handlers. This value should be 3-4 times larger than the value | ||
100 | in file-max, since stdin, stdout and network sockets also | ||
101 | need an inode struct to handle them. When you regularly run | ||
102 | out of inodes, you need to increase this value. | ||
103 | |||
104 | The file inode-nr contains the first two items from | ||
105 | inode-state, so we'll skip to that file... | ||
106 | |||
107 | Inode-state contains three actual numbers and four dummies. | ||
108 | The actual numbers are, in order of appearance, nr_inodes, | ||
109 | nr_free_inodes and preshrink. | ||
110 | |||
111 | Nr_inodes stands for the number of inodes the system has | ||
112 | allocated, this can be slightly more than inode-max because | ||
113 | Linux allocates them one pageful at a time. | ||
114 | |||
115 | Nr_free_inodes represents the number of free inodes (?) and | ||
116 | preshrink is nonzero when the nr_inodes > inode-max and the | ||
117 | system needs to prune the inode list instead of allocating | ||
118 | more. | ||
119 | |||
120 | ============================================================== | ||
121 | |||
122 | overflowgid & overflowuid: | ||
123 | |||
124 | Some filesystems only support 16-bit UIDs and GIDs, although in Linux | ||
125 | UIDs and GIDs are 32 bits. When one of these filesystems is mounted | ||
126 | with writes enabled, any UID or GID that would exceed 65535 is translated | ||
127 | to a fixed value before being written to disk. | ||
128 | |||
129 | These sysctls allow you to change the value of the fixed UID and GID. | ||
130 | The default is 65534. | ||
131 | |||
132 | ============================================================== | ||
133 | |||
134 | super-max & super-nr: | ||
135 | |||
136 | These numbers control the maximum number of superblocks, and | ||
137 | thus the maximum number of mounted filesystems the kernel | ||
138 | can have. You only need to increase super-max if you need to | ||
139 | mount more filesystems than the current value in super-max | ||
140 | allows you to. | ||
141 | |||
142 | ============================================================== | ||
143 | |||
144 | aio-nr & aio-max-nr: | ||
145 | |||
146 | aio-nr shows the current system-wide number of asynchronous io | ||
147 | requests. aio-max-nr allows you to change the maximum value | ||
148 | aio-nr can grow to. | ||
149 | |||
150 | ============================================================== | ||