ia64/linux-2.6.18-xen.hg

view Documentation/sysctl/fs.txt @ 897:329ea0ccb344

balloon: try harder to balloon up under memory pressure.

Currently if the balloon driver is unable to increase the guest's
reservation it assumes the failure was due to reaching its full
allocation, gives up on the ballooning operation and records the limit
it reached as the "hard limit". The driver will not try again until
the target is set again (even to the same value).

However it is possible that ballooning has in fact failed due to
memory pressure in the host and therefore it is desirable to keep
attempting to reach the target in case memory becomes available. The
most likely scenario is that some guests are ballooning down while
others are ballooning up and therefore there is temporary memory
pressure while things stabilise. You would not expect a well behaved
toolstack to ask a domain to balloon to more than its allocation nor
would you expect it to deliberately over-commit memory by setting
balloon targets which exceed the total host memory.

This patch drops the concept of a hard limit and causes the balloon
driver to retry increasing the reservation on a timer in the same
manner as when decreasing the reservation.

Also if we partially succeed in increasing the reservation
(i.e. receive less pages than we asked for) then we may as well keep
those pages rather than returning them to Xen.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 14:01:20 2009 +0100 (2009-06-05)
parents 831230e53067
children
line source
1 Documentation for /proc/sys/fs/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
4 For general info and legal blurb, please look in README.
6 ==============================================================
8 This file contains documentation for the sysctl files in
9 /proc/sys/fs/ and is valid for Linux kernel version 2.2.
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.
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 - suid_dumpable
29 - super-max
30 - super-nr
32 Documentation for the files in /proc/sys/fs/binfmt_misc is
33 in Documentation/binfmt_misc.txt.
35 ==============================================================
37 dentry-state:
39 From linux/fs/dentry.c:
40 --------------------------------------------------------------
41 struct {
42 int nr_dentry;
43 int nr_unused;
44 int age_limit; /* age in seconds */
45 int want_pages; /* pages requested by system */
46 int dummy[2];
47 } dentry_stat = {0, 0, 45, 0,};
48 --------------------------------------------------------------
50 Dentries are dynamically allocated and deallocated, and
51 nr_dentry seems to be 0 all the time. Hence it's safe to
52 assume that only nr_unused, age_limit and want_pages are
53 used. Nr_unused seems to be exactly what its name says.
54 Age_limit is the age in seconds after which dcache entries
55 can be reclaimed when memory is short and want_pages is
56 nonzero when shrink_dcache_pages() has been called and the
57 dcache isn't pruned yet.
59 ==============================================================
61 dquot-max & dquot-nr:
63 The file dquot-max shows the maximum number of cached disk
64 quota entries.
66 The file dquot-nr shows the number of allocated disk quota
67 entries and the number of free disk quota entries.
69 If the number of free cached disk quotas is very low and
70 you have some awesome number of simultaneous system users,
71 you might want to raise the limit.
73 ==============================================================
75 file-max & file-nr:
77 The kernel allocates file handles dynamically, but as yet it
78 doesn't free them again.
80 The value in file-max denotes the maximum number of file-
81 handles that the Linux kernel will allocate. When you get lots
82 of error messages about running out of file handles, you might
83 want to increase this limit.
85 The three values in file-nr denote the number of allocated
86 file handles, the number of unused file handles and the maximum
87 number of file handles. When the allocated file handles come
88 close to the maximum, but the number of unused file handles is
89 significantly greater than 0, you've encountered a peak in your
90 usage of file handles and you don't need to increase the maximum.
92 ==============================================================
94 inode-max, inode-nr & inode-state:
96 As with file handles, the kernel allocates the inode structures
97 dynamically, but can't free them yet.
99 The value in inode-max denotes the maximum number of inode
100 handlers. This value should be 3-4 times larger than the value
101 in file-max, since stdin, stdout and network sockets also
102 need an inode struct to handle them. When you regularly run
103 out of inodes, you need to increase this value.
105 The file inode-nr contains the first two items from
106 inode-state, so we'll skip to that file...
108 Inode-state contains three actual numbers and four dummies.
109 The actual numbers are, in order of appearance, nr_inodes,
110 nr_free_inodes and preshrink.
112 Nr_inodes stands for the number of inodes the system has
113 allocated, this can be slightly more than inode-max because
114 Linux allocates them one pageful at a time.
116 Nr_free_inodes represents the number of free inodes (?) and
117 preshrink is nonzero when the nr_inodes > inode-max and the
118 system needs to prune the inode list instead of allocating
119 more.
121 ==============================================================
123 overflowgid & overflowuid:
125 Some filesystems only support 16-bit UIDs and GIDs, although in Linux
126 UIDs and GIDs are 32 bits. When one of these filesystems is mounted
127 with writes enabled, any UID or GID that would exceed 65535 is translated
128 to a fixed value before being written to disk.
130 These sysctls allow you to change the value of the fixed UID and GID.
131 The default is 65534.
133 ==============================================================
135 suid_dumpable:
137 This value can be used to query and set the core dump mode for setuid
138 or otherwise protected/tainted binaries. The modes are
140 0 - (default) - traditional behaviour. Any process which has changed
141 privilege levels or is execute only will not be dumped
142 1 - (debug) - all processes dump core when possible. The core dump is
143 owned by the current user and no security is applied. This is
144 intended for system debugging situations only. Ptrace is unchecked.
145 2 - (suidsafe) - any binary which normally would not be dumped is dumped
146 readable by root only. This allows the end user to remove
147 such a dump but not access it directly. For security reasons
148 core dumps in this mode will not overwrite one another or
149 other files. This mode is appropriate when adminstrators are
150 attempting to debug problems in a normal environment.
152 ==============================================================
154 super-max & super-nr:
156 These numbers control the maximum number of superblocks, and
157 thus the maximum number of mounted filesystems the kernel
158 can have. You only need to increase super-max if you need to
159 mount more filesystems than the current value in super-max
160 allows you to.
162 ==============================================================
164 aio-nr & aio-max-nr:
166 aio-nr shows the current system-wide number of asynchronous io
167 requests. aio-max-nr allows you to change the maximum value
168 aio-nr can grow to.
170 ==============================================================