Skip to content

Commit

Permalink
Update documentation for devel
Browse files Browse the repository at this point in the history
Auto-generated from v0.1.0-74-g66ed9f4 by 'update-gh-pages.sh'
  • Loading branch information
Github committed Oct 11, 2023
1 parent efe96d0 commit 5c5f242
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 133 deletions.
2 changes: 1 addition & 1 deletion devel/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ab4d2d64cee1bee683a36a2040642989
config: 83a4a873a86fb43f3390faf69f7941f2
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@ for:

NRI-RP implements an event processing pipeline. In addition to NRI events,
it processes a set of other events that are not directly related to or the
result of NRI requests.
These events are typically internally generated within NRI-RP. They can be
the result of changes in the state of some containers or the utilization
of a shared system resource, which potentially could warrant an attempt to
rebalance the distribution of resources among containers to bring the system
closer to an optimal state. Some events can also be generated by policies.
result of NRI requests. These events are typically internally generated within
NRI-RP.

The Resource Manager component of NRI-RP implements the basic control
flow of the processing pipeline. It passes control to all the
Expand Down Expand Up @@ -114,18 +110,6 @@ following, based on the event type:
2. Call policy event handler.
3. Invoke the controller layer for post-policy processing (same as step 5 for requests).
4. Release the pipeline lock.
- For metrics events:
1. Perform collection/processing/correlation.
2. Engage the processing pipeline lock.
3. Update cache objects as/if necessary.
4. Request rebalancing as/if necessary.
5. Release pipeline lock.
- For rebalance events:
1. Engage the processing pipeline lock.
2. Invoke policy layer for rebalancing.
3. Invoke the controller layer for post-policy processing (same as step 5 for requests).
4. Release the pipeline lock.


### [Cache](tree:/pkg/resmgr/cache/)

Expand Down
27 changes: 0 additions & 27 deletions devel/_sources/docs/resource-policy/policy/topology-aware.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ The `topology-aware` policy has the following features:
typically found on some special-purpose computing systems
- cold start
* pin workload exclusively to PMEM for an initial warm-up period
- dynamic page demotion
* forcibly migrate read-only and idle container memory pages to PMEM

## Activating the Policy

Expand Down Expand Up @@ -359,31 +357,6 @@ In the above example, `container1` would be initially granted only PMEM
memory controller, but after 60 seconds the DRAM controller would be
added to the container memset.

## Dynamic Page Demotion

The `topology-aware` policy also supports dynamic page demotion. With dynamic
demotion enabled, rarely-used pages are periodically moved from DRAM to PMEM
for those workloads which are assigned to use both DRAM and PMEM memory types.
The configuration for this feature is done using three configuration keys:
`DirtyBitScanPeriod`, `PageMovePeriod`, and `PageMoveCount`. All of these
parameters need to be set to non-zero values in order for dynamic page demotion
to get enabled. See this configuration file fragment as an example:

```yaml
policy:
Active: topology-aware
topology-aware:
DirtyBitScanPeriod: 10s
PageMovePeriod: 2s
PageMoveCount: 1000
```

In this setup, every pid in every container in every non-system pod
fulfilling the memory container requirements would have their page ranges
scanned for non-accessed pages every ten seconds. The result of the scan
would be fed to a page-moving loop, which would attempt to move 1000 pages
every two seconds from DRAM to PMEM.

## Container memory requests and limits

