Commit ae973020 authored by Cool Fire's avatar Cool Fire

Add some ad-hoc cgroups we can throw a one-off process into if needed

parent 889aa0e6
Pipeline #2321 passed with stages
in 4 minutes and 59 seconds
......@@ -36,6 +36,7 @@ class profile::lydia (
include ::site_apache::php
include ::site_apparmor
include ::site_cgroups
include ::site_cgroups::adhoc
include ::site_dovecot
include ::site_imagemagick
include ::site_kernelcare
......
# Class: site_cgroups::adhoc
#
# Create a few special cgroups that we can
# assign a one-off process to when needed
class site_cgroups::adhoc (
Array[Integer] $cpucaps = [1, 5, 10, 25, 50],
) {
concat::fragment { 'cgroups_adhoc_cpucaps':
target => '/etc/cgconfig.conf',
content => template('site_cgroups/adhoc.erb'),
order => '04',
}
}
<% @cpucaps.each do |cap| %>
group adhoc_cpu_<%= cap %> {
cpu {
cpu.cfs_period_us = 1000000;
cpu.cfs_quota_us = <%= cap * 10000 %>;
}
}
<% end %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment