ia64/linux-2.6.18-xen.hg

view Documentation/networking/Configurable @ 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
2 There are a few network parameters that can be tuned to better match
3 the kernel to your system hardware and intended usage. The defaults
4 are usually a good choice for 99% of the people 99% of the time, but
5 you should be aware they do exist and can be changed.
7 The current list of parameters can be found in the files:
9 linux/net/TUNABLE
10 Documentation/networking/ip-sysctl.txt
12 Some of these are accessible via the sysctl interface, and many more are
13 scheduled to be added in this way. For example, some parameters related
14 to Address Resolution Protocol (ARP) are very easily viewed and altered.
16 # cat /proc/sys/net/ipv4/arp_timeout
17 6000
18 # echo 7000 > /proc/sys/net/ipv4/arp_timeout
19 # cat /proc/sys/net/ipv4/arp_timeout
20 7000
22 Others are already accessible via the related user space programs.
23 For example, MAX_WINDOW has a default of 32 k which is a good choice for
24 modern hardware, but if you have a slow (8 bit) Ethernet card and/or a slow
25 machine, then this will be far too big for the card to keep up with fast
26 machines transmitting on the same net, resulting in overruns and receive errors.
27 A value of about 4 k would be more appropriate, which can be set via:
29 # route add -net 192.168.3.0 window 4096
31 The remainder of these can only be presently changed by altering a #define
32 in the related header file. This means an edit and recompile cycle.
34 Paul Gortmaker 06/96