ia64/linux-2.6.18-xen.hg

view Documentation/networking/shaper.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 Traffic Shaper For Linux
3 This is the current BETA release of the traffic shaper for Linux. It works
4 within the following limits:
6 o Minimum shaping speed is currently about 9600 baud (it can only
7 shape down to 1 byte per clock tick)
9 o Maximum is about 256K, it will go above this but get a bit blocky.
11 o If you ifconfig the master device that a shaper is attached to down
12 then your machine will follow.
14 o The shaper must be a module.
17 Setup:
19 A shaper device is configured using the shapeconfig program.
20 Typically you will do something like this
22 shapecfg attach shaper0 eth1
23 shapecfg speed shaper0 64000
24 ifconfig shaper0 myhost netmask 255.255.255.240 broadcast 1.2.3.4.255 up
25 route add -net some.network netmask a.b.c.d dev shaper0
27 The shaper should have the same IP address as the device it is attached to
28 for normal use.
30 Gotchas:
32 The shaper shapes transmitted traffic. It's rather impossible to
33 shape received traffic except at the end (or a router) transmitting it.
35 Gated/routed/rwhod/mrouted all see the shaper as an additional device
36 and will treat it as such unless patched. Note that for mrouted you can run
37 mrouted tunnels via a traffic shaper to control bandwidth usage.
39 The shaper is device/route based. This makes it very easy to use
40 with any setup BUT less flexible. You may need to use iproute2 to set up
41 multiple route tables to get the flexibility.
43 There is no "borrowing" or "sharing" scheme. This is a simple
44 traffic limiter. We implement Van Jacobson and Sally Floyd's CBQ
45 architecture into Linux 2.2. This is the preferred solution. Shaper is
46 for simple or back compatible setups.
48 Alan