/ansible-playbook-slices

Use systemd slices (cgroups) to constrain processes (chrome, firefox, slack), integrate with Gnome3

Primary LanguagePython

Ansible Playbook

This is a fast playbook to demonstrate the idea of editting Gnome Startup (desktop) files, create cgroups on Fedora 30 systems, and keep bumpers on tools like Slack and Chrome.

Target

  • Ansible 2.8
  • Fedora 30

Example

 git clone https://github.com/joshland/ansible-playbook-slices.git
 cd ansible-playbook-slices
 sudo  ansible-playbook site.yml -i hosts.ini

Tunables

Make your adjustments here:

group_vars/all

 ---
 # Override or python3
 ansible_python_interpreter: /usr/bin/python3
 
 # Variables for this exercise
 browsermem: 30%
 #browsercpu: 30%
 electronmem: 768M
 #electroncpu: 15%

Examining Results:

show cgroups

 systemd-cgls

examine usage

 systemd-cgtop

general analysis

 systemd-analyze critical-chain user-browsers.slice

License

Ansible-Playbook-Slice by joshland is licensed under CC BY 2.0