Due to inaccuracies in how `nri-resource-policy` calculates memory requests for
Expand Down
2 changes: 1 addition & 1 deletion devel/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.1.0-67-ga826ac6',
VERSION: '0.1.0-74-g66ed9f4',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contributing &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Contributing &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to NRI Plugins documentation &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Welcome to NRI Plugins documentation &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Introduction &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Introduction &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/memory/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Memory plugins &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Memory plugins &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/memory/memory-qos.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Memory QoS NRI plugin &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Memory QoS NRI plugin &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/memory/memtierd.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Memtierd NRI plugin &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Memtierd NRI plugin &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/resource-policy/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dynamic Configuration &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Dynamic Configuration &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
49 changes: 14 additions & 35 deletions devel/docs/resource-policy/developers-guide/architecture.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Architecture &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>Architecture &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down Expand Up @@ -130,7 +130,7 @@ <h2>Overview<a class="headerlink" href="#overview" title="Permalink to this head
<section id="components">
<h2>Components<a class="headerlink" href="#components" title="Permalink to this heading"></a></h2>
<section id="node-agent">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/resmgr/agent">Node Agent</a><a class="headerlink" href="#node-agent" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/resmgr/agent">Node Agent</a><a class="headerlink" href="#node-agent" title="Permalink to this heading"></a></h3>
<p>The node agent is a component internal to NRI-RP itself. All interactions
by NRI-RP with the Kubernetes Control Plane go through the node agent with
the node agent performing any direct interactions on behalf of NRI-RP.</p>
Expand All @@ -145,7 +145,7 @@ <h3><a class="reference external" href="https://github.com/containers/nri-plugin
<p>The config interface is defined and has its gRPC server running in
NRI-RP. The agent acts as a gRPC client for this interface. The low-level
cluster interface is defined and has its gRPC server running in the agent,
with the <a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/resmgr/agent">convenience layer</a> defined in NRI-RP.
with the <a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/resmgr/agent">convenience layer</a> defined in NRI-RP.
NRI-RP acts as a gRPC client for the low-level plumbing interface.</p>
<p>Additionally, the stock node agent that comes with NRI-RP implements schemes
for:</p>
Expand All @@ -155,15 +155,11 @@ <h3><a class="reference external" href="https://github.com/containers/nri-plugin
</ul>
</section>
<section id="resource-manager">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/resmgr/">Resource Manager</a><a class="headerlink" href="#resource-manager" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/resmgr/">Resource Manager</a><a class="headerlink" href="#resource-manager" title="Permalink to this heading"></a></h3>
<p>NRI-RP implements an event processing pipeline. In addition to NRI events,
it processes a set of other events that are not directly related to or the
result of NRI requests.
These events are typically internally generated within NRI-RP. They can be
the result of changes in the state of some containers or the utilization
of a shared system resource, which potentially could warrant an attempt to
rebalance the distribution of resources among containers to bring the system
closer to an optimal state. Some events can also be generated by policies.</p>
result of NRI requests. These events are typically internally generated within
NRI-RP.</p>
<p>The Resource Manager component of NRI-RP implements the basic control
flow of the processing pipeline. It passes control to all the
necessary sub-components of NRI-RP at the various phases of processing a
Expand Down Expand Up @@ -218,27 +214,10 @@ <h3><a class="reference external" href="https://github.com/containers/nri-plugin
<li><p>Release the pipeline lock.</p></li>
</ol>
</li>
<li><p>For metrics events:</p>
<ol class="arabic simple">
<li><p>Perform collection/processing/correlation.</p></li>
<li><p>Engage the processing pipeline lock.</p></li>
<li><p>Update cache objects as/if necessary.</p></li>
<li><p>Request rebalancing as/if necessary.</p></li>
<li><p>Release pipeline lock.</p></li>
</ol>
</li>
<li><p>For rebalance events:</p>
<ol class="arabic simple">
<li><p>Engage the processing pipeline lock.</p></li>
<li><p>Invoke policy layer for rebalancing.</p></li>
<li><p>Invoke the controller layer for post-policy processing (same as step 5 for requests).</p></li>
<li><p>Release the pipeline lock.</p></li>
</ol>
</li>
</ul>
</section>
<section id="cache">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/resmgr/cache/">Cache</a><a class="headerlink" href="#cache" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/resmgr/cache/">Cache</a><a class="headerlink" href="#cache" title="Permalink to this heading"></a></h3>
<p>The cache is a shared internal storage location within NRI-RP. It tracks the
runtime state of pods and containers known to NRI-RP, as well as the state
of NRI-RP itself, including the active configuration and the state of the
Expand Down Expand Up @@ -267,40 +246,40 @@ <h3><a class="reference external" href="https://github.com/containers/nri-plugin
the cache properly locked.</p>
</section>
<section id="generic-policy-layer">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/blob/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/resmgr/policy/policy.go">Generic Policy Layer</a><a class="headerlink" href="#generic-policy-layer" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/blob/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/resmgr/policy/policy.go">Generic Policy Layer</a><a class="headerlink" href="#generic-policy-layer" title="Permalink to this heading"></a></h3>
<p>The generic policy layer defines the abstract interface the rest of NRI-RP
uses to interact with policy implementations and takes care of the details
of activating and dispatching calls through to the configured active policy.</p>
</section>
<section id="generic-resource-controller-layer">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/blob/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/resmgr/control/control.go">Generic Resource Controller Layer</a><a class="headerlink" href="#generic-resource-controller-layer" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/blob/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/resmgr/control/control.go">Generic Resource Controller Layer</a><a class="headerlink" href="#generic-resource-controller-layer" title="Permalink to this heading"></a></h3>
<p>The generic resource controller layer defines the abstract interface the rest
of NRI-RP uses to interact with resource controller implementations and takes
care of the details of dispatching calls to the controller implementations
for post-policy enforcment of decisions.</p>
</section>
<section id="metrics-collector">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/pkg/metrics/">Metrics Collector</a><a class="headerlink" href="#metrics-collector" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/pkg/metrics/">Metrics Collector</a><a class="headerlink" href="#metrics-collector" title="Permalink to this heading"></a></h3>
<p>The metrics collector gathers a set of runtime metrics about the containers
running on the node. NRI-RP can be configured to periodically evaluate this
collected data to determine how optimal the current assignment of container
resources is and to attempt a rebalancing/reallocation if it is deemed
both possible and necessary.</p>
</section>
<section id="policy-implementations">
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/cmd/plugins">Policy Implementations</a><a class="headerlink" href="#policy-implementations" title="Permalink to this heading"></a></h3>
<h3><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/cmd/plugins">Policy Implementations</a><a class="headerlink" href="#policy-implementations" title="Permalink to this heading"></a></h3>
<section id="topology-aware">
<h4><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/cmd/plugins/topology-aware/">Topology Aware</a><a class="headerlink" href="#topology-aware" title="Permalink to this heading"></a></h4>
<h4><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/cmd/plugins/topology-aware/">Topology Aware</a><a class="headerlink" href="#topology-aware" title="Permalink to this heading"></a></h4>
<p>A topology-aware policy capable of handling multiple tiers/types of memory,
typically a DRAM/PMEM combination configured in 2-layer memory mode.</p>
</section>
<section id="balloons">
<h4><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/cmd/plugins/balloons/">Balloons</a><a class="headerlink" href="#balloons" title="Permalink to this heading"></a></h4>
<h4><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/cmd/plugins/balloons/">Balloons</a><a class="headerlink" href="#balloons" title="Permalink to this heading"></a></h4>
<p>A balloons policy allows user to define fine grained control how the
computer resources are distributed to workloads.</p>
</section>
<section id="template">
<h4><a class="reference external" href="https://github.com/containers/nri-plugins/tree/a826ac63c1f64c17c292f35e088398c8add13d96/cmd/plugins/template/">Template</a><a class="headerlink" href="#template" title="Permalink to this heading"></a></h4>
<h4><a class="reference external" href="https://github.com/containers/nri-plugins/tree/66ed9f48e4753151f0793ab0828e720a2decd888/cmd/plugins/template/">Template</a><a class="headerlink" href="#template" title="Permalink to this heading"></a></h4>
<p>The template policy can be used as a base for developing new policies.
It provides hooks that the policy developer can fill to define fine grained
control how the computer resources are distributed to workloads.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CPU Allocator &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>CPU Allocator &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion devel/docs/resource-policy/developers-guide/e2e-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>End-to-End tests &mdash; NRI Plugins 0.1.0-67-ga826ac6 documentation</title>
<title>End-to-End tests &mdash; NRI Plugins 0.1.0-74-g66ed9f4 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
Expand Down
Loading

0 comments on commit 5c5f242

Please sign in to comment.