Skip to content

Manage user.slice and system.slice resource allocation through host inventory #268

Description

@roamingengineer311

To manage resource allocation for user.slice and system.slice on hypervisor hosts, it would be useful to provide a way to configure systemd slice resource limits directly through the deployment inventory.

The feature should be disabled by default:

resource_allocation: false

It can be enabled globally through inventory variables:

vars:
  resource_allocation: true

When resource_allocation is enabled, the following default resource limits should be applied to every hypervisor host:

user.slice:
  MemoryHigh: 10G
  MemoryMax: 12G
  CPUQuota: 800%

system.slice:
  MemoryHigh: 4G

These defaults should be overridable on a per-host basis through the inventory.

For example:

vars: 
  resource_allocation: true 

node: 
  hosts: 
    kvm01: 
      ansible_host: 10.1.1.100
      slices: 
        user.slice: 
          MemoryHigh: 8G 
          MemoryMax: 10G 
          CPUQuota: 1000% 
        system.slice: 
          MemoryHigh: 6G

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions