Skip to content

This is an ansible role to tune users' limits via cgroups

License

Notifications You must be signed in to change notification settings

alet/cgroups-limits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User limits module

Build Status

This module turn on cpu and memory limits on specifed user. Module use cgroup facility of linux kernel, but developed for and tested on Ubuntu 14.04

Installing

$ ansible-galaxy install alet.cgroups-limits

Usage

This role takes the variable users_limit with dictionaries. Default value for cpu is 50% and for memory 128M. Values are percent for cpu and megabytes for memory. To remove user's limit add "del" parameter with value "True". Sample:

- name: Limits
  hosts: all
  vars:
    users_limit:
      - { name: vagrant, cpu: 80, mem: 128 }
      - { name: test, del: True }

  roles:
    - cgroups-limits

Important!

There is NO control of summary cpu's percent is 100 and there is NO control of summary of memory are equal to physical.

About

This is an ansible role to tune users' limits via cgroups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published