-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5289 from robhoes/add-docs
More docs on the new site
- Loading branch information
Showing
40 changed files
with
6,325 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
+++ | ||
title = "Squeezed" | ||
weight = 50 | ||
+++ | ||
|
||
Squeezed is the XAPI Toolstack's host memory manager (aka balloon driver). | ||
Squeezed uses ballooning to move memory between running VMs, to avoid wasting | ||
host memory. | ||
|
||
Principles | ||
---------- | ||
|
||
1. Avoid wasting host memory: unused memory should be put to use by returning | ||
it to VMs. | ||
2. Memory should be shared in proportion to the configured policy. | ||
3. Operate entirely at the level of domains (not VMs), and be independent of | ||
Xen toolstack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
+++ | ||
title = "Architecture" | ||
+++ | ||
|
||
Squeezed is responsible for managing the memory on a single host. Squeezed | ||
"balances" memory between VMs according to a policy written to Xenstore. | ||
|
||
The following diagram shows the internals of Squeezed: | ||
|
||
![Internals of squeezed](squeezed.png) | ||
|
||
At the center of squeezed is an abstract model of a Xen host. The model | ||
includes: | ||
|
||
- The amount of already-used host memory (used by fixed overheads such as Xen | ||
and the crash kernel). | ||
- Per-domain memory policy specifically `dynamic-min` and `dynamic-max` which | ||
together describe a range, within which the domain's actual used memory | ||
should remain. | ||
- Per-domain calibration data which allows us to compute the necessary balloon | ||
target value to achive a particular memory usage value. | ||
|
||
Squeezed is a single-threaded program which receives commands from xenopsd over | ||
a Unix domain socket. When Xenopsd wishes to start a new VM, squeezed will be | ||
asked to create a "reservation". Note this is different to the Xen notion of a | ||
reservation. A squeezed reservation consists of an amount of memory squeezed | ||
will guarantee to keep free labelled with an id. When Xenopsd later creates the | ||
domain to notionally use the reservation, the reservation is "transferred" to | ||
the domain before the domain is built. | ||
|
||
Squeezed will also wake up every 30s and attempt to rebalance the memory on a | ||
host. This is useful to correct imbalances caused by balloon drivers | ||
temporarily failing to reach their targets. Note that ballooning is | ||
fundamentally a co-operative process, so squeezed must handle cases where the | ||
domains refuse to obey commands. | ||
|
||
The "output" of squeezed is a list of "actions" which include: | ||
|
||
- Set domain x's `memory/target` to a new value. | ||
- Set the `maxmem` of a domain to a new value (as a hard limit beyond which the | ||
domain cannot allocate). | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.