From a20aaaf1ae1769ec95311d578d6fcf67130d572e Mon Sep 17 00:00:00 2001 From: Thiago Antonio Miranda Date: Mon, 18 Jul 2022 18:14:51 -0300 Subject: [PATCH] containerd scale down Platform services configuration were changed in order to consume minimal resources by limiting number of threads/workers to the minimum value based on containerd service documentation TEST PLAN: PASS: build a new Debian ISO. PASS: AIO: SX|DX|DX+: Install, bootstrap and perform a host-unlock verifying that GOMAXPROCS is following the correct scalability set parameter. PASS: STD: Install, bootstrap and perform a host-unlock verifying that GOMAXPROCS is following the correct scalability set parameter. PASS: Single-core for scale-down testing. PASS: Increased cores for scale-up testing. Story: 2010087 Task: 45710 Change-Id: I959f6426419e8fb5ed1398fb7e88a3d5219e80ec Signed-off-by: Thiago Antonio Miranda --- .../src/modules/platform/manifests/containerd.pp | 13 +++++++++++++ .../platform/templates/containerd-max-proc.conf.erb | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 puppet-manifests/src/modules/platform/templates/containerd-max-proc.conf.erb diff --git a/puppet-manifests/src/modules/platform/manifests/containerd.pp b/puppet-manifests/src/modules/platform/manifests/containerd.pp index bb3012a04..7ec7a7509 100644 --- a/puppet-manifests/src/modules/platform/manifests/containerd.pp +++ b/puppet-manifests/src/modules/platform/manifests/containerd.pp @@ -67,6 +67,19 @@ class platform::containerd::config include ::platform::params include ::platform::mtce::params + if $::platform::params::system_type == 'All-in-one' and + $::platform::params::distributed_cloud_role != 'systemcontroller' { + $containerd_max_proc = $::platform::params::eng_workers + + file { '/etc/systemd/system/containerd.service.d/containerd-max-proc.conf': + ensure => file, + owner => 'root', + group => 'root', + mode => '0600', + content => template('platform/containerd-max-proc.conf.erb'), + } + } + # If containerd is started prior to networking providing a default route, the # containerd cri plugin will fail to load and the status of the cri plugin # will be in 'error'. This will prevent any crictl image pulls from working as diff --git a/puppet-manifests/src/modules/platform/templates/containerd-max-proc.conf.erb b/puppet-manifests/src/modules/platform/templates/containerd-max-proc.conf.erb new file mode 100644 index 000000000..1c36baf4b --- /dev/null +++ b/puppet-manifests/src/modules/platform/templates/containerd-max-proc.conf.erb @@ -0,0 +1,2 @@ +[Service] +Environment="GOMAXPROCS=<%= @containerd_max_proc %>"