sysconfig #0

Supports: bionic xenial
Add to new model

Description

SYSConfig can configure cpufreq governor (ie powersave, performance),
and CPU Affinity or Kernel's isolcpus details in systemd-sytem.conf
or Grub. It can also configure HugePages on Grub.


Overview

This is a subordinate charm to deploy the cpufrequtils package and
configure a type of CPU reservation: isolcpus or CPU Affinity.

Usage

Deploy sysconfig alongside your service,

juju deploy sysconfig

Add the relations:

juju add-relation sysconfig os-cs-vnf

Configuration

Reservation

By default, the charm does not configure any CPU related reservation.
However, "isolcpus" or "affinity" can be configured on systemd hosts.

cpu-range

In case of "isolcpus", it determines the pcpus that won't be used by the
host (ie. the same range is configured for QEMU usage).

In case of "affinity", it determines the pcpus that the host WILL use
(ie. a complementary range to the QEMU vcpu_pin_set).

If this value is left empty, charm behaves as if reservation=off.

update-grub

By default, this value is set to "false". If enabled, charm will run
"update-grub" when changing /etc/default/grub (when
reservation=isolcpus).

config-flags

If you need further options configured, this extra optons will be added
to the files:
* /etc/default/grub (reservation=isolcpus)
* /etc/systemd/system.conf (reservation=affinity)

It does nothing if reservation=off.

Contact Information


Configuration

config-flags
(string) If extra lines need to be configured on /etc/default/grub (isolcpus) or /etc/systemd/system.conf (affinity), this string can be used as a list in yaml format. Sample: {'grub': 'key1=value1, key2=value2', 'systemd': 'key1=value1'}
cpu-range
(string) Single pcpus (0,1,2) or range of pcpus (0-10) to isolate (if isolcpus is selected) or reserve (if affinity is selected) . Default value (empty) will make "reservation" work as if it was "off".
extra_packages
(string) Space separated list of extra deb packages to install.
governor
(string) Configured via cpufrequtils, possible values are powersave or performance
hugepages
(string) Number of hugepages. Example: 400
hugepagesz
(string) Size of each hugepage. Example: 1G
install_keys
(string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
install_sources
(string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
kernel-version
(string) Upgrade kernel and modules-extra package to this version. Does nothing if same kernel already running.
package_status
(string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
install
reservation
(string) Type of CPU reservation: isolcpus, affinity, off isolcpus is a kernel cmdline paremeter affinity (CPU Affinity) is a systemd configuration parameter. Other processes inherit from systemd-system.conf off (default) disables any CPU reservation on host-side.
off
update-grub
(boolean) Allows the charm to run "update-grub" command if /etc/default/grub was changed . This is discouraged and by default it is disabled